Browsed by
Month: July 2008

>Django – Named URLS Gotcha

>Django – Named URLS Gotcha

>A post in two parts. First of all – thanks to Magus on #django for pointing out one of my errors to me. I’ve been working through Practical Django Projects over the last couple of days and it talks about having named urls. Take a look at these three one liners: # from urls.links.py (r’^$’, ‘archive_index’,link_info_dict, ‘coltrane_link_archive_index’), # from urls.py (r’^weblog/links/’, include(‘coltrane.urls.links’)),# In my template I get the url using {% url coltrane_link_archive_index %} We give our view a name…

Read More Read More

>NewForms Admin – Flatpages

>NewForms Admin – Flatpages

>Practical Django Projects (Chapter three), talks about defining an admin interface which is all well and good unless you’re using the NewForms Admin branch (which is intended to become part of Release 1.0). So if you’re an early adopter or reading this after the big change, you’ll be needing to do the following. The reason I bothered writing this was I couldn’t work out how to override the fact that FlatPage had already registered a ModelAdmin (try to register yours…

Read More Read More