Merge lp:~nataliabidart/django-openid-auth/add-migration-for-perm-account-verified into lp:~django-openid-auth/django-openid-auth/trunk

Proposed by Natalia Bidart
Status: Merged
Approved by: Ricardo Kirkner
Approved revision: 112
Merged at revision: 111
Proposed branch: lp:~nataliabidart/django-openid-auth/add-migration-for-perm-account-verified
Merge into: lp:~django-openid-auth/django-openid-auth/trunk
Diff against target: 89 lines (+85/-0)
1 file modified
django_openid_auth/migrations/0002_add_perm_account_verified.py (+85/-0)
To merge this branch: bzr merge lp:~nataliabidart/django-openid-auth/add-migration-for-perm-account-verified
Reviewer Review Type Date Requested Status
Ricardo Kirkner Approve
Matias Bordese (community) Approve
Review via email: mp+232727@code.launchpad.net

Commit message

- Added migration to add the required permission account_verified.

To post a comment you must log in.
112. By Natalia Bidart

Removed debug print.

Revision history for this message
Matias Bordese (matiasb) wrote :

LGTM

review: Approve
Revision history for this message
Ricardo Kirkner (ricardokirkner) wrote :

Rubber stamping

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'django_openid_auth/migrations/0002_add_perm_account_verified.py'
2--- django_openid_auth/migrations/0002_add_perm_account_verified.py 1970-01-01 00:00:00 +0000
3+++ django_openid_auth/migrations/0002_add_perm_account_verified.py 2014-08-29 16:51:51 +0000
4@@ -0,0 +1,85 @@
5+# -*- coding: utf-8 -*-
6+from south.utils import datetime_utils as datetime
7+from south.db import db
8+from south.v2 import DataMigration
9+from django.db import models
10+
11+class Migration(DataMigration):
12+
13+ def forwards(self, orm):
14+ "Write your forwards methods here."
15+ ct, created = orm['contenttypes.ContentType'].objects.get_or_create(
16+ model='useropenid', app_label='django_openid_auth',
17+ defaults=dict(name='user open id'))
18+ perm, created = orm['auth.permission'].objects.get_or_create(
19+ content_type=ct, codename='account_verified',
20+ defaults=dict(name=u'The OpenID account has been verified'))
21+
22+ def backwards(self, orm):
23+ "Write your backwards methods here."
24+
25+ models = {
26+ u'auth.group': {
27+ 'Meta': {'object_name': 'Group'},
28+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
29+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
30+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
31+ },
32+ u'auth.permission': {
33+ 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
34+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
35+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
36+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
37+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
38+ },
39+ u'auth.user': {
40+ 'Meta': {'object_name': 'User'},
41+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
42+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
43+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
44+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
45+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
46+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
47+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
48+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
49+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
50+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
51+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
52+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
53+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
54+ },
55+ u'contenttypes.contenttype': {
56+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
57+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
58+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
59+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
60+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
61+ },
62+ u'django_openid_auth.association': {
63+ 'Meta': {'object_name': 'Association'},
64+ 'assoc_type': ('django.db.models.fields.TextField', [], {'max_length': '64'}),
65+ 'handle': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
66+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
67+ 'issued': ('django.db.models.fields.IntegerField', [], {}),
68+ 'lifetime': ('django.db.models.fields.IntegerField', [], {}),
69+ 'secret': ('django.db.models.fields.TextField', [], {'max_length': '255'}),
70+ 'server_url': ('django.db.models.fields.TextField', [], {'max_length': '2047'})
71+ },
72+ u'django_openid_auth.nonce': {
73+ 'Meta': {'object_name': 'Nonce'},
74+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
75+ 'salt': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
76+ 'server_url': ('django.db.models.fields.CharField', [], {'max_length': '2047'}),
77+ 'timestamp': ('django.db.models.fields.IntegerField', [], {})
78+ },
79+ u'django_openid_auth.useropenid': {
80+ 'Meta': {'object_name': 'UserOpenID'},
81+ 'claimed_id': ('django.db.models.fields.TextField', [], {'unique': 'True', 'max_length': '2047'}),
82+ 'display_id': ('django.db.models.fields.TextField', [], {'max_length': '2047'}),
83+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
84+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
85+ }
86+ }
87+
88+ complete_apps = ['contenttypes', 'auth', 'django_openid_auth']
89+ symmetrical = True

Subscribers

People subscribed via source and target branches