Re: [Future feature?] Viewsets

2013-01-26 Thread Amirouche B.
Héllo Bertrand, Yesterday I read a Ruby on Rails tutorial and this gave me an idea of what > could IMO be a nice feature: viewsets. > I therefore started a tiny project, > django-viewsets > (djangonauts > have weird reflexes… ^^). *Everythin

Re: Viewsets

2013-01-26 Thread Anssi Kääriäinen
On 26 tammi, 12:49, "Amirouche B." wrote: > Please have a look at it, I'll do the same with multiviews and viewsets and > to try to advance the discussion further maybe merge the three of them ? Multiviews is just a proof of concept. If you see something nice in the concept, then reuse that. Othe

Re: [Future feature?] Viewsets

2013-01-26 Thread Bertrand Bordage
Hello Anssi, Amirouche, and anyone else, Glad to see I am not the only one that got this idea (nearly at the same time, btw)! Le samedi 26 janvier 2013 11:49:34 UTC+1, Amirouche B. a écrit : > > It's very interesting and it might be why a similar thing exists in the > admin but not pluggable y

Re: A.objects.getdefault

2013-01-26 Thread Mike Fogel
+1 to replacing earliest() and latest() with order_by('field').first() and .last(), respectively. I'm not a fan of the implied semantics of 'earliest' and 'latest' - as if they only worked with time-based fields. Mike On Tuesday, January 22, 2013 3:03:22 PM UTC-8, Wim Feijen wrote: > > Hi Selwi

Re: A.objects.getdefault

2013-01-26 Thread Selwin Ong
Hi Wim, I think there's a slight misunderstanding here. I completely agree with you that .first() and .last() should return None if there's no matching row :). The syntax I proposed: User.objects.exclude(a=b).filter(c=d).first('id') # Returns None if there's no matching row User.objec