Skip to content

Latest commit

 

History

History
97 lines (79 loc) · 1.92 KB

README.md

File metadata and controls

97 lines (79 loc) · 1.92 KB

Django with Wagtail and WebPack Cookiecutter

An opinionated Cookiecutter template for Django with Wagtail and Webpack.

Features

Ready to be used with:

It comes configured with:

  • A custom user model that extends the base Django user model.
  • Superuser authentication with credentials stored in environmental variables.

Requirements

Usage

# 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/