Saturday, May 31, 2014

Re: Django auth customing error

In your helpdesk app you have leftover references to auth.User. Replace all of them with something like this:

user = models.ForeignKey(settings.AUTH_USER_MODEL)

K


On Saturday, May 31, 2014 6:25:28 AM UTC-7, Jackie wrote:
I want to custom the django auth app, since the default auth app can not meet our project's requierment. Then I figure it out on my own by checking the django document at here.https://docs.djangoproject.com/en/1.6/topics/auth/customizing/#a-full-example. I tried to do that example exactly. Finally, I added AUTH_USER_MODEL = "intelic_auth.MyUser" setting in my settings.py. But I got this error below when I tried to run "python manage.py syncdb". I don't know why. I would be very appreciated if someone can help me figure it out.

CommandError: One or more models did not validate:    helpdesk.ticket: 'assigned_to' defines a relation with the model 'auth.User', which has been swapped out. Update the relation to point at settings.AUTH_USER_MODEL.    helpdesk.followup: 'user' defines a relation with the model 'auth.User', which has been swapped out. Update the relation to point at settings.AUTH_USER_MODEL.    helpdesk.savedsearch: 'user' defines a relation with the model 'auth.User', which has been swapped out. Update the relation to point at settings.AUTH_USER_MODEL.    helpdesk.usersettings: 'user' defines a relation with the model 'auth.User', which has been swapped out. Update the relation to point at settings.AUTH_USER_MODEL.    helpdesk.ticketcc: 'user' defines a relation with the model 'auth.User', which has been swapped out. Update the relation to point at settings.AUTH_USER_MODEL.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d8408fff-38e1-4ed7-9c85-5e8d3ee610f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment