Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / migrations / 0062_accept_with_usage.py @ c7493368

History | View | Annotate | Download (28.8 kB)

1
# -*- coding: utf-8 -*-
2
import datetime
3
from south.db import db
4
from south.v2 import DataMigration
5
from django.db import models
6

    
7
class Migration(DataMigration):
8

    
9
    depends_on = (
10
        ("quotaholder_app", "0010_non_accepted.py"),
11
        )
12

    
13
    def forwards(self, orm):
14
        Holding = orm["quotaholder_app.holding"]
15
        uuids = set(Holding.objects.filter(models.Q(usage_min__gt=0) |
16
                                           models.Q(usage_max__gt=0)).
17
                    values_list("holder", flat=True))
18
        users = orm.AstakosUser.objects.filter(uuid__in=uuids).\
19
            filter(models.Q(moderated=False) |
20
                   models.Q(moderated=True, is_rejected=True))
21
        for user in users:
22
            print ("Accepting user %s because of non-zero quota usage. "
23
                   "User kept inactive." % user.uuid)
24
            user.moderated = True
25
            user.moderated_at = datetime.datetime.now()
26
            user.is_rejected = False
27
            user.is_active = False
28
            user.save()
29

    
30
    def backwards(self, orm):
31
        "Write your backwards methods here."
32

    
33
    models = {
34
        'auth.group': {
35
            'Meta': {'object_name': 'Group'},
36
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
37
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
38
            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
39
        },
40
        'auth.permission': {
41
            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
42
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
43
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
44
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
45
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
46
        },
47
        'auth.user': {
48
            'Meta': {'object_name': 'User'},
49
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
50
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
51
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
52
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
53
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
54
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
55
            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
56
            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
57
            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
58
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
59
            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
60
            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
61
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
62
        },
63
        'contenttypes.contenttype': {
64
            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
65
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
66
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
67
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
68
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
69
        },
70
        'im.additionalmail': {
71
            'Meta': {'object_name': 'AdditionalMail'},
72
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
73
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
74
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"})
75
        },
76
        'im.approvalterms': {
77
            'Meta': {'object_name': 'ApprovalTerms'},
78
            'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
79
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
80
            'location': ('django.db.models.fields.CharField', [], {'max_length': '255'})
81
        },
82
        'im.astakosuser': {
83
            'Meta': {'object_name': 'AstakosUser', '_ormbases': ['auth.User']},
84
            'accepted_email': ('django.db.models.fields.EmailField', [], {'default': 'None', 'max_length': '75', 'null': 'True', 'blank': 'True'}),
85
            'accepted_policy': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True', 'blank': 'True'}),
86
            'activation_sent': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
87
            'affiliation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
88
            'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '64', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
89
            'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
90
            'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
91
            'date_signed_terms': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
92
            'deactivated_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
93
            'deactivated_reason': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
94
            'disturbed_quota': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
95
            'email_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
96
            'has_credits': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
97
            'has_signed_terms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
98
            'invitations': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
99
            'is_rejected': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
100
            'is_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
101
            'level': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
102
            'moderated': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
103
            'moderated_at': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
104
            'moderated_data': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
105
            'policy': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.AstakosUserQuota']", 'symmetrical': 'False'}),
106
            'rejected_reason': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
107
            'updated': ('django.db.models.fields.DateTimeField', [], {}),
108
            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
109
            'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
110
            'verification_code': ('django.db.models.fields.CharField', [], {'max_length': '255', 'unique': 'True', 'null': 'True'}),
111
            'verified_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': '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
            'capacity': ('django.db.models.fields.BigIntegerField', [], {}),
128
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
129
            'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"}),
130
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"})
131
        },
132
        'im.authproviderpolicyprofile': {
133
            'Meta': {'ordering': "['priority']", 'object_name': 'AuthProviderPolicyProfile'},
134
            'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
135
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'authpolicy_profiles'", 'symmetrical': 'False', 'to': "orm['auth.Group']"}),
136
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
137
            'is_exclusive': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
138
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
139
            'policy_add': ('django.db.models.fields.NullBooleanField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
140
            'policy_automoderate': ('django.db.models.fields.NullBooleanField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
141
            'policy_create': ('django.db.models.fields.NullBooleanField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
142
            'policy_limit': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
143
            'policy_login': ('django.db.models.fields.NullBooleanField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
144
            'policy_remove': ('django.db.models.fields.NullBooleanField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
145
            'policy_required': ('django.db.models.fields.NullBooleanField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
146
            'policy_switch': ('django.db.models.fields.NullBooleanField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
147
            'priority': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
148
            'provider': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
149
            'users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'authpolicy_profiles'", 'symmetrical': 'False', 'to': "orm['im.AstakosUser']"})
150
        },
151
        'im.chain': {
152
            'Meta': {'object_name': 'Chain'},
153
            'chain': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
154
        },
155
        'im.component': {
156
            'Meta': {'object_name': 'Component'},
157
            'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '64', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
158
            'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
159
            'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
160
            'base_url': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'null': 'True'}),
161
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
162
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}),
163
            'url': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'null': 'True'})
164
        },
165
        'im.emailchange': {
166
            'Meta': {'object_name': 'EmailChange'},
167
            'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40', 'db_index': 'True'}),
168
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
169
            'new_email_address': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
170
            'requested_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
171
            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'emailchanges'", 'unique': 'True', 'to': "orm['im.AstakosUser']"})
172
        },
173
        'im.endpoint': {
174
            'Meta': {'object_name': 'Endpoint'},
175
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
176
            'service': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'endpoints'", 'to': "orm['im.Service']"})
177
        },
178
        'im.endpointdata': {
179
            'Meta': {'unique_together': "(('endpoint', 'key'),)", 'object_name': 'EndpointData'},
180
            'endpoint': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'data'", 'to': "orm['im.Endpoint']"}),
181
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
182
            'key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
183
            'value': ('django.db.models.fields.CharField', [], {'max_length': '1024'})
184
        },
185
        'im.invitation': {
186
            'Meta': {'object_name': 'Invitation'},
187
            'code': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True'}),
188
            'consumed': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
189
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
190
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
191
            'inviter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'invitations_sent'", 'null': 'True', 'to': "orm['im.AstakosUser']"}),
192
            'is_consumed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
193
            'realname': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
194
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
195
        },
196
        'im.pendingthirdpartyuser': {
197
            'Meta': {'unique_together': "(('provider', 'third_party_identifier'),)", 'object_name': 'PendingThirdPartyUser'},
198
            'affiliation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
199
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
200
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
201
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
202
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
203
            'info': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}),
204
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
205
            'provider': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
206
            'third_party_identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
207
            'token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
208
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
209
        },
210
        'im.project': {
211
            'Meta': {'object_name': 'Project'},
212
            'application': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'project'", 'unique': 'True', 'to': "orm['im.ProjectApplication']"}),
213
            'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
214
            'id': ('django.db.models.fields.BigIntegerField', [], {'primary_key': 'True', 'db_column': "'id'"}),
215
            'members': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.AstakosUser']", 'through': "orm['im.ProjectMembership']", 'symmetrical': 'False'}),
216
            'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'unique': 'True', 'null': 'True', 'db_index': 'True'}),
217
            'state': ('django.db.models.fields.IntegerField', [], {'default': '1', 'db_index': 'True'})
218
        },
219
        'im.projectapplication': {
220
            'Meta': {'unique_together': "(('chain', 'id'),)", 'object_name': 'ProjectApplication'},
221
            'applicant': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'projects_applied'", 'to': "orm['im.AstakosUser']"}),
222
            'chain': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'chained_apps'", 'db_column': "'chain'", 'to': "orm['im.Project']"}),
223
            'comments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
224
            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
225
            'end_date': ('django.db.models.fields.DateTimeField', [], {}),
226
            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '255', 'null': 'True'}),
227
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
228
            'issue_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
229
            'limit_on_members_number': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
230
            'member_join_policy': ('django.db.models.fields.IntegerField', [], {}),
231
            'member_leave_policy': ('django.db.models.fields.IntegerField', [], {}),
232
            'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
233
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'projects_owned'", 'to': "orm['im.AstakosUser']"}),
234
            'resource_grants': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.ProjectResourceGrant']", 'blank': 'True'}),
235
            'response': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
236
            'response_actor': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'responded_apps'", 'null': 'True', 'to': "orm['im.AstakosUser']"}),
237
            'response_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
238
            'start_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
239
            'state': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
240
            'waive_actor': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'waived_apps'", 'null': 'True', 'to': "orm['im.AstakosUser']"}),
241
            'waive_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
242
            'waive_reason': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
243
        },
244
        'im.projectlock': {
245
            'Meta': {'object_name': 'ProjectLock'},
246
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
247
        },
248
        'im.projectlog': {
249
            'Meta': {'object_name': 'ProjectLog'},
250
            'actor': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']", 'null': 'True'}),
251
            'comments': ('django.db.models.fields.TextField', [], {'null': 'True'}),
252
            'date': ('django.db.models.fields.DateTimeField', [], {}),
253
            'from_state': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
254
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
255
            'project': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'log'", 'to': "orm['im.Project']"}),
256
            'reason': ('django.db.models.fields.TextField', [], {'null': 'True'}),
257
            'to_state': ('django.db.models.fields.IntegerField', [], {})
258
        },
259
        'im.projectmembership': {
260
            'Meta': {'unique_together': "(('person', 'project'),)", 'object_name': 'ProjectMembership'},
261
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
262
            'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}),
263
            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Project']"}),
264
            'state': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'})
265
        },
266
        'im.projectmembershiplog': {
267
            'Meta': {'object_name': 'ProjectMembershipLog'},
268
            'actor': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']", 'null': 'True'}),
269
            'comments': ('django.db.models.fields.TextField', [], {'null': 'True'}),
270
            'date': ('django.db.models.fields.DateTimeField', [], {}),
271
            'from_state': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
272
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
273
            'membership': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'log'", 'to': "orm['im.ProjectMembership']"}),
274
            'reason': ('django.db.models.fields.TextField', [], {'null': 'True'}),
275
            'to_state': ('django.db.models.fields.IntegerField', [], {})
276
        },
277
        'im.projectresourcegrant': {
278
            'Meta': {'unique_together': "(('resource', 'project_application'),)", 'object_name': 'ProjectResourceGrant'},
279
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
280
            'member_capacity': ('django.db.models.fields.BigIntegerField', [], {'default': '0'}),
281
            'project_application': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.ProjectApplication']", 'null': 'True'}),
282
            'project_capacity': ('django.db.models.fields.BigIntegerField', [], {'null': 'True'}),
283
            'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"})
284
        },
285
        'im.resource': {
286
            'Meta': {'object_name': 'Resource'},
287
            'api_visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
288
            'desc': ('django.db.models.fields.TextField', [], {'null': 'True'}),
289
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
290
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
291
            'service_origin': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
292
            'service_type': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
293
            'ui_visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
294
            'unit': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
295
            'uplimit': ('django.db.models.fields.BigIntegerField', [], {'default': '0'})
296
        },
297
        'im.service': {
298
            'Meta': {'object_name': 'Service'},
299
            'component': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Component']"}),
300
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
301
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
302
            'type': ('django.db.models.fields.CharField', [], {'max_length': '255'})
303
        },
304
        'im.sessioncatalog': {
305
            'Meta': {'object_name': 'SessionCatalog'},
306
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
307
            'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
308
            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sessions'", 'null': 'True', 'to': "orm['im.AstakosUser']"})
309
        },
310
        'im.usersetting': {
311
            'Meta': {'unique_together': "(('user', 'setting'),)", 'object_name': 'UserSetting'},
312
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
313
            'setting': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
314
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}),
315
            'value': ('django.db.models.fields.IntegerField', [], {})
316
        },
317
        'quotaholder_app.commission': {
318
            'Meta': {'object_name': 'Commission'},
319
            'clientkey': ('django.db.models.fields.CharField', [], {'max_length': '4096'}),
320
            'issue_datetime': ('django.db.models.fields.DateTimeField', [], {}),
321
            'name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '4096'}),
322
            'serial': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
323
        },
324
        'quotaholder_app.holding': {
325
            'Meta': {'unique_together': "(('holder', 'source', 'resource'),)", 'object_name': 'Holding'},
326
            'holder': ('django.db.models.fields.CharField', [], {'max_length': '4096', 'db_index': 'True'}),
327
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
328
            'limit': ('django.db.models.fields.BigIntegerField', [], {}),
329
            'resource': ('django.db.models.fields.CharField', [], {'max_length': '4096'}),
330
            'source': ('django.db.models.fields.CharField', [], {'max_length': '4096', 'null': 'True'}),
331
            'usage_max': ('django.db.models.fields.BigIntegerField', [], {'default': '0'}),
332
            'usage_min': ('django.db.models.fields.BigIntegerField', [], {'default': '0'})
333
        },
334
        'quotaholder_app.provision': {
335
            'Meta': {'object_name': 'Provision'},
336
            'holder': ('django.db.models.fields.CharField', [], {'max_length': '4096', 'db_index': 'True'}),
337
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
338
            'quantity': ('django.db.models.fields.BigIntegerField', [], {}),
339
            'resource': ('django.db.models.fields.CharField', [], {'max_length': '4096'}),
340
            'serial': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'provisions'", 'to': "orm['quotaholder_app.Commission']"}),
341
            'source': ('django.db.models.fields.CharField', [], {'max_length': '4096', 'null': 'True'})
342
        },
343
        'quotaholder_app.provisionlog': {
344
            'Meta': {'object_name': 'ProvisionLog'},
345
            'delta_quantity': ('django.db.models.fields.BigIntegerField', [], {}),
346
            'holder': ('django.db.models.fields.CharField', [], {'max_length': '4096'}),
347
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
348
            'issue_time': ('django.db.models.fields.CharField', [], {'max_length': '4096'}),
349
            'limit': ('django.db.models.fields.BigIntegerField', [], {}),
350
            'log_time': ('django.db.models.fields.CharField', [], {'max_length': '4096'}),
351
            'name': ('django.db.models.fields.CharField', [], {'max_length': '4096'}),
352
            'reason': ('django.db.models.fields.CharField', [], {'max_length': '4096'}),
353
            'resource': ('django.db.models.fields.CharField', [], {'max_length': '4096'}),
354
            'serial': ('django.db.models.fields.BigIntegerField', [], {}),
355
            'source': ('django.db.models.fields.CharField', [], {'max_length': '4096', 'null': 'True'}),
356
            'usage_max': ('django.db.models.fields.BigIntegerField', [], {}),
357
            'usage_min': ('django.db.models.fields.BigIntegerField', [], {})
358
        }
359
    }
360

    
361
    complete_apps = ['quotaholder_app', 'im']
362
    symmetrical = True