Thanks for downloading AppStack. This project features a batteries-included Django starter project for AppStack. It is based on DjangoX.
AppStack Django can be installed via Pip, Pipenv, or Docker depending upon your setup. To start, clone the repo to your local computer and change into the proper directory.
$ pip install -r requirements.txt
$ python manage.py migrate
$ python manage.py createsuperuser
$ python manage.py runserver
# Load the site at http://127.0.0.1:8000
$ pipenv install
$ pipenv shell
$ python manage.py migrate
$ python manage.py createsuperuser
$ python manage.py runserver
# Load the site at http://127.0.0.1:8000
$ docker build .
$ docker-compose up -d
$ docker-compose exec web python manage.py migrate
$ docker-compose exec web python manage.py createsuperuser
# Load the site at http://127.0.0.1:8000
For Docker, the INTERNAL_IPS
configuration in config/settings.py
must be updated to the following:
# config/settings.py
# django-debug-toolbar
import socket
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
INTERNAL_IPS = [ip[:-1] + "1" for ip in ips]
# Run Migrations
$ python manage.py migrate
# Create a Superuser
$ python manage.py createsuperuser
# Confirm everything is working:
$ python manage.py runserver
# Load the site at http://127.0.0.1:8000
To get the VS Code instance going using poetry:
poetry run code .
Add packages
poetry add <package name>
We are using ruff as our formatter and linter
ruff check
ruff check --fix
ruff check <file location>
ruff format
I don't think ruff lints and formats django html files, so we use djlint
Make sure you are in a poetry shell, or prefix with poetry run
djlint /path/to/file.html --check
djlint /path/to/file.html --reformat