URL dispatcher with filter

2007-08-26 Thread tt
I have a unique situation that the traditional urls.py config does not handle very well. Imagine I have URL patterns like this: /c/(?P\d+)/foo /c/(?P\d+)/bar /c/(?P\d+)/abc ... I'm using Django authentication to ensure the user is logged in. But I have to do a custom check to ensure if that each

Re: Related object handling in save -method

2006-04-24 Thread TT
Oh, my example was buggy also. There can not be model with only ManyToManyField. It has to have some other fields which are saved in the model's own table. Otherwise the sql statement raises an error. Here is better complete example: class OtherModel(models.Model): name = models.CharField(max

Re: locale settings

2006-02-11 Thread TT
Thanks. I'll do so then.

Re: locale settings

2006-02-10 Thread TT
Well, problem is probably wrong word to use, but I'll try to be more specific. I speak finnish as my mother tongue, so my english might be confusing. First I change my language settings to finnish so gettext translation works correctly. As example I have on model with some DateTimeField: class

Re: locale settings

2006-02-09 Thread TT
Hello again. I didn't previously meant to be impolite. I'm quote new to Django and I really like it. But I was just wondering this implementation for time formatting. Seems like this considers no one else but me or I posted this to wrong group. I just wanted to ask if this really is the best way

locale settings

2006-02-07 Thread TT
I found an interesting way to handle locales in admin's date_hierarchy feature. When day_lookup (GET-parameter 'variable'__day) is part of the request, the response uses django.utils.dates.MONTH in month's name, which uses gettext to translate month names, but other requests uses Python's strftime