#25313: Document how to migrate from a built-in User model to a custom User 
model
-------------------------------+------------------------------------
     Reporter:  Carl Meyer     |                    Owner:  nobody
         Type:  New feature    |                   Status:  new
    Component:  Documentation  |                  Version:  1.8
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+------------------------------------

Comment (by Carsten Fuchs):

 After the change, rewriting the ContentType for the admin log's LogEntry
 instances was helpful:
 {{{
 #!python
 ./manage.py shell
 >>>
 >>> from django.contrib.admin.models import LogEntry
 >>> from django.contrib.contenttypes.models import ContentType
 >>>
 >>> auth_user = ContentType.objects.get(app_label='auth', model='user')
 >>> accouts_user = ContentType.objects.get(app_label='Accounts',
 model='user')
 >>>
 >>> for le in LogEntry.objects.filter(content_type=auth_user):
 ...     le.content_type = accouts_user
 ...     le.save()
 ...
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/25313#comment:19>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.cc87586924b01fa16d2ecb3003f49868%40djangoproject.com.

Reply via email to