diff options
| author | Tom Christie | 2012-10-09 09:57:31 +0100 |
|---|---|---|
| committer | Tom Christie | 2012-10-09 09:57:31 +0100 |
| commit | 5c17a60176d91b8ef8fa729096fd57481de7a4ea (patch) | |
| tree | 8eec620a04362380dcf2b93aa083ad1d46db6ad8 /rest_framework/authtoken/migrations | |
| parent | beea6487b214a0e40e0688a511cce5e065568632 (diff) | |
| download | django-rest-framework-5c17a60176d91b8ef8fa729096fd57481de7a4ea.tar.bz2 | |
Tweak authtoken
Diffstat (limited to 'rest_framework/authtoken/migrations')
| -rw-r--r-- | rest_framework/authtoken/migrations/0001_initial.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/rest_framework/authtoken/migrations/0001_initial.py b/rest_framework/authtoken/migrations/0001_initial.py index a91006b0..99d9eab9 100644 --- a/rest_framework/authtoken/migrations/0001_initial.py +++ b/rest_framework/authtoken/migrations/0001_initial.py @@ -11,8 +11,7 @@ class Migration(SchemaMigration): # Adding model 'Token' db.create_table('authtoken_token', ( ('key', self.gf('django.db.models.fields.CharField')(max_length=40, primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('revoked', self.gf('django.db.models.fields.BooleanField')(default=False)), + ('user', self.gf('django.db.models.fields.related.OneToOneField')(related_name='api_key', unique=True, to=orm['auth.User'])), ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), )) db.send_create_signal('authtoken', ['Token']) @@ -57,8 +56,7 @@ class Migration(SchemaMigration): 'Meta': {'object_name': 'Token'}, 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'key': ('django.db.models.fields.CharField', [], {'max_length': '40', 'primary_key': 'True'}), - 'revoked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + 'user': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'api_key'", 'unique': 'True', 'to': "orm['auth.User']"}) }, 'contenttypes.contenttype': { 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, |
