Use registration signals http://stackoverflow.com/questions/1910359/creating-a-extended-user-profile
http://docs.b-list.org/django-registration/0.8/signals.html#registration.signals.user_registered On Aug 20, 1:17 pm, Alex <alexle...@googlemail.com> wrote: > Hi, > Thanks for great package - just stuck now on how to update app > specific user profile on /activate/complete/ > > Although I have seen the code (re ln 80 in django-registration/ > registration/views.py) I don't understand how to write the correct url > pattern and view params to pick up the activated user in my view so as > I can add some app specific data for each user. > > In the url pattern I have: > > url(r'^accounts/activate/complete/$' ,'myapp.views.profile', > name='registration_activation_complete'), > > and in the view I want this sort of thing so as I can complete the > UserProfile(this fails because the request.user is empty): > > def profile(request): > new_user = request.user > profile = UserProfile(user= new_user) > > and in the model: > > class UserProfile(models.Model): > user = models.OneToOneField(User) > st = models.DateTimeField(auto_now_add=True) > ... > > I think the problem is not understanding what my view receives from > the 'activate' redirect: > > if success_url is None: > to, args, kwargs = > backend.post_activation_redirect(request, account) > return redirect(to, *args, **kwargs) > > I have tried setting a username parameter in the url pattern and view > with no success. How should this be done? I need a - oh that's how it > works - moment. > > Any help very appreciated. > > Alex -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.