Revision 2b80cfeb
b/snf-astakos-app/astakos/im/migrations/0044_increase_username_length.py | ||
---|---|---|
1 |
# encoding: utf-8 |
|
2 |
import datetime |
|
3 |
from south.db import db |
|
4 |
from south.v2 import SchemaMigration |
|
5 |
from django.db import models |
|
6 |
|
|
7 |
class Migration(SchemaMigration): |
|
8 |
|
|
9 |
def forwards(self, orm): |
|
10 |
db.alter_column('auth_user', 'username', models.CharField(max_length=75)) |
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
def backwards(self, orm): |
|
15 |
db.alter_column('auth_user', 'username', models.CharField(max_length=30)) |
|
16 |
|
|
17 |
|
|
18 |
models = { |
|
19 |
'auth.group': { |
|
20 |
'Meta': {'object_name': 'Group'}, |
|
21 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
22 |
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), |
|
23 |
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) |
|
24 |
}, |
|
25 |
'auth.permission': { |
|
26 |
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, |
|
27 |
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
|
28 |
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), |
|
29 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
30 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) |
|
31 |
}, |
|
32 |
'auth.user': { |
|
33 |
'Meta': {'object_name': 'User'}, |
|
34 |
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
|
35 |
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), |
|
36 |
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
|
37 |
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), |
|
38 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
39 |
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), |
|
40 |
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
41 |
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
42 |
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
|
43 |
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
|
44 |
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), |
|
45 |
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), |
|
46 |
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '75'}) |
|
47 |
}, |
|
48 |
'contenttypes.contenttype': { |
|
49 |
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, |
|
50 |
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
|
51 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
52 |
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
|
53 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) |
|
54 |
}, |
|
55 |
'im.additionalmail': { |
|
56 |
'Meta': {'object_name': 'AdditionalMail'}, |
|
57 |
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), |
|
58 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
59 |
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}) |
|
60 |
}, |
|
61 |
'im.approvalterms': { |
|
62 |
'Meta': {'object_name': 'ApprovalTerms'}, |
|
63 |
'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 12, 28, 9, 53, 50, 925949)', 'db_index': 'True'}), |
|
64 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
65 |
'location': ('django.db.models.fields.CharField', [], {'max_length': '255'}) |
|
66 |
}, |
|
67 |
'im.astakosuser': { |
|
68 |
'Meta': {'object_name': 'AstakosUser', '_ormbases': ['auth.User']}, |
|
69 |
'activation_sent': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), |
|
70 |
'affiliation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
71 |
'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), |
|
72 |
'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), |
|
73 |
'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), |
|
74 |
'date_signed_terms': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), |
|
75 |
'disturbed_quota': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), |
|
76 |
'email_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
77 |
'has_credits': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
78 |
'has_signed_terms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
79 |
'invitations': ('django.db.models.fields.IntegerField', [], {'default': '100'}), |
|
80 |
'is_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
81 |
'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}), |
|
82 |
'policy': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.AstakosUserQuota']", 'symmetrical': 'False'}), |
|
83 |
'provider': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
84 |
'third_party_identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
85 |
'updated': ('django.db.models.fields.DateTimeField', [], {}), |
|
86 |
'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}), |
|
87 |
'uuid': ('django.db.models.fields.CharField', [], {'max_length': '255', 'unique': 'True', 'null': 'True'}) |
|
88 |
}, |
|
89 |
'im.astakosuserauthprovider': { |
|
90 |
'Meta': {'ordering': "('module', 'created')", 'unique_together': "(('identifier', 'module', 'user'),)", 'object_name': 'AstakosUserAuthProvider'}, |
|
91 |
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), |
|
92 |
'affiliation': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
93 |
'auth_backend': ('django.db.models.fields.CharField', [], {'default': "'astakos'", 'max_length': '255'}), |
|
94 |
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
|
95 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
96 |
'identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
97 |
'info_data': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), |
|
98 |
'module': ('django.db.models.fields.CharField', [], {'default': "'local'", 'max_length': '255'}), |
|
99 |
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'auth_providers'", 'to': "orm['im.AstakosUser']"}) |
|
100 |
}, |
|
101 |
'im.astakosuserquota': { |
|
102 |
'Meta': {'unique_together': "(('resource', 'user'),)", 'object_name': 'AstakosUserQuota'}, |
|
103 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
104 |
'limit': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), |
|
105 |
'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"}), |
|
106 |
'uplimit': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
107 |
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}) |
|
108 |
}, |
|
109 |
'im.emailchange': { |
|
110 |
'Meta': {'object_name': 'EmailChange'}, |
|
111 |
'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40', 'db_index': 'True'}), |
|
112 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
113 |
'new_email_address': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), |
|
114 |
'requested_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 12, 28, 9, 53, 50, 927617)'}), |
|
115 |
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'emailchanges'", 'unique': 'True', 'to': "orm['im.AstakosUser']"}) |
|
116 |
}, |
|
117 |
'im.invitation': { |
|
118 |
'Meta': {'object_name': 'Invitation'}, |
|
119 |
'code': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True'}), |
|
120 |
'consumed': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), |
|
121 |
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
|
122 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
123 |
'inviter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'invitations_sent'", 'null': 'True', 'to': "orm['im.AstakosUser']"}), |
|
124 |
'is_consumed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
125 |
'realname': ('django.db.models.fields.CharField', [], {'max_length': '255'}), |
|
126 |
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) |
|
127 |
}, |
|
128 |
'im.memberjoinpolicy': { |
|
129 |
'Meta': {'object_name': 'MemberJoinPolicy'}, |
|
130 |
'description': ('django.db.models.fields.CharField', [], {'max_length': '80'}), |
|
131 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
132 |
'policy': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) |
|
133 |
}, |
|
134 |
'im.memberleavepolicy': { |
|
135 |
'Meta': {'object_name': 'MemberLeavePolicy'}, |
|
136 |
'description': ('django.db.models.fields.CharField', [], {'max_length': '80'}), |
|
137 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
138 |
'policy': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) |
|
139 |
}, |
|
140 |
'im.pendingthirdpartyuser': { |
|
141 |
'Meta': {'unique_together': "(('provider', 'third_party_identifier'),)", 'object_name': 'PendingThirdPartyUser'}, |
|
142 |
'affiliation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), |
|
143 |
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), |
|
144 |
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}), |
|
145 |
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
|
146 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
147 |
'info': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), |
|
148 |
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
|
149 |
'provider': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), |
|
150 |
'third_party_identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
151 |
'token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
152 |
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) |
|
153 |
}, |
|
154 |
'im.project': { |
|
155 |
'Meta': {'object_name': 'Project'}, |
|
156 |
'application': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'project'", 'unique': 'True', 'to': "orm['im.ProjectApplication']"}), |
|
157 |
'creation_date': ('django.db.models.fields.DateTimeField', [], {}), |
|
158 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
159 |
'last_approval_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), |
|
160 |
'members': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.AstakosUser']", 'through': "orm['im.ProjectMembership']", 'symmetrical': 'False'}), |
|
161 |
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80', 'db_index': 'True'}), |
|
162 |
'termination_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), |
|
163 |
'termination_start_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) |
|
164 |
}, |
|
165 |
'im.projectapplication': { |
|
166 |
'Meta': {'object_name': 'ProjectApplication'}, |
|
167 |
'applicant': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'projects_applied'", 'to': "orm['im.AstakosUser']"}), |
|
168 |
'comments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), |
|
169 |
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), |
|
170 |
'end_date': ('django.db.models.fields.DateTimeField', [], {}), |
|
171 |
'homepage': ('django.db.models.fields.URLField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
172 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
173 |
'issue_date': ('django.db.models.fields.DateTimeField', [], {}), |
|
174 |
'limit_on_members_number': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}), |
|
175 |
'member_join_policy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.MemberJoinPolicy']"}), |
|
176 |
'member_leave_policy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.MemberLeavePolicy']"}), |
|
177 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}), |
|
178 |
'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'projects_owned'", 'to': "orm['im.AstakosUser']"}), |
|
179 |
'precursor_application': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['im.ProjectApplication']", 'unique': 'True', 'null': 'True', 'blank': 'True'}), |
|
180 |
'resource_grants': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.ProjectResourceGrant']", 'blank': 'True'}), |
|
181 |
'start_date': ('django.db.models.fields.DateTimeField', [], {}), |
|
182 |
'state': ('django.db.models.fields.CharField', [], {'default': "'Unknown'", 'max_length': '80'}) |
|
183 |
}, |
|
184 |
'im.projectmembership': { |
|
185 |
'Meta': {'unique_together': "(('person', 'project'),)", 'object_name': 'ProjectMembership'}, |
|
186 |
'acceptance_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'db_index': 'True'}), |
|
187 |
'application': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'memberships'", 'null': 'True', 'to': "orm['im.ProjectApplication']"}), |
|
188 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
189 |
'leave_request_date': ('django.db.models.fields.DateField', [], {'null': 'True'}), |
|
190 |
'pending_application': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pending_memebrships'", 'null': 'True', 'to': "orm['im.ProjectApplication']"}), |
|
191 |
'pending_serial': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'db_index': 'True'}), |
|
192 |
'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}), |
|
193 |
'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Project']"}), |
|
194 |
'request_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2012, 12, 28, 9, 53, 50, 935918)'}), |
|
195 |
'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}) |
|
196 |
}, |
|
197 |
'im.projectmembershiphistory': { |
|
198 |
'Meta': {'object_name': 'ProjectMembershipHistory'}, |
|
199 |
'date': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime.now'}), |
|
200 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
201 |
'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}), |
|
202 |
'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Project']"}), |
|
203 |
'reason': ('django.db.models.fields.IntegerField', [], {}), |
|
204 |
'serial': ('django.db.models.fields.BigIntegerField', [], {}) |
|
205 |
}, |
|
206 |
'im.projectresourcegrant': { |
|
207 |
'Meta': {'unique_together': "(('resource', 'project_application'),)", 'object_name': 'ProjectResourceGrant'}, |
|
208 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
209 |
'member_capacity': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
210 |
'member_export_limit': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
211 |
'member_import_limit': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
212 |
'project_application': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.ProjectApplication']", 'null': 'True'}), |
|
213 |
'project_capacity': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
214 |
'project_export_limit': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
215 |
'project_import_limit': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
216 |
'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"}) |
|
217 |
}, |
|
218 |
'im.resource': { |
|
219 |
'Meta': {'unique_together': "(('name', 'service'),)", 'object_name': 'Resource'}, |
|
220 |
'desc': ('django.db.models.fields.TextField', [], {'null': 'True'}), |
|
221 |
'group': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), |
|
222 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
223 |
'meta': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.ResourceMetadata']", 'symmetrical': 'False'}), |
|
224 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), |
|
225 |
'service': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Service']"}), |
|
226 |
'unit': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}) |
|
227 |
}, |
|
228 |
'im.resourcemetadata': { |
|
229 |
'Meta': {'object_name': 'ResourceMetadata'}, |
|
230 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
231 |
'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), |
|
232 |
'value': ('django.db.models.fields.CharField', [], {'max_length': '255'}) |
|
233 |
}, |
|
234 |
'im.serial': { |
|
235 |
'Meta': {'object_name': 'Serial'}, |
|
236 |
'serial': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) |
|
237 |
}, |
|
238 |
'im.service': { |
|
239 |
'Meta': {'object_name': 'Service'}, |
|
240 |
'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), |
|
241 |
'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), |
|
242 |
'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), |
|
243 |
'icon': ('django.db.models.fields.FilePathField', [], {'max_length': '100', 'blank': 'True'}), |
|
244 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
245 |
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), |
|
246 |
'url': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}) |
|
247 |
}, |
|
248 |
'im.sessioncatalog': { |
|
249 |
'Meta': {'object_name': 'SessionCatalog'}, |
|
250 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
251 |
'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}), |
|
252 |
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sessions'", 'null': 'True', 'to': "orm['im.AstakosUser']"}) |
|
253 |
} |
|
254 |
} |
|
255 |
|
|
256 |
complete_apps = ['im'] |
/dev/null | ||
---|---|---|
1 |
# encoding: utf-8 |
|
2 |
import datetime |
|
3 |
import uuid |
|
4 |
|
|
5 |
from south.db import db |
|
6 |
from south.v2 import DataMigration |
|
7 |
from django.db import models |
|
8 |
from django.core.validators import email_re |
|
9 |
|
|
10 |
class Migration(DataMigration): |
|
11 |
|
|
12 |
def forwards(self, orm): |
|
13 |
for u in orm.AstakosUser.objects.all(): |
|
14 |
save = False |
|
15 |
while not u.uuid: |
|
16 |
uuid_val = str(uuid.uuid4()) |
|
17 |
try: |
|
18 |
orm.AstakosUser.objects.get(uuid=uuid_val) |
|
19 |
except orm.AstakosUser.DoesNotExist, e: |
|
20 |
u.uuid = uuid_val |
|
21 |
save = True |
|
22 |
if not email_re.match(u.username): |
|
23 |
u.username = u.email[:30].lower() # !!! |
|
24 |
save = True |
|
25 |
if save: |
|
26 |
u.save() |
|
27 |
|
|
28 |
def backwards(self, orm): |
|
29 |
for u in orm.AstakosUser.objects.all(): |
|
30 |
u.uuid = None |
|
31 |
if email_re.match(u.username): |
|
32 |
username = None |
|
33 |
while not username: |
|
34 |
username_val = uuid.uuid4().hex[:30] |
|
35 |
try: |
|
36 |
orm.AstakosUser.objects.get(username = username_val) |
|
37 |
except orm.AstakosUser.DoesNotExist, e: |
|
38 |
username = username_val |
|
39 |
u.username = username |
|
40 |
u.save() |
|
41 |
|
|
42 |
models = { |
|
43 |
'auth.group': { |
|
44 |
'Meta': {'object_name': 'Group'}, |
|
45 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
46 |
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), |
|
47 |
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) |
|
48 |
}, |
|
49 |
'auth.permission': { |
|
50 |
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, |
|
51 |
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
|
52 |
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), |
|
53 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
54 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) |
|
55 |
}, |
|
56 |
'auth.user': { |
|
57 |
'Meta': {'object_name': 'User'}, |
|
58 |
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
|
59 |
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), |
|
60 |
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
|
61 |
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), |
|
62 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
63 |
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), |
|
64 |
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
65 |
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
66 |
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
|
67 |
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
|
68 |
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), |
|
69 |
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), |
|
70 |
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) |
|
71 |
}, |
|
72 |
'contenttypes.contenttype': { |
|
73 |
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, |
|
74 |
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
|
75 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
76 |
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
|
77 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) |
|
78 |
}, |
|
79 |
'im.additionalmail': { |
|
80 |
'Meta': {'object_name': 'AdditionalMail'}, |
|
81 |
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), |
|
82 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
83 |
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}) |
|
84 |
}, |
|
85 |
'im.approvalterms': { |
|
86 |
'Meta': {'object_name': 'ApprovalTerms'}, |
|
87 |
'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 12, 27, 10, 35, 30, 526021)', 'db_index': 'True'}), |
|
88 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
89 |
'location': ('django.db.models.fields.CharField', [], {'max_length': '255'}) |
|
90 |
}, |
|
91 |
'im.astakosuser': { |
|
92 |
'Meta': {'object_name': 'AstakosUser', '_ormbases': ['auth.User']}, |
|
93 |
'activation_sent': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), |
|
94 |
'affiliation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
95 |
'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), |
|
96 |
'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), |
|
97 |
'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), |
|
98 |
'date_signed_terms': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), |
|
99 |
'disturbed_quota': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), |
|
100 |
'email_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
101 |
'has_credits': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
102 |
'has_signed_terms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
103 |
'invitations': ('django.db.models.fields.IntegerField', [], {'default': '100'}), |
|
104 |
'is_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
105 |
'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}), |
|
106 |
'policy': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.AstakosUserQuota']", 'symmetrical': 'False'}), |
|
107 |
'provider': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
108 |
'third_party_identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
109 |
'updated': ('django.db.models.fields.DateTimeField', [], {}), |
|
110 |
'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}), |
|
111 |
'uuid': ('django.db.models.fields.CharField', [], {'max_length': '255', 'unique': 'True', 'null': 'True'}) |
|
112 |
}, |
|
113 |
'im.astakosuserauthprovider': { |
|
114 |
'Meta': {'ordering': "('module', 'created')", 'unique_together': "(('identifier', 'module', 'user'),)", 'object_name': 'AstakosUserAuthProvider'}, |
|
115 |
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), |
|
116 |
'affiliation': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
117 |
'auth_backend': ('django.db.models.fields.CharField', [], {'default': "'astakos'", 'max_length': '255'}), |
|
118 |
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
|
119 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
120 |
'identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
121 |
'info_data': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), |
|
122 |
'module': ('django.db.models.fields.CharField', [], {'default': "'local'", 'max_length': '255'}), |
|
123 |
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'auth_providers'", 'to': "orm['im.AstakosUser']"}) |
|
124 |
}, |
|
125 |
'im.astakosuserquota': { |
|
126 |
'Meta': {'unique_together': "(('resource', 'user'),)", 'object_name': 'AstakosUserQuota'}, |
|
127 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
128 |
'limit': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), |
|
129 |
'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"}), |
|
130 |
'uplimit': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
131 |
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}) |
|
132 |
}, |
|
133 |
'im.emailchange': { |
|
134 |
'Meta': {'object_name': 'EmailChange'}, |
|
135 |
'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40', 'db_index': 'True'}), |
|
136 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
137 |
'new_email_address': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), |
|
138 |
'requested_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 12, 27, 10, 35, 30, 527719)'}), |
|
139 |
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'emailchanges'", 'unique': 'True', 'to': "orm['im.AstakosUser']"}) |
|
140 |
}, |
|
141 |
'im.invitation': { |
|
142 |
'Meta': {'object_name': 'Invitation'}, |
|
143 |
'code': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True'}), |
|
144 |
'consumed': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), |
|
145 |
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
|
146 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
147 |
'inviter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'invitations_sent'", 'null': 'True', 'to': "orm['im.AstakosUser']"}), |
|
148 |
'is_consumed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
149 |
'realname': ('django.db.models.fields.CharField', [], {'max_length': '255'}), |
|
150 |
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) |
|
151 |
}, |
|
152 |
'im.memberjoinpolicy': { |
|
153 |
'Meta': {'object_name': 'MemberJoinPolicy'}, |
|
154 |
'description': ('django.db.models.fields.CharField', [], {'max_length': '80'}), |
|
155 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
156 |
'policy': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) |
|
157 |
}, |
|
158 |
'im.memberleavepolicy': { |
|
159 |
'Meta': {'object_name': 'MemberLeavePolicy'}, |
|
160 |
'description': ('django.db.models.fields.CharField', [], {'max_length': '80'}), |
|
161 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
162 |
'policy': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) |
|
163 |
}, |
|
164 |
'im.pendingthirdpartyuser': { |
|
165 |
'Meta': {'unique_together': "(('provider', 'third_party_identifier'),)", 'object_name': 'PendingThirdPartyUser'}, |
|
166 |
'affiliation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), |
|
167 |
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), |
|
168 |
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}), |
|
169 |
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
|
170 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
171 |
'info': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), |
|
172 |
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
|
173 |
'provider': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), |
|
174 |
'third_party_identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
175 |
'token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
176 |
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) |
|
177 |
}, |
|
178 |
'im.project': { |
|
179 |
'Meta': {'object_name': 'Project'}, |
|
180 |
'application': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'project'", 'unique': 'True', 'to': "orm['im.ProjectApplication']"}), |
|
181 |
'creation_date': ('django.db.models.fields.DateTimeField', [], {}), |
|
182 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
183 |
'last_approval_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), |
|
184 |
'members': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.AstakosUser']", 'through': "orm['im.ProjectMembership']", 'symmetrical': 'False'}), |
|
185 |
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80', 'db_index': 'True'}), |
|
186 |
'termination_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), |
|
187 |
'termination_start_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) |
|
188 |
}, |
|
189 |
'im.projectapplication': { |
|
190 |
'Meta': {'object_name': 'ProjectApplication'}, |
|
191 |
'applicant': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'projects_applied'", 'to': "orm['im.AstakosUser']"}), |
|
192 |
'comments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), |
|
193 |
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), |
|
194 |
'end_date': ('django.db.models.fields.DateTimeField', [], {}), |
|
195 |
'homepage': ('django.db.models.fields.URLField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
196 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
197 |
'issue_date': ('django.db.models.fields.DateTimeField', [], {}), |
|
198 |
'limit_on_members_number': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}), |
|
199 |
'member_join_policy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.MemberJoinPolicy']"}), |
|
200 |
'member_leave_policy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.MemberLeavePolicy']"}), |
|
201 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}), |
|
202 |
'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'projects_owned'", 'to': "orm['im.AstakosUser']"}), |
|
203 |
'precursor_application': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['im.ProjectApplication']", 'unique': 'True', 'null': 'True', 'blank': 'True'}), |
|
204 |
'resource_grants': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.ProjectResourceGrant']", 'blank': 'True'}), |
|
205 |
'start_date': ('django.db.models.fields.DateTimeField', [], {}), |
|
206 |
'state': ('django.db.models.fields.CharField', [], {'default': "'Unknown'", 'max_length': '80'}) |
|
207 |
}, |
|
208 |
'im.projectmembership': { |
|
209 |
'Meta': {'unique_together': "(('person', 'project'),)", 'object_name': 'ProjectMembership'}, |
|
210 |
'acceptance_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'db_index': 'True'}), |
|
211 |
'application': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'memberships'", 'null': 'True', 'to': "orm['im.ProjectApplication']"}), |
|
212 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
213 |
'leave_request_date': ('django.db.models.fields.DateField', [], {'null': 'True'}), |
|
214 |
'pending_application': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pending_memebrships'", 'null': 'True', 'to': "orm['im.ProjectApplication']"}), |
|
215 |
'pending_serial': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'db_index': 'True'}), |
|
216 |
'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}), |
|
217 |
'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Project']"}), |
|
218 |
'request_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2012, 12, 27, 10, 35, 30, 535980)'}), |
|
219 |
'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}) |
|
220 |
}, |
|
221 |
'im.projectmembershiphistory': { |
|
222 |
'Meta': {'object_name': 'ProjectMembershipHistory'}, |
|
223 |
'date': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime.now'}), |
|
224 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
225 |
'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}), |
|
226 |
'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Project']"}), |
|
227 |
'reason': ('django.db.models.fields.IntegerField', [], {}), |
|
228 |
'serial': ('django.db.models.fields.BigIntegerField', [], {}) |
|
229 |
}, |
|
230 |
'im.projectresourcegrant': { |
|
231 |
'Meta': {'unique_together': "(('resource', 'project_application'),)", 'object_name': 'ProjectResourceGrant'}, |
|
232 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
233 |
'member_capacity': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
234 |
'member_export_limit': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
235 |
'member_import_limit': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
236 |
'project_application': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.ProjectApplication']", 'null': 'True'}), |
|
237 |
'project_capacity': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
238 |
'project_export_limit': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
239 |
'project_import_limit': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
240 |
'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"}) |
|
241 |
}, |
|
242 |
'im.resource': { |
|
243 |
'Meta': {'unique_together': "(('name', 'service'),)", 'object_name': 'Resource'}, |
|
244 |
'desc': ('django.db.models.fields.TextField', [], {'null': 'True'}), |
|
245 |
'group': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), |
|
246 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
247 |
'meta': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.ResourceMetadata']", 'symmetrical': 'False'}), |
|
248 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), |
|
249 |
'service': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Service']"}), |
|
250 |
'unit': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}) |
|
251 |
}, |
|
252 |
'im.resourcemetadata': { |
|
253 |
'Meta': {'object_name': 'ResourceMetadata'}, |
|
254 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
255 |
'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), |
|
256 |
'value': ('django.db.models.fields.CharField', [], {'max_length': '255'}) |
|
257 |
}, |
|
258 |
'im.serial': { |
|
259 |
'Meta': {'object_name': 'Serial'}, |
|
260 |
'serial': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) |
|
261 |
}, |
|
262 |
'im.service': { |
|
263 |
'Meta': {'object_name': 'Service'}, |
|
264 |
'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), |
|
265 |
'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), |
|
266 |
'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), |
|
267 |
'icon': ('django.db.models.fields.FilePathField', [], {'max_length': '100', 'blank': 'True'}), |
|
268 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
269 |
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), |
|
270 |
'url': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}) |
|
271 |
}, |
|
272 |
'im.sessioncatalog': { |
|
273 |
'Meta': {'object_name': 'SessionCatalog'}, |
|
274 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
275 |
'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}), |
|
276 |
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sessions'", 'null': 'True', 'to': "orm['im.AstakosUser']"}) |
|
277 |
} |
|
278 |
} |
|
279 |
|
|
280 |
complete_apps = ['im'] |
b/snf-astakos-app/astakos/im/migrations/0045_set_username_uuid.py | ||
---|---|---|
1 |
# encoding: utf-8 |
|
2 |
import datetime |
|
3 |
import uuid |
|
4 |
|
|
5 |
from south.db import db |
|
6 |
from south.v2 import DataMigration |
|
7 |
from django.db import models |
|
8 |
from django.core.validators import email_re |
|
9 |
|
|
10 |
class Migration(DataMigration): |
|
11 |
|
|
12 |
def forwards(self, orm): |
|
13 |
for u in orm.AstakosUser.objects.all(): |
|
14 |
save = False |
|
15 |
while not u.uuid: |
|
16 |
uuid_val = str(uuid.uuid4()) |
|
17 |
try: |
|
18 |
orm.AstakosUser.objects.get(uuid=uuid_val) |
|
19 |
except orm.AstakosUser.DoesNotExist, e: |
|
20 |
u.uuid = uuid_val |
|
21 |
save = True |
|
22 |
if not email_re.match(u.username): |
|
23 |
u.username = u.email.lower() |
|
24 |
save = True |
|
25 |
if save: |
|
26 |
u.save() |
|
27 |
|
|
28 |
def backwards(self, orm): |
|
29 |
for u in orm.AstakosUser.objects.all(): |
|
30 |
u.uuid = None |
|
31 |
if email_re.match(u.username): |
|
32 |
username = None |
|
33 |
while not username: |
|
34 |
username_val = uuid.uuid4().hex[:30] |
|
35 |
try: |
|
36 |
orm.AstakosUser.objects.get(username = username_val) |
|
37 |
except orm.AstakosUser.DoesNotExist, e: |
|
38 |
username = username_val |
|
39 |
u.username = username |
|
40 |
u.save() |
|
41 |
|
|
42 |
models = { |
|
43 |
'auth.group': { |
|
44 |
'Meta': {'object_name': 'Group'}, |
|
45 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
46 |
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), |
|
47 |
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) |
|
48 |
}, |
|
49 |
'auth.permission': { |
|
50 |
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, |
|
51 |
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
|
52 |
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), |
|
53 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
54 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) |
|
55 |
}, |
|
56 |
'auth.user': { |
|
57 |
'Meta': {'object_name': 'User'}, |
|
58 |
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
|
59 |
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), |
|
60 |
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
|
61 |
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), |
|
62 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
63 |
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), |
|
64 |
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
65 |
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
66 |
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
|
67 |
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
|
68 |
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), |
|
69 |
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), |
|
70 |
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '75'}) |
|
71 |
}, |
|
72 |
'contenttypes.contenttype': { |
|
73 |
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, |
|
74 |
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
|
75 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
76 |
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
|
77 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) |
|
78 |
}, |
|
79 |
'im.additionalmail': { |
|
80 |
'Meta': {'object_name': 'AdditionalMail'}, |
|
81 |
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), |
|
82 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
83 |
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}) |
|
84 |
}, |
|
85 |
'im.approvalterms': { |
|
86 |
'Meta': {'object_name': 'ApprovalTerms'}, |
|
87 |
'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 12, 28, 10, 3, 44, 519671)', 'db_index': 'True'}), |
|
88 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
89 |
'location': ('django.db.models.fields.CharField', [], {'max_length': '255'}) |
|
90 |
}, |
|
91 |
'im.astakosuser': { |
|
92 |
'Meta': {'object_name': 'AstakosUser', '_ormbases': ['auth.User']}, |
|
93 |
'activation_sent': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), |
|
94 |
'affiliation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
95 |
'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), |
|
96 |
'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), |
|
97 |
'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), |
|
98 |
'date_signed_terms': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), |
|
99 |
'disturbed_quota': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), |
|
100 |
'email_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
101 |
'has_credits': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
102 |
'has_signed_terms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
103 |
'invitations': ('django.db.models.fields.IntegerField', [], {'default': '100'}), |
|
104 |
'is_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
105 |
'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}), |
|
106 |
'policy': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.AstakosUserQuota']", 'symmetrical': 'False'}), |
|
107 |
'provider': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
108 |
'third_party_identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
109 |
'updated': ('django.db.models.fields.DateTimeField', [], {}), |
|
110 |
'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}), |
|
111 |
'uuid': ('django.db.models.fields.CharField', [], {'max_length': '255', 'unique': 'True', 'null': 'True'}) |
|
112 |
}, |
|
113 |
'im.astakosuserauthprovider': { |
|
114 |
'Meta': {'ordering': "('module', 'created')", 'unique_together': "(('identifier', 'module', 'user'),)", 'object_name': 'AstakosUserAuthProvider'}, |
|
115 |
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), |
|
116 |
'affiliation': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
117 |
'auth_backend': ('django.db.models.fields.CharField', [], {'default': "'astakos'", 'max_length': '255'}), |
|
118 |
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
|
119 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
120 |
'identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
121 |
'info_data': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), |
|
122 |
'module': ('django.db.models.fields.CharField', [], {'default': "'local'", 'max_length': '255'}), |
|
123 |
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'auth_providers'", 'to': "orm['im.AstakosUser']"}) |
|
124 |
}, |
|
125 |
'im.astakosuserquota': { |
|
126 |
'Meta': {'unique_together': "(('resource', 'user'),)", 'object_name': 'AstakosUserQuota'}, |
|
127 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
128 |
'limit': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}), |
|
129 |
'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"}), |
|
130 |
'uplimit': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
131 |
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}) |
|
132 |
}, |
|
133 |
'im.emailchange': { |
|
134 |
'Meta': {'object_name': 'EmailChange'}, |
|
135 |
'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40', 'db_index': 'True'}), |
|
136 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
137 |
'new_email_address': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), |
|
138 |
'requested_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 12, 28, 10, 3, 44, 521365)'}), |
|
139 |
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'emailchanges'", 'unique': 'True', 'to': "orm['im.AstakosUser']"}) |
|
140 |
}, |
|
141 |
'im.invitation': { |
|
142 |
'Meta': {'object_name': 'Invitation'}, |
|
143 |
'code': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True'}), |
|
144 |
'consumed': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), |
|
145 |
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), |
|
146 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
147 |
'inviter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'invitations_sent'", 'null': 'True', 'to': "orm['im.AstakosUser']"}), |
|
148 |
'is_consumed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), |
|
149 |
'realname': ('django.db.models.fields.CharField', [], {'max_length': '255'}), |
|
150 |
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) |
|
151 |
}, |
|
152 |
'im.memberjoinpolicy': { |
|
153 |
'Meta': {'object_name': 'MemberJoinPolicy'}, |
|
154 |
'description': ('django.db.models.fields.CharField', [], {'max_length': '80'}), |
|
155 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
156 |
'policy': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) |
|
157 |
}, |
|
158 |
'im.memberleavepolicy': { |
|
159 |
'Meta': {'object_name': 'MemberLeavePolicy'}, |
|
160 |
'description': ('django.db.models.fields.CharField', [], {'max_length': '80'}), |
|
161 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
162 |
'policy': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}) |
|
163 |
}, |
|
164 |
'im.pendingthirdpartyuser': { |
|
165 |
'Meta': {'unique_together': "(('provider', 'third_party_identifier'),)", 'object_name': 'PendingThirdPartyUser'}, |
|
166 |
'affiliation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), |
|
167 |
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), |
|
168 |
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}), |
|
169 |
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
|
170 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
171 |
'info': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), |
|
172 |
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), |
|
173 |
'provider': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), |
|
174 |
'third_party_identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
175 |
'token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
176 |
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) |
|
177 |
}, |
|
178 |
'im.project': { |
|
179 |
'Meta': {'object_name': 'Project'}, |
|
180 |
'application': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'project'", 'unique': 'True', 'to': "orm['im.ProjectApplication']"}), |
|
181 |
'creation_date': ('django.db.models.fields.DateTimeField', [], {}), |
|
182 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
183 |
'last_approval_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), |
|
184 |
'members': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.AstakosUser']", 'through': "orm['im.ProjectMembership']", 'symmetrical': 'False'}), |
|
185 |
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80', 'db_index': 'True'}), |
|
186 |
'termination_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), |
|
187 |
'termination_start_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}) |
|
188 |
}, |
|
189 |
'im.projectapplication': { |
|
190 |
'Meta': {'object_name': 'ProjectApplication'}, |
|
191 |
'applicant': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'projects_applied'", 'to': "orm['im.AstakosUser']"}), |
|
192 |
'comments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), |
|
193 |
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), |
|
194 |
'end_date': ('django.db.models.fields.DateTimeField', [], {}), |
|
195 |
'homepage': ('django.db.models.fields.URLField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), |
|
196 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
197 |
'issue_date': ('django.db.models.fields.DateTimeField', [], {}), |
|
198 |
'limit_on_members_number': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}), |
|
199 |
'member_join_policy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.MemberJoinPolicy']"}), |
|
200 |
'member_leave_policy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.MemberLeavePolicy']"}), |
|
201 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}), |
|
202 |
'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'projects_owned'", 'to': "orm['im.AstakosUser']"}), |
|
203 |
'precursor_application': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['im.ProjectApplication']", 'unique': 'True', 'null': 'True', 'blank': 'True'}), |
|
204 |
'resource_grants': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.ProjectResourceGrant']", 'blank': 'True'}), |
|
205 |
'start_date': ('django.db.models.fields.DateTimeField', [], {}), |
|
206 |
'state': ('django.db.models.fields.CharField', [], {'default': "'Unknown'", 'max_length': '80'}) |
|
207 |
}, |
|
208 |
'im.projectmembership': { |
|
209 |
'Meta': {'unique_together': "(('person', 'project'),)", 'object_name': 'ProjectMembership'}, |
|
210 |
'acceptance_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'db_index': 'True'}), |
|
211 |
'application': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'memberships'", 'null': 'True', 'to': "orm['im.ProjectApplication']"}), |
|
212 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
213 |
'leave_request_date': ('django.db.models.fields.DateField', [], {'null': 'True'}), |
|
214 |
'pending_application': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pending_memebrships'", 'null': 'True', 'to': "orm['im.ProjectApplication']"}), |
|
215 |
'pending_serial': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'db_index': 'True'}), |
|
216 |
'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}), |
|
217 |
'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Project']"}), |
|
218 |
'request_date': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2012, 12, 28, 10, 3, 44, 529721)'}), |
|
219 |
'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}) |
|
220 |
}, |
|
221 |
'im.projectmembershiphistory': { |
|
222 |
'Meta': {'object_name': 'ProjectMembershipHistory'}, |
|
223 |
'date': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime.now'}), |
|
224 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
225 |
'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}), |
|
226 |
'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Project']"}), |
|
227 |
'reason': ('django.db.models.fields.IntegerField', [], {}), |
|
228 |
'serial': ('django.db.models.fields.BigIntegerField', [], {}) |
|
229 |
}, |
|
230 |
'im.projectresourcegrant': { |
|
231 |
'Meta': {'unique_together': "(('resource', 'project_application'),)", 'object_name': 'ProjectResourceGrant'}, |
|
232 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
233 |
'member_capacity': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
234 |
'member_export_limit': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
235 |
'member_import_limit': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
236 |
'project_application': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.ProjectApplication']", 'null': 'True'}), |
|
237 |
'project_capacity': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
238 |
'project_export_limit': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
239 |
'project_import_limit': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}), |
|
240 |
'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"}) |
|
241 |
}, |
|
242 |
'im.resource': { |
|
243 |
'Meta': {'unique_together': "(('name', 'service'),)", 'object_name': 'Resource'}, |
|
244 |
'desc': ('django.db.models.fields.TextField', [], {'null': 'True'}), |
|
245 |
'group': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}), |
|
246 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
247 |
'meta': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.ResourceMetadata']", 'symmetrical': 'False'}), |
|
248 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), |
|
249 |
'service': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Service']"}), |
|
250 |
'unit': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}) |
|
251 |
}, |
|
252 |
'im.resourcemetadata': { |
|
253 |
'Meta': {'object_name': 'ResourceMetadata'}, |
|
254 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
255 |
'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), |
|
256 |
'value': ('django.db.models.fields.CharField', [], {'max_length': '255'}) |
|
257 |
}, |
|
258 |
'im.serial': { |
|
259 |
'Meta': {'object_name': 'Serial'}, |
|
260 |
'serial': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) |
|
261 |
}, |
|
262 |
'im.service': { |
|
263 |
'Meta': {'object_name': 'Service'}, |
|
264 |
'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}), |
|
265 |
'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), |
|
266 |
'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), |
|
267 |
'icon': ('django.db.models.fields.FilePathField', [], {'max_length': '100', 'blank': 'True'}), |
|
268 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
269 |
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}), |
|
270 |
'url': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}) |
|
271 |
}, |
|
272 |
'im.sessioncatalog': { |
|
273 |
'Meta': {'object_name': 'SessionCatalog'}, |
|
274 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
275 |
'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}), |
|
276 |
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sessions'", 'null': 'True', 'to': "orm['im.AstakosUser']"}) |
|
277 |
} |
|
278 |
} |
|
279 |
|
|
280 |
complete_apps = ['im'] |
Also available in: Unified diff