On 26 May 2011 10:23, Jani Tiainen <rede...@gmail.com> wrote:

> If I extend auth.User with custom profile and add automatic profile
> creation signal it works as expected.
>
> But if I try to add admin inline editor for profile when saving I get
> exception about integration violation.
>
> It happens because admin tries to create second profile for user when
> saving.
>
>
Have your signal handler check whether this is a creation of a user or an
edit. Only create the profile in the first case.

You may also need to check whether the profile already exists before trying
to create - get_or_create() is your friend here.

Malcolm

-- 
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