~nora/django-sandbox

Django sandbox
Fix .gitignore
website: fix htmx

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~nora/django-sandbox
read/write
git@git.sr.ht:~nora/django-sandbox

You can also use your local clone with git send-email.

#Django Sandbox

This is a sandbox to play with Django framework.

#Building and running

Install dependencies in a virtual environment.

pip install -r requirements.txt

Create configuration file in src/website/.env.

SECRET_KEY=django-secretkey
DEBUG=True
ALLOWED_HOSTS=localhost
DATABASE_ENGINE=django.db.backends.postgresql
DATABASE_NAME=database_name
DATABASE_USER=database_user
DATABASE_PASSWORD=database_pass
DATABASE_HOST=localhost
DATABASE_PORT=5432
STRIPE_API_KEY=stripe-api-secretkey
STRIPE_WEBHOOK_KEY=stripe-webhook-secretkey

Initialize database and create super user.

python manage.py migrate
python manage.py createsuperuser

Run server (webpages reloaded on change).

python manage.py runserver