Skip to content

Instantly share code, notes, and snippets.

@kevinhooke
Last active October 1, 2025 16:00
Show Gist options
  • Select an option

  • Save kevinhooke/1c84fc78e226c7d25d294e054e42d6d5 to your computer and use it in GitHub Desktop.

Select an option

Save kevinhooke/1c84fc78e226c7d25d294e054e42d6d5 to your computer and use it in GitHub Desktop.
Django notes
Running dev server:
python3 manage.py runserver
Adding a user to admin:
python3 manage.py createsuperuser
Adding app to installed apps:
In yoursite/settings.py, add to:
INSTALLED_APPS = [
]
Registering a model to be accessible from admin:
In appname/admin.py:
from .models import Question
admin.site.register(Question)
Create db migrations:
python3 manage.py makemigrations dashboard
Perform db migration:
python manage.py migrate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment