Keeping Up With Django


Posted

in

, , ,

It’s been quite amazing watching this framework called Django, pulled from a production environment, evolve in realtime right before my eyes. Adrian has been committing changes left and right, fixing bugs, adding features, and most importantly lowering the barrier for new users. Docs and tutorials are being clarified, things made simpler, and a few of those nagging problems are dissapearing in front of my eyes.

Yesterday Adrian modified the cookie system so that we didn’t have to add a custom setting in order to make it work. He’s also moved DJANGO_SETTINGS_MODULE to a Python variable so you should no longer have to set an environment variable in order to tel the system which module you want to run. Strike that, you still need the environment variable, the name is just user configurable. (Thanks Stefano!) And of course the addition of django-admin.py runserver lets you bypass mod_python or another WSGI-compliant server while you are just checking out the framework or during initial development.

jango team and everyone in the quickly expanding community. If you’re having trouble with something, hop on #django at Freenode, there’s probably someone else in there who has experienced the exact same thing. And don’t forget to svn up often!

Now that I’ve gone through the tutorials and have reasonably wrapped my head around the framework I plan to work on a small project to flex my newly found Django muscles.

Update:

As always, Adrian has made our lives simpler, this time with Changeset 247:

Added ‘–settings’ option to django-admin. This specifies which settings module to use, if you don’t want to deal with setting the DJANGO_SETTINGS_MODULE environment variable. Refactored django-admin to use optparse. Updated the tutorials to use ‘–settings’ instead of environment variables, which can be confusing.

Comments

6 responses to “Keeping Up With Django”

  1. Stefano J. Attardi Avatar

    “He’s also moved DJANGO_SETTINGS_MODULE to a Python variable so you should no longer have to set an environment variable in order to tel the system which module you want to run.’

    I’m afraid you misread the changeset there. If you look at the actual code, you can see he moved the *name* of the environment variable into a python variable. The variable itself has not been replaced by a python variable.

    So you still have to set an enviornment variable to get Django to work, unfortunately.

  2. Matt Croydon Avatar

    Thanks for the clarification, I’ll update my post.

  3. Colin Horsington Avatar
    Colin Horsington

    It seems that using the ‘-settings’ (or enviromental variables for that matter), django’s built-in server can only use one module at a time. For example if you are devleoping both /admin/ and /polls/ at the same time the ‘runserver’ can only use django.settings.admin or django.settings.main, when you try the URL you get a traceback to “Http404: Tried all URL patterns but didn’t find a match for…”. Unless I am missing something…

  4. Matt Croydon Avatar

    I think the best thing to do would be to use mod_python or FastCGI and just set up one for /admin and then another for /yourproject. An alernative would be to run two instances of the built-in server, say one on port 8000 for your main site and one on 8080 for your admin.

    I tend to find myself working on one component or the other so switching what’s run using –settings works pretty well for me.

  5. Tory Burch flip flop online sale.For the younger working expat women,look at these tory burch Shoes.these tory burch flip flops are definitely fun,yet the glossy design and round-toe stay these lovely.These tory burch shoes with multiple.New arrivel …

    Tory Burch flip flop online sale.For the younger working expat women,look at these tory burch Shoes.these tory burch flip flop are definitely fun,yet the glossy design and round-toe stay these lovely.These tory burch shoes with multiple.New arrivel Tor…

  6. tory burch shoe sale …

    Tory Burch is developing faster and faster.Tory Burch Boots become more and more fashional.More and more people prefer to wear shoes like this.Tory Burch is an attainable, luxury, lifestyle brand defined by classic American sportswear with an eclectic …