@Andy, I agree, it's perfectly possible to create you own auth backend now, so theres no need to change it if new views are sceduled. It just felt as a repetitive exercise
@Florian, The other context variables should be dynamic aswell. I don't agree with your template logic. Django always seems to pass this 'form' name in, which is a problem when you have a page with multiple forms coming form django itself (for example: registration and auth). Ofcourse there's logic workarounds, but still, I don't think those should be hardcoded. Hedde Op 24 mei 2012, om 14:57 heeft Andrew Ingram het volgende geschreven: > It seems to me there'd be more mileage in making new class-based > versions of the auth views. > > - Andy > > On 24 May 2012 13:51, Florian Apolloner <[email protected]> wrote: >> Hi, >> >> -1 from me here. >> >> A) why don't you have site_name_name etc (those are still fixed). >> B) templates need to be able to rely on a name, if your template expects a >> different name user {% with form as my_form %} >> >> Cheers, >> Florian >> >> >> On Wednesday, May 23, 2012 1:02:53 PM UTC+2, Hedde van der Heide wrote: >>> >>> I couldn't find an existing ticket but I'd like to suggest a change to >>> make the basic auth view more dynamic (I'm not fond of hardcoded context >>> variables :-)) >>> >>> change: >>> >>> def login(request, template_name='registration/login.html', >>> redirect_field_name=REDIRECT_FIELD_NAME, >>> authentication_form=AuthenticationForm, >>> current_app=None, extra_context=None): >>> >>> to: >>> >>> def login(request, template_name='registration/login.html', >>> redirect_field_name=REDIRECT_FIELD_NAME, >>> authentication_form=AuthenticationForm, >>> current_app=None, extra_context=None, form_name='form'): >>> >>> >>> and obviously: >>> >>> context = { >>> form_name: form, >>> redirect_field_name: redirect_to, >>> 'site': current_site, >>> 'site_name': current_site.name, >>> } >>> >>> >>> Kind Regards, >>> >>> Hedde van der Heide >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django developers" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/django-developers/-/9xWEYMsvTU8J. >> >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/django-developers?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/django-developers?hl=en. > Met vriendelijke groet, Hedde van der Heide Developer & Sales intellimedia.nl [T] +31(0)6 - 11 717 441 [E] [email protected] --- TWITTER @intelli_media -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
