Re: Multitable model inheritance

2009-09-18 Thread matehat
Hi, This kind of question belongs to Django-Users group. Django-Developers is for thread regarding the development of Django itself. Thanks On 18 sep, 04:51, nisha wrote: > Hi, > > I have my models defined like this. > > class Image(models.Model): >     description = models.CharField(max_lengt

Re: Replacing get_absolute_url, I am against it

2009-09-16 Thread matehat
Just like james has pointed out, the way urls are assembled when asked directly to models can be made relatively independent from the models themselves. I do so personally by using the "permalink" decorator and returning just a name for the right view to be matched, using the built-in named view m

Re: Customizing URL resolver

2009-09-16 Thread matehat
Oh, and trying to make the url resolving mechanism look in the database is really a bad idea because it would trigger a bunch of database queries every time a request is processed by your application, which would really slow things down. mathieu On 16 sep, 10:11, matehat wrote: > Hi, >

Re: Customizing URL resolver

2009-09-16 Thread matehat
Hi, If the url only depends on the object's id (which I suppose don't change with time), you should not have it put in the database at first, because the object's id alone takes care of its persistence. Then, plugging it into Django's url resolving mechanism becomes really easy with the well-docu

Re: Replacing get_absolute_url, I am against it

2009-09-12 Thread matehat
> One of the major advantages of URLObject is that it directly > subclasses unicode, so you can use it everywhere strings are used, but > it still has those handy methods and properties for manipulating/ > querying the URL. I agree that a unicode subclass for holding the url-related data is a rea

Re: pagination django

2009-03-26 Thread matehat
Just a quick thought (though I also think the question should have been asked on the Django-Users mailing list). The template tag {% cycle %} allows you to alternate between any number of values everytime it is encountered, so putting something like : {% for product in product_list %} // a sin

post_update signal on queryset

2008-12-18 Thread matehat
Hi, for a open pluggable I preparing for flexible and efficient searching capabilities, I needed a signal for update methods done on querysets (to track any changes done to a model). So I created a ticket and made the necessary patches. Check it out : #9885. --~--~-~--~~~-