Archive for the ‘Uncategorized’ Category

Django: When a foreign key links to a huge list of data

Imagine the following model for your Django application:
class Address(models.Model):

class Person(models.Model):
address = models.ForeignKey(Address)

The Django admin inteface for Person will show a DropDownList with many many items. For the user this is hardly usable since it will be quite cumbersome to pick the correct entry [...]

  • Share/Bookmark

Tags:

django-cms imports module that is never referenced

This one just drove me nuts so I will post it here as personal note.
If you are running a django-cms powered site where some pages have application_urls hooked into the page you have to be careful when removing the hooked up application. I for instance was using the wonderful django-contact_form application for quite a while [...]

  • Share/Bookmark

Tags: , , ,

Invalid template name in ‘extends’ tag: ”. Got this from the ‘template’ variable.

When writing a django-application that should be hooked into a django-cms page you might stumble upon this error message:
TemplateSyntaxError at /bewerben/
Invalid template name in ‘extends’ tag: ”. Got this from the ‘template’ variable.
In order to fix this you need to pass your context to the template in your view-method:
return render_to_response(
[...]

  • Share/Bookmark

Tags: , ,

Speak after me: pubsubhubbub

I read about this tongue twister a lot already and of course it sounds like a super cool new development on the internet. So: Time to activate PubSubHubbub support at my feedburner account for this blog.
For more information see:
http://code.google.com/p/pubsubhubbub/
http://adsenseforfeeds.blogspot.com/2009/07/whats-all-hubbub-about-pubsubhubbub.html

  • Share/Bookmark

Tags: ,