originated from my learning repo
A simple blog written with Django to learn web development, in particular:
- Django router (urlconf)
- Django function-based views and templates
- Django class-based views (for example, accounts views)
- Django ORM with its models and transactions
- Django forms
- Migrations (for example, this migration to fix the datatype)
unittestsmodule and its application in Django (for example, these tests)- Various ways to handle static files, a bit of Nginx
- A bit of CSS
pre-commit(didn't really like it)- Docker and how to optimize it for (build) speed and size
- Docker Compose and how to optimize it for development
- logging using built-in
loggingmodule - Configuration of logging in Django
- Authentication and authorization (and in context of Django)
- Method "safety" with GET vs POST, CSRF
- CORS
- How to split Django codebase into apps
- htmx
And related things such as:
- wsgi
- reverse proxies
- CI via Github Actions workflows
- deployment (via render.com for now)
- SMTP
- PostgreSQL backups using pg_dump
There are two main options
./start_docker.shwhich will start docker-compose and re-build what needs re-building../simple_start.shwill start docker with db stuff, and then you'll need to run Django as you normally do it. Don't forget your.envfile and keep in mind that it won't work without staticfiles collected, unless you run it withDEBUG=1.
There's additionally a render.yaml blueprint for render.com.
This link should work: https://juliancoffee-django-blog.onrender.com
P. S. it's a free hosting so you might be forced to wait for about a minute for it to spin up