Re: Viewsets

2013-01-31 Thread Anssi Kääriäinen
On 28 tammi, 21:08, Bertrand Bordage wrote: > > I know this answer isn't wanted... But testing different > > implementations outside Django core/contrib is IMHO the right way to > > go. > > OK, so, discussion closed. My intention wasn't to stop discussion about this

Re: Viewsets

2013-01-31 Thread Amirouche Boubekki
Héllo Anssi, 2013/1/31 Anssi Kääriäinen > On 28 tammi, 21:08, Bertrand Bordage > wrote: > > > I know this answer isn't wanted... But testing different > > > implementations outside Django core/contrib is IMHO the right way to > > > go. > > >

Re: Form.set_data method

2013-01-31 Thread Byron Ruth
I don't understand your argument regarding overriding `__init__`. Nothing has changed in __init__, the logic for setting `data` and `files` is simply moved to a method. You _can_ still pass `request.POST` and `request.FILES` into the constructor. If a user extends __init__ (I do it all the

Re: Possible ORM bug with SQL syntax & generic relations

2013-01-31 Thread Dylan Klomparens
Ah, after a second look, yes you are right, it was a transcription error with the number of parenthesis. Apologies for the confusion! I've attached the model admin. The Django version is: >>> import django >>> django.VERSION (1, 5, 0, 'rc', 1) -- Dylan On Thu, Jan 31, 2013 at 2:04 AM, Ian

Re: Simplify the default project template

2013-01-31 Thread Josh Cartmell
Long time lurker here. Anyways, one thing that I think might trip up beginners is this line: # Quick-start development settings - unsuitable for production For a beginner that could be a very daunting statement that could leave them wondering: Why is this unsuitable for production and what is

Re: Form.set_data method

2013-01-31 Thread Alex Ogier
Byron, I think Shai is suggesting that a user's form class may do extra processing in __init__ on the data and files fields. If someone starts using the new pattern in their views, it will break those classes because they expect the initializer to be called with valid data when there is any. Your

Re: Form.set_data method

2013-01-31 Thread Byron Ruth
I don't want to belabor our difference in understanding/opinion, but there are two ways to extend __init__. Processing before super is called, and processing after super is called: # Common pre-processing.. class MyForm(forms.Form): def __init__(self, request, *args, **kwargs): #

Re: Possible ORM bug with SQL syntax & generic relations

2013-01-31 Thread Dylan Klomparens
I have confirmed that removing the ordering line from the Meta class of the model hides this bug. It looks as though your first assessment was spot on, Ian :-). On Thu, Jan 31, 2013 at 11:40 AM, Dylan Klomparens < dylan.klompar...@gmail.com> wrote: > Some additional information: here is the

Re: Simplify the default project template

2013-01-31 Thread Aymeric Augustin
Le 31 janv. 2013 à 17:46, Josh Cartmell a écrit : > I think a little more explanation regarding it's unsuitability would > make it a lot less scary. In line with what you have done here it > might make sense to add a new section to the docs describing how to > make the

Re: Form.set_data method

2013-01-31 Thread Alex Ogier
The problem is that if you use your idiom, data and files are None when the class is instantiated. This is currently a sign that the form has no data attached. Currently, if you want to massage input data before cleaning, you do it using either form of of overriding __init__ as you describe. But

Re: [Future feature?] Viewsets

2013-01-31 Thread Wim Feijen
Hi, Just wanted to draw your attention to a proposal made by Zachary Voase, which you might be unaware of. It has no code, but is just a proposal, having a very clean api IMHO. http://zacharyvoase.com/2013/01/22/django-objviews/ Cheers, Wim On Saturday, 26 January 2013 04:04:57 UTC+1,

Re: cycle in nested loops

2013-01-31 Thread Aymeric Augustin
Hi Wim, Le 21 janv. 2013 à 18:01, Wim Feijen a écrit : > Actually, the current behaviour is not to reset between loops. Is that > intentional? Yes, this behavior is intentional. See Malcolm's comment (#4) on the ticket. > A patch to ticket 5908 adds a reset_cycle tag,

Next steps for ticket #18150

2013-01-31 Thread Steven Vargas
Hi, I'm a student and this is my first contribution to an open source project so I am trying to learn along the way. Anyways, I submitted a patch for #18150and I was looking for input on where to go from here. On the IRC channel it was suggested

Re: Form.set_data method

2013-01-31 Thread Yo-Yo Ma
With all respect, this seems like a bad idea; there would be little, if any, gain from having this method. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: Next steps for ticket #18150

2013-01-31 Thread Russell Keith-Magee
On Fri, Feb 1, 2013 at 10:25 AM, Steven Vargas wrote: > Hi, I'm a student and this is my first contribution to an open source > project so I am trying to learn along the way. > > Anyways, I submitted a patch for > #18150and I