diff options
author | Natalia Bidart <natalia.bidart@canonical.com> | 2014-08-29 16:24:57 -0300 |
---|---|---|
committer | Ricardo Kirkner <ricardo.kirkner@canonical.com> | 2014-08-29 16:24:57 -0300 |
commit | 6466fb7771dc2ffa77d06fd0672bad3023beeffc (patch) | |
tree | 6b12c68c6866f156b8391b53d2db0d7c7181391a | |
parent | bf72b5db92b19bdefbebe767f78a6908c671c97f (diff) | |
parent | f021cc230f245310786468bf039af4487f1ce0c5 (diff) |
- Added migration to add the required permission account_verified.
-rw-r--r-- | django_openid_auth/migrations/0002_add_perm_account_verified.py | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/django_openid_auth/migrations/0002_add_perm_account_verified.py b/django_openid_auth/migrations/0002_add_perm_account_verified.py new file mode 100644 index 0000000..bcf866c --- /dev/null +++ b/django_openid_auth/migrations/0002_add_perm_account_verified.py @@ -0,0 +1,85 @@ +# -*- coding: utf-8 -*- +from south.utils import datetime_utils as datetime +from south.db import db +from south.v2 import DataMigration +from django.db import models + +class Migration(DataMigration): + + def forwards(self, orm): + "Write your forwards methods here." + ct, created = orm['contenttypes.ContentType'].objects.get_or_create( + model='useropenid', app_label='django_openid_auth', + defaults=dict(name='user open id')) + perm, created = orm['auth.permission'].objects.get_or_create( + content_type=ct, codename='account_verified', + defaults=dict(name=u'The OpenID account has been verified')) + + def backwards(self, orm): + "Write your backwards methods here." + + models = { + u'auth.group': { + 'Meta': {'object_name': 'Group'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + u'auth.permission': { + 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + u'auth.user': { + 'Meta': {'object_name': 'User'}, + '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'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + u'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + u'django_openid_auth.association': { + 'Meta': {'object_name': 'Association'}, + 'assoc_type': ('django.db.models.fields.TextField', [], {'max_length': '64'}), + 'handle': ('django.db.models.fields.CharField', [], {'max_length': '255'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'issued': ('django.db.models.fields.IntegerField', [], {}), + 'lifetime': ('django.db.models.fields.IntegerField', [], {}), + 'secret': ('django.db.models.fields.TextField', [], {'max_length': '255'}), + 'server_url': ('django.db.models.fields.TextField', [], {'max_length': '2047'}) + }, + u'django_openid_auth.nonce': { + 'Meta': {'object_name': 'Nonce'}, + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'salt': ('django.db.models.fields.CharField', [], {'max_length': '40'}), + 'server_url': ('django.db.models.fields.CharField', [], {'max_length': '2047'}), + 'timestamp': ('django.db.models.fields.IntegerField', [], {}) + }, + u'django_openid_auth.useropenid': { + 'Meta': {'object_name': 'UserOpenID'}, + 'claimed_id': ('django.db.models.fields.TextField', [], {'unique': 'True', 'max_length': '2047'}), + 'display_id': ('django.db.models.fields.TextField', [], {'max_length': '2047'}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) + } + } + + complete_apps = ['contenttypes', 'auth', 'django_openid_auth'] + symmetrical = True |