> > On Mon, Oct 4, 2010 at 8:08 AM, Andrew Godwin <and...@aeracode.org> wrote:
> > I'd just like to add more noise to the signal and reiterate this - storing > state on self (or request) leads to much cleaner, less fragile, more > subclassable views (in my own experience, having written both a set of > generic views with and without state like this). > >> > I personally think self is the place to store this state (since, as Russ > keeps saying, that's how nearly all Python classes do it), but storing it on > request isn't too bad - it just "feels" more wrong to me, but then, > middleware does it already. > > I haven't picked up the brush/spraycan yet, preferring instead to allow those smarter than me to decide the color scheme for this particular bike shed. :-) > Seriously though, the key considerations and points made in this thread need to be extracted and put somewhere in the django docs, preferably in a place that doesn't distract a brand new user but also gets read soon after they complete the tutorial and begin digging a little deeper. Knowing the design considerations that went into whatever path is taken is, IMHO, invaluable. > I am willing to do the work to make that happen if nobody else is interested. I have not yet contributed to the corpus of django documentation, but perhaps this an opportunity to do so. > > However, subjectivity isn't going to win through here. Either solution is > fine, just don't force me to pass everything around as arguments between > functions. That's not looking likely, but some people here seen to want to > have that kind of purity at the expense of usability - dammit, Jim, I'm an > engineer, not a mathematician. > > +1 -- Warren Smith -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.