django-reversion with User Model

98 views
Skip to first unread message

Cezary Jóźwiak

unread,
Aug 22, 2017, 3:54:18 AM8/22/17
to django-reversion discussion group
Hello I have problem with use django-reversion with User model

from django.contrib import admin
from django.contrib.auth.models import User
from reversion.admin import VersionAdmin


@admin.register(User)
class UserModelAdmin(VersionAdmin):
pass


And i got error in terminal :

django.contrib.admin.sites.AlreadyRegistered: The model User is already registered

How I can fix it and rebuild to use django-reversion-compare?

Dave Hall

unread,
Aug 22, 2017, 5:37:52 AM8/22/17
to django-r...@googlegroups.com
The User model comes pre-registered with the Django admin. You need to unregister it if you want to register it again.

admin.site.unregister(User)


--
You received this message because you are subscribed to the Google Groups "django-reversion discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-reversion+unsubscribe@googlegroups.com.
To post to this group, send email to django-reversion@googlegroups.com.
Visit this group at https://groups.google.com/group/django-reversion.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages