Living on the Edge

Management Command Extensions Project

Posted on November 22, 2007

If you have global custom management command extensions or if you have suggestions for some that would be useful to you in your daily work with Django, we want you. Yesterday I posted a new project on Google Code, called Django Command Extensions, that will hopefully grow into a nice repository of custom management command extensions.

Regenerate Secret Key

Posted on November 21, 2007

I had a need to generate a new secret key for a Django project that I’m working on. Often when I start a new project I’ll just copy an existing project template that I have which has all the bits and pieces in the right places. This helps me to get going quickly without a lot of fuss. Although when doing so I always need a new SECRET_KEY for the settings file. Instead of doing it manually this time, I decided to create a new custom management command and make it part of my global management command extensions project.

Using call_command

Posted on November 21, 2007

While creating the most recent Django Screencast on Custom Management Commands, I had it in my show notes to mention how you can call Django’s management commands from an external script. There’s probably several different ways to accomplish this, but the simplest and “baked in” way to do this is through the use of the call_command function.

Custom Management Commands Cheatsheet

Posted on November 21, 2007

I mentioned in the Django Screencast that I would be putting together a cheatsheet on Django’s custom management commands, so here it is. I hope you find it useful.

Django Screencasts - Episode 003

Posted on November 20, 2007

In this screencast I cover adding custom management commands into your Django applications. Custom management commands are a method of extending Django’s built-in commands that are made available through the manage.py or django-admin.py scripts.