you can use process_response(self,request,response) in the process_response, you can do : if requst.user is in the first-login table, you can redirect URL to change-passwd page
a little suggestion, pjv 写道: > i thought of something along those lines. that's exactly the kind of > thing that i was originally searching for -- a way to do it without > cluttering things up and without building a bunch of unnecessary > infrastructure or hacking core django code. > > unfortunately, when you do those nice reset emails, the token that > gets generated is only good for ten minutes. since we'll be triggering > the email to go out to a bunch of users, there is no way to know when > they will get the email or respond to it. > > it would be really cool if there were a checkbox on the standard > django user admin page that said "Force password change on next > login". > > On Jul 26, 10:54 am, Roland van Laar <[email protected]> wrote: > >> Ronghui Yu wrote: >> >>> How about writing a decorator? >>> >> That's possible, although there is an easier way: >> >> The best way imho is to generate a random password when you >> create the user, and to send them a password reset email. >> Which can be implemented using django.contrib.auth. >> >> That way they don't have to know the random password, and >> they can't login until they have set a new password. >> >> And that way there is no need to have extra fields in the models. >> >> Regards, >> >> Roland van Laar >> > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" 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-users?hl=en -~----------~----~----~----~------~----~------~--~---

