Re: #6735 -- Class based generic views: call for comment

2010-10-03 Thread André Eriksson
I should add.. The bonus of using class-based decorators is that decorated views can be subclassed. All other functionality is retained. -- 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...@

Re: #6735 -- Class based generic views: call for comment

2010-10-03 Thread André Eriksson
: "a" in u.username.lower())) class MyView3(LoginRequiredView, AUsersView): """ View that requires users to be logged in and have a username that contain an 'a'. """ def __init__(self, request): self.request = request def vi

Re: #6735 -- Class based generic views: call for comment

2010-10-03 Thread André Eriksson
def __init__(self, request): self.request = request def view(self): return HttpResponse(self.request.path) urlpatterns = patterns("", ("^login_required_view/$", login_required(MyView))) Best regards, André Eriksson -- You received this message because you a

Re: #6735 -- Class based generic views: call for comment

2010-10-02 Thread André Eriksson
the method above). Forgive me if the solution above has some flaws I can't see that have already brought up, but to me it seems to have some good qualities. Best regards, André Eriksson -- You received this message because you are subscribed to the Google Groups "Django developers&qu

Re: Proposal: Revised form rendering

2010-07-12 Thread André Eriksson
It appears my reply got eaten so I'm trying again. On Jul 12, 3:43 pm, Russell Keith-Magee wrote: > I'm having difficulty reconciling these two positions. My template tag > is too complex because it requires you to remember the idiom FORM X > FIELD Y USING Z; but a nested tag structure with 4 dif

Re: Proposal: Revised form rendering

2010-07-12 Thread André Eriksson
On Jul 12, 3:43 pm, Russell Keith-Magee wrote: > > Andre's idea is interesting and is certainly more readable. > > I'm having difficulty reconciling these two positions. My template tag > is too complex because it requires you to remember the idiom FORM X > FIELD Y USING Z; but a nested tag struct

Re: Proposal: Revised form rendering

2010-07-11 Thread André Eriksson
On Jul 12, 5:27 am, Javier Guerra Giraldez wrote: > > 1) It introduces a clearer way of laying out settings. > > 2) It leverages the template engine for specifying defaults in a > > simple but ingenious way: > > {% form myform %} > >    {% include "form_settings.django" %} > > {% endform %} > > --

Re: Proposal: Revised form rendering

2010-07-11 Thread André Eriksson
Good proposal overall. One thought I have in order to try and combat the massive parameter list of {% form %} is to optionally add an ending tag, as well as sub-tags: {% form myform %} {% using birthday=calendar %} {% renderer "as_ul" %} {% autocomplete "name_autocomplete" %} {% do

Re: Custom FilterSpecs #5833 planned for Django 1.1?

2009-02-16 Thread André Eriksson
On Feb 10, 5:43 am, Malcolm Tredinnick wrote: > Ignoring portions of a URL sounds pretty broken. Our goal isn't to be > like other frameworks. It's to behave correctly, in accordance with best > practices for things like URL construction and consumption. I would be a > little unhappy with 'ignori