An opinionated Cookiecutter template for Django with Wagtail and Webpack.
Ready to be used with:
- Wagtail
- Django Webpack Loader
- Django Debug Toolbar
- Webpack
- Heroku
- PostgreSQL
- Docker (with Docker for Django Cookiecutter)
It comes configured with:
- A custom user model that extends the base Django user model.
- Superuser authentication with credentials stored in environmental variables.
# Bake cookie!
cookiecutter gh:jmfederico/cookiecutter-django
# Setup python project
poetry init
# Install python dependencies
poetry add \
django \
psycopg2 \
wagtail \
django_webpack_loader \
django_debug_toolbar \
django_extensions \
django_heroku \
gunicorn
# Install node dependencies
npm add -D \
@babel/core \
@babel/preset-env \
autoprefixer \
babel-loader \
clean-webpack-plugin \
css-loader \
cssnano \
event-hooks-webpack-plugin \
file-loader \
mini-css-extract-plugin \
node-sass \
nucleus-styleguide \
optimize-css-assets-webpack-plugin \
postcss-loader \
sass-loader \
source-map-loader \
style-loader \
url-loader \
webpack \
webpack-bundle-tracker \
webpack-cli \
webpack-plugin-serve
# Automatically generate dotenv files
docker run --rm -v "`pwd`:/var/lib/dotenver/" jmfederico/dotenver
# Take a look to the generated dotenv (.env) file, and modify to your needs.
# Build and run your docker images
docker-compose build
docker-compose up -d
# Make and run migrations
docker-compose run --rm django ./manage.py makemigrations
docker-compose up -d
Visit https://localhost/admin/