Django Command Extensions Update
Since I published my introductory post on the project, I have not posted any additional updates regarding the project. Quietly, there’s been tons of work happening, and so I thought I would give some visibility to all of the great contributions to the effort.
As a review, the django-command-extensions project is a repository for collecting global custom management extensions for the Django Framework.
Since the project was started there has been an additional twelve commands added. The bulk of the work has been headed up by Ido Sebastiaan van Oostveen, with some additional work by Doug Napoleone and Ludvig Ericson. Personally, I haven’t had much involvement in the development beyond a few initial commands. Although, I have been a satisfied customer of the extensions, such that it has become a staple for all of my Django projects.
So on to the fun stuff. Here’s a list of commands in the project:
-
create_app – creates an application directory structure for the specified app name. This command allows you to specify the
--template
option where you can indicate a template directory structure to use as your default.
- create_command – creates a command extension directory structure within the specified application. This makes it easy to get started with adding a command extension to your application.
- create_jobs – Creates a Django jobs command directory structure for the given app name in the current directory. This is part of the impressive jobs system.
- create_superuser – makes it easy to create a superuser for the django.contrib.auth.
- describe_form – used to display a form definition for a model. Copy and paste the contents into your forms.py and you’re ready to go.
- – export the email addresses for your users in one of many formats. Currently supports Address, Google, Outlook, LinkedIn, and VCard formats. I have found this really handy.
- generate_secret_key – creates a new secret key that you can put in your settings.py module.
- – creates a GraphViz dot file. You need to send this output to a file yourself. Great for graphing your models. Pass multiple application names to combine all the models into a single dot file. This one is very useful with lots of options for flexibility. See the wiki page for detailed information.
- passwd – makes it easy to reset a user’s password
- run_job – run a single maintenance job. Part of the jobs system.
- run_jobs – runs scheduled maintenance jobs. Specify hourly, daily, weekly, monthly. Part of the jobs system.
-
runprofileserver – starts
runserver
with hotshot/profiling tools enabled. I haven’t had a chance to check this one out, but it looks really cool.
- shell_plus – An enhanced version of the Django shell. It will autoload all your models making it easy to work with the ORM right away. I use this every day. It is so handy.
- show_urls – displays the url routes that are defined in your project. Very crude at this point.
- sqldiff – prints the (approximated) difference between an apps models and what is in the database. This is very nice, but also very experimental at the moment. It can not catch everything but it’s a great sanity check.
On the documentation front, Ido has been actively putting together some and usage instructions to help people get started. We still have quite a few undocumented commands so if you would like to pitch in, we appreciate your help.
If you like using Mercurial, Ido maintains a Mercurial repository for the project. You can find more information on using his repository on the .
I would like to thank Ido Sebastiaan van Oostveen for his help. He’s really taken a leadership role and contributed a lot of great stuff. Additionally he’s been fleshing out the documentation and managing the tickets / patches.
Finally, if you would like to get involved in the project, we’re always looking for people to help out. Feel free to . If you would like to contribute directly, please let me know.