Re: @url tag - getting rid of urlpatterns

2007-08-30 Thread Ilya Semenov
Ivan, Thanks for reviewing the snippet. > While the decorator looks nice it creates in my opinion at least as many > problems as it solves. > > 1. You can apply decorators only to custom views, not to generic views. > And as generic views are commonly used one still should keep a separate >

@url tag - getting rid of urlpatterns

2007-08-29 Thread Ilya Semenov
I've been using django for almost a year and I was always frustrated by its cumbersome urlpatterns system. While it is really flexible, it doesn't provide any shortcuts for widely-used url and views naming schemes. Let me show in examples what I mean. As everyone, I started with the tutorial

Re: Mysql sleeping queries

2007-06-21 Thread Ilya Semenov
Malcolm, I traced the problem and submitted the patch, see details at http://code.djangoproject.com/ticket/4650 I'm not completely sure about the logic of signals though, the change may affect some middleware depending on it. --~--~-~--~~~---~--~~ You received

Re: Mysql sleeping queries

2007-06-20 Thread Ilya Semenov
Malcolm, I'm having exactly the same problem. Under Apache+mod_python, each HTTP request keeps a stale MySQL connection. I traced the changeset, it was 5481->4582. I put some logging to django.db.backends.mysql.base: self.connection = Database.connect(**kwargs) + log.msg("connected to

Re: select_related() and null=True

2007-03-06 Thread Ilya Semenov
David Cramer wrote: > but I strongly encourage you to find a > differently solution, as LEFT JOINs can be VERY costly on system > resources. I realize that under some circumstances, LEFT JOINs can be costly. However, I don't hink my case is such. Let me recall the (I believe very simple) model: