A simple proof-of-concept project integrating webpack into a "pre-existing" Django project.
A simple proof-of-concept project integrating webpack
into a "pre-existing" Django project.
The purpose is to avoid complexity and concentrate on the basics:
whitenoise
to serve static resources).Requirements:
Setup:
pip install -r requirements.txt
(cd static_source; npm install)
python manage.py migrate
Run development version:
python manage.py runserver 0:8000
Run "production" version:
rm -rf django_webpack_poc/homepage/static/*
python manage.py buildstatic
PRODUCTION=1 python manage.py runserver 0:8000