Articles tagged with django

  1. Combining Multiple Models Into One Context Variable

    Posted on in Programming

    Django LogoI'm not sure if the title of this post accurately describes the problem. I have a situation where I have very similar models that I want to display in one table. As you know, querysets are limited to a single model, so it isn't possible to have a single context …

  2. Django 1.2.3 Released

    Posted on in Programming

    Django LogoThe Django team announced the release of Django 1.2.3 early this morning. All users are encouraged to upgrade as soon as possible.

    This release fixes several problems including:

    • Non-ASCII responses using cross-site request forgery (CSRF) tokens were broken by a patch applied in Django 1.2.2.
    • That …
  3. Your Django manage.py ImportError May be a Syntax Problem

    Posted on in Programming

    Django LogoBackground: While cleaning up my development directory the other day, I renamed one of my Django project directories to the domain name of the site. For the sake of argument, we'll call it django.slaptijack.com. When I descended into the directory and tried to start the development server, I …

  4. Django 1.2 is on the way

    Posted on in Programming

    Django LogoIf you're like me, you're probably really excited about the changes coming in Django 1.2. The good news is that, as of April 7th, there are only 14 outstanding issues in the Django 1.2 release candidate. Of those 14 remaining issues, it sounds like one in particular is …

  5. Limit ForeignKey to Staff Users in Django

    Posted on in Programming

    Django Logo If you've ever built a site that has different kinds of users, you've probably run across the case where you want a limited number of users to appear in a particular list. For example, you may only want staff members to be assigned ownership of a particular object. If your …

  6. No such table: django_admin_log

    Posted on in Programming

    If you get this error when trying to save something in the Django admin, it's probably because you forgot to synchronize the database after adding the admin application. If you are using a pre-1.2 version of Django, you can simply:

    $ ./managy.py syncdb
    

    Django 1.2 (which is currently …

  7. Filtering Queries in Django Templates

    Posted on in Programming

    Django LogoIn a word, you can't.

    Django was designed to keep the template system separate from the coding. This means that Django templates are mostly HTML with a bit of Django template code interspersed. This is very different from PHP where HTML and code are very tightly bound. Separating HTML development …

  8. Pinax's New Directory Structure

    Posted on in Programming

    If you've been following along, you are probably already aware the Pinax team has decided to make some radical changes to their directory structure based on input from users. I took the time to update my own Pinax project — let me show you what's changed.

    First, here's the new directory …

My Bookshelf

Reading Now

Other Stuff