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...@
: "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
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
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
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
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
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 %}
> > --
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
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