Skip to content

glsdown/template-django-react-app

Repository files navigation

Django and React App example

This is a template application built using Django and React. It is based on the video tutorial provided by Traversy Media.

Documentation

Documentation is included in this repository. It can be viewed using GitHub pages.

To deploy it, simply run:

mkdocs gh-deploy

Alternatively, prior to deployment, to view it locally, you can run

mkdocs serve

To build the documentation into a static website for hosting elsewhere, you can do so by running:

mkdocs build

Development

Once you have set up the relevant environment variables (as described in App Settings), to run the development server, you'll need to run

python app/manage.py runserver

If you are working on the front end and would like React hot-reloading, you'll also need to run (in a separate terminal):

npm run dev

Building

To build the application, run

npm run build

Formatting

To format this repository to pass the GitHub tests, make sure to have nox installed, and then run:

>>> nox -s format
>>> npm run format

Alternatively, these can be combined together by using

>>> npm run format-all

Improvements

Improvements to make:

  • Add API auto-documentation (consider the use of react-redocs)
  • Convert to cookie cutter