An open API service indexing awesome lists of open source software.

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

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.