Commit 91c0249c by Jonas Liljestrand

fixed migration to support django 1.5

parent 9f378d0d
...@@ -3,6 +3,7 @@ import datetime ...@@ -3,6 +3,7 @@ import datetime
from south.db import db from south.db import db
from south.v2 import SchemaMigration from south.v2 import SchemaMigration
from django.db import models from django.db import models
from rest_framework.compat import User
class Migration(SchemaMigration): class Migration(SchemaMigration):
...@@ -11,7 +12,7 @@ class Migration(SchemaMigration): ...@@ -11,7 +12,7 @@ class Migration(SchemaMigration):
# Adding model 'Token' # Adding model 'Token'
db.create_table('authtoken_token', ( db.create_table('authtoken_token', (
('key', self.gf('django.db.models.fields.CharField')(max_length=40, primary_key=True)), ('key', self.gf('django.db.models.fields.CharField')(max_length=40, primary_key=True)),
('user', self.gf('django.db.models.fields.related.OneToOneField')(related_name='auth_token', unique=True, to=orm['auth.User'])), ('user', self.gf('django.db.models.fields.related.OneToOneField')(related_name='auth_token', unique=True, to=orm["%s.%s" % (User._meta.app_label, User._meta.object_name)])),
('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
)) ))
db.send_create_signal('authtoken', ['Token']) db.send_create_signal('authtoken', ['Token'])
......
...@@ -38,7 +38,7 @@ else: ...@@ -38,7 +38,7 @@ else:
try: try:
from django.contrib.auth.models import User from django.contrib.auth.models import User
except ImportError: except ImportError:
raise ImportError('User model is not to be found.') raise ImportError(u"User model is not to be found.")
# First implementation of Django class-based views did not include head method # First implementation of Django class-based views did not include head method
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment