De-coupled ReactJS client for greater flexibility and less black-box Django magic
Full-stack application scaffold. Structured to provide much needed decoupling between the client application build and Django's opinionated pipeline/staticfiles systems.
Achieved by using webpack to manage our client bundling, with these tools:
In short, we'll let Django do what it is good at; Server-side/ORM stuff, while de-coupling the client for greater flexibility (and less confusing black-box Django magic!)
/
, /about
) has been configured using react-router-dom
.urls.py
we have defined a catchall which essentially defers routing to React.From project root:
# javascript things
npm install # install js packages
npm run watch # run webpack build for client app, and rebuild on \*change
# python things
virtualenv venv # create python virtualenv
source venv/bin/activate # enter venv
pip install -r requirements.txt # install pip packages
python manage.py runserver # serve
*to just build a webpack bundle once use: npm run build
MIT License
Heavily based on these great resources: