Commits

Alexey Nikitin committed 1fa4210

Fix dashboard initinal migration for custom user model.

Comments (0)

Files changed (1)

admin_tools/dashboard/migrations/0001_initial.py

 from south.v2 import SchemaMigration
 from django.db import models
 from django.conf import settings
+from django.contrib.auth import get_user_model
+from south import modelsinspector
 
 user_model = getattr(settings, 'AUTH_USER_MODEL', 'auth.User')
 
             'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
         },
         user_model: {
-            'Meta': {'object_name': user_model.split('.')[1]},
+            'Meta': modelsinspector.get_model_meta(get_user_model()),
             'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
             'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
             'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),