Hello NoviceSortOf, On Jan 20, 8:42 am, NoviceSortOf <jons...@well.com> wrote:
> * django-registration is installed and works great Yes, it is! Thank you James Bennett! > * i'd suspect that somewhere in models.py there would be a hook for > this, > there is reference to something called profile_callback that seems > like it > might be clue to this but I can't figure it out from the docs and > code > I've read so far. You can use profile_callback like... from accounts.models import UserProfile url ( r'^accounts/register/$', 'registration.views.register', { 'profile_callback': UserProfile.objects.create }, name = 'registration_register' ), ( r'^accounts/', include ( 'registration.urls' ) ), ...in urls.py. I'll mention here that the current development version of registration is dropping profile_callback in favor of using signals. You may want to code in such a way that you can easily change to using the signals if you update registration in the future. An alternative would be to not use the profile_callback and use Django's built-in signals. Something like... from django.db import models class UserProfile etc, etc, etc... def add_user_profile ( sender, instance, created, **kwargs ): if created: user_profile = UserProfile ( user = instance ) user_profile.save ( ) models.signals.post_save.connect ( add_user_profile, sender = User ) ...in account/models.py. The above code fragments will need to be altered and filled out to suite your needs. Hopefully they give you some ideas. Toodle-looooooooo............ creecode --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---