https://github.com/pascalw/django-webpack-boilerplate
Django + Webpack without glue plugins
https://github.com/pascalw/django-webpack-boilerplate
Last synced: over 1 year ago
JSON representation
Django + Webpack without glue plugins
- Host: GitHub
- URL: https://github.com/pascalw/django-webpack-boilerplate
- Owner: pascalw
- Created: 2020-04-18T19:59:23.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T13:05:59.000Z (over 3 years ago)
- Last Synced: 2025-03-24T04:13:38.588Z (over 1 year ago)
- Language: Python
- Size: 336 KB
- Stars: 76
- Watchers: 2
- Forks: 10
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Django + Webpack without any plugins to glue them together
This is a demo project for my blog post [here](https://pascalw.me/blog/2020/04/19/webpack-django.html).
It's deployed on Fly.io [here](https://django-webpack.fly.dev).
## Installation
1. `yarn install` (or `npm install`)
2. `poetry install` (or `pip install -r requirements.txt`)
## Development workflow
Run the Django server (`python manage.py runserver`) and Webpack in another tab (`yarn start`).
For more convenience you can use a tool like [Goreman](https://github.com/mattn/goreman) to run Django and Webpack in a single terminal: `goreman -f Procfile.dev start`.
## Production workflow
Compile assets first with `yarn build`, then use Django collectstatic: `python manage.py collectstatic`.
If you're running on Heroku this will happen automatically if you use both the Node.js and Python buildpacks.