- Django (Official Website) - The web framework for perfectionists with deadlines.
- Writing your first Django app - this is part 1, visit the link for more
- Python is required. You can install it anyway you want, i prefer pyenv
- pyenv - Simple Python version management
- pyenv-virtualenv - a pyenv plugin to manage virtualenv (a.k.a. python-virtualenv)
- poetry - Python dependency management and packaging made easy
-
Make a project folder
mkdir <project_folder> && $_
-
Create a Virutalenv using pyenv-virtualenv or poetry (or any other). Make sure to select the correct interpreter in vscode
# create pyenv virtualenv <python_version> <virtualenv_name> # set the environment to auto-activate (.python-version) pyenv local <virtualenv_name> # dependency manager poetry init
-
Install Package
poetry add django
-
Start project
poetry run django-admin.py startproject <project_name> .
-
Export dependencies to a requirements.txt
poetry export -f requirements.txt --output requirements.txt
- Time zones - time zone handling
- Related objects reference - model relations
- Field lookups - how to use double underscores
- Making queries - database API
- URL dispatcher - use of URLconfs. A URLconf maps URL patterns to views
- PyLint (Optional) - DevDependency
- PyLint for Django in VSCode - Medium Article
- Missing Docstring - Stackoverflow
- Templates
- Avoiding race conditions using F()
- Class-based views
- Testing in Django
- Static Files
- Managing static files (e.g. images, JavaScript, CSS)
- The staticfiles app
- Deploying static files discusses how to use static files on a real server.
- The Django admin site
- display() decorator
- list_display - properties configurable via the decorator
- Templates
- What to read next