A model template in your Django app

Posted on Tue 10 March 2020 in Python • Tagged with Python, Django • 3 min read

This is something I recently stumbled over. A way to reduce the DRY (Don't repeat yourself) in the models of your Django app.

Most of the times I find that I have the two same fields in my Django models. Added and edited. Both are DateTimeFields. Added gets the date …


Continue reading

Create a custom manage.py command in Django

Posted on Sun 01 March 2020 in Python • Tagged with Python, Django • 3 min read

If you ever used Django you have propbably used its manage.py to execute different things like:

  • python manage.py runserver
  • python manage.py createsuperuser

There are lots of useful commands available built-in that you can use, as can be seen in the documentation (django-admin and manage.py). For example …


Continue reading

How to get started with my Django template

Posted on Tue 31 December 2019 in Python • Tagged with Python, Django • 10 min read

In this article I'll show you how you can use my Django Template to quickly create and get running a basic Django app.

The purpose of the article is not to teach anyone how to create a Django app from start, there are many other great resources out there for …


Continue reading

Using multiple settings.py in your Django project

Posted on Mon 07 October 2019 in Python • Tagged with Python, Django • 4 min read

After going through "Django for professionals" and building the project in there, I started to build a Django project template based on what I learned from the book. The book goes through a development version of the project, and a production version, and it also makes use of Docker to …


Continue reading