I am pleased to see that after 3 hours of lazy Sunday work, including
coffee/breakfast time, all these features are implemented.
Django really surprises me every single time with its simplicity of expression
(no wait that’s Python :p), and the productivity rate when extending the basic
Here’s a snippet directly from the website’s source code, adding a “categories”
command allowing me to easily list categories currently added:
I don’t know how this could be more explicit, and even so, this performs many
implicit actions which helps you focus on the important code rather than the
boilerplate. Here’s what happens when calling this command:
Command-line completion: yup, this is definitely useful
Settings are read: using either the default settings in the manage.py
script, or in the environment variable DJANGO_SETTINGS_MODULE. This way I
can run this command either locally or on the deployment server. Note that
the settings read can be overriden directly via the command-line arguments,
by passing –settings=dotted.path.to.settings.
ORM magic: when accessing the model’s manager through “Category.objects”, I
can easily change the behaviour when selecting all categories, without
touching this code! I find this amazing in terms of code reuse.
Pretty error messages: exceptions are caught and nicely printed
Help messages: this command is automatically added to the manage.py’s
command list, grouped under the app’s name. If I run “python manage.py help
categories”, I get the help message defined above “List all categories”.
Cool huh ? :)
EDIT: this website is now hosted my Github pages, therefore runs on Jekyll.