pip install Django
django-admin startproject todoapp
python manage.py migrate
python manage.py runserver
python manage.py startapp todolist
- add 'todolist' to INSTALLED_APPS
- implement todolist.views.py and create todolist.urls.py
- add urls to todoapp.urls.py
- add templates folder and file
- add "templates" to DIR in settings.py
- modify view: return render...
- implement todolist.models.py
manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
- Adding models to the administration site:
- todolist.admin.py: admin.site.register(Todo)
- login to admin
- add {% csrf_token %} to template