How about writing a decorator?

pjv ??:
> thanks again. writing that login view is what i meant by re-
> implementing the login. my terminology is probably confusing. there is
> a generic login view in django.contrib.auth.views that does what you
> are saying, only [obviously] without the custom redirect logic that i
> want. i just copied and pasted that view into my own view and modified
> the 'standard' redirect logic in it to include the test for the two
> passwords being the same. but replacing the generic view was what i
> was originally hoping to avoid in case it gets me out of sync with
> future django updates on how auth/login works.
>
> but it's probably fine, and it is currently giving me the behavior
> that i want.
>
> On Jul 18, 9:13 pm, Shawn Milochik <shawn.m...@gmail.com> wrote:
>   
>> If I understand correctly, you can do this without having to re-
>> implementing the login. You will have to make a (very simple) login  
>> template, and write a login view that contains these:
>>
>>              from django.contrib.auth import login
>>              login(request, form.get_user())
>>
>> Then you can handle the redirection however you like.
>>     
> >
>
>   

-- 
Ronghui Yu <mailto:stone...@163.com>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to