A collection of my thoughts, ideas and experiences. I write about backend development with Python and Django, Linux, the projects I build and, now and then, personal topics.
How a Marvel marathon turned into a GTK4 app to manage MiniDLNA on Linux, with a privileged helper through Polkit, ACLs, a systemd override and libadwaita 1.1 compatibility.
How to use order_by to sort in ascending and descending order, break ties with more than one field, ignore case, control where null values go and set a default order on the model.
How to open the Django shell, make use of its automatic imports, run a .py file with manage.py shell and when to turn the script into a management command.
Pagination with ListView and paginate_by, the page_obj attributes in the template, numbered links, filters kept in the URL and API pagination with Django REST Framework.
Role-based access control with django-role-permissions: roles, assigning them to users, checks in views and templates, object-level permissions and Django REST Framework integration.