profile_callback, defined in registration.models (of course, you  
could also define it somewhere else ...)

from www.user.models import UserProfile
...

def profile_callback(user):
        new_user_profile = UserProfile.objects.create(user=user,
                                                     status="1")
        new_user_profile.save()

hope that helps,
patrick




Am 19.06.2007 um 20:13 schrieb [EMAIL PROTECTED]:

>
> Patrick, could you share your def profile_callback, or at least the
> important parts of it. I'm still not getting anything created.
>
> On Jun 19, 1:04 pm, "patrick k." <[EMAIL PROTECTED]> wrote:
>> I´m using profile_callback=True and then def profile_callback 
>> (user) ...
>>
>> it works.
>>
>> patrick
>>
>> Am 19.06.2007 um 20:02 schrieb [EMAIL PROTECTED]:
>>
>>
>>
>>> I've set:
>>> def create_inactive_user(self, username, password, email,
>>> send_email=True, profile_callback=create_site_user):
>>
>>> also tried profile_callback=create_site_user() -- wrong number of
>>> arguments and profile_callback=create_site_user(new_user) but  
>>> new_user
>>> doesn't exist yet.
>>
>>> I have a create_site_user function:
>>
>>> def create_site_user(new_user):
>>>         site_user = SiteUser.model(
>>>             user = new_user,
>>>             city = '',
>>>             state = '',
>>>             country = '',
>>>             zip = '',
>>>             show_real_name = True,
>>>             interests = '',
>>>             occupation = '',
>>>             gender = '',
>>>             birthday = None,
>>>             homepage = '',
>>>             icq = '',
>>>             aim = '',
>>>             yahoo = '',
>>>             msn = ''
>>>             )
>>>         site_user.save()
>>
>>> But I can't seem to get this to work.
>>> profile_callback=create_site_user doesn't seem to call the function
>>> (there's definitely nothing being created), and I can't pass the  
>>> user,
>>> since they don't really exist yet.
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to