Retrieving browser information(javascript enabled)

2009-09-04 Thread skydark
I need a javascript enabled check in my templates and it's not hard to do, but I think I saw on the docs that django already gave that information through one of the frameworks api, but I don't remember which. Where in the docs is it? Or was I just dreaming?

Creating menu from self-nested list

2009-04-16 Thread skydark
I have an app in which the objects can relate to themselves and I wrote a view function that returns a nested list in a similar structure as the one accepted by the unordered_list built-in template tag. [['cat1', ['sub1',sub2]], ['cat2', ['sub3', ['sub4,[sub5]]] ]] I want more than just a simple

Unique Constraint validation on admin fails when declaring clean() method

2009-03-31 Thread skydark
I am using the clean() method to do some costum validation, but I'm getting an exception error instead of the validation error. This does not occur when I don't use declare clean(), so I must be missing something. #My model class Categoria(models.Model): nome = models.CharField('nome',