Revision c8618788

b/docs/quota-api-guide.rst
33 33
      "cyclades.vm": {
34 34
          "unit": null,
35 35
          "description": "Number of virtual machines",
36
          "service": "cyclades"
36
          "service": "cyclades",
37
          "allow_in_projects": true
37 38
          },
38 39
      "cyclades.ram": {
39 40
          "unit": "bytes",
40 41
          "description": "Virtual machine memory",
41
          "service": "cyclades"
42
          "service": "cyclades",
43
          "allow_in_projects": true
42 44
          }
43 45
  }
44 46

  
b/snf-astakos-app/astakos/im/astakos_resources.py
36 36
resources = [
37 37
    {"desc": "Number of pending project applications",
38 38
     "name": "astakos.pending_app",
39
     "allow_in_projects": False,
39 40
     }
40 41
]
b/snf-astakos-app/astakos/im/management/commands/resource-list.py
46 46
        "unit": ("unit", "Unit"),
47 47
        "limit": ("uplimit", "Base Quota"),
48 48
        "description": ("desc", "Description"),
49
        "allow_in_projects": ("allow_in_projects",
50
                              "Make resource available in projects"),
49 51
    }
50 52

  
51
    fields = ["id", "name", "service", "unit", "limit", "description"]
53
    fields = ["id", "name", "service", "unit", "limit", "allow_in_projects",
54
              "description"]
b/snf-astakos-app/astakos/im/migrations/0028_auto__add_field_resource_allow_in_projects.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
        
11
        # Adding field 'Resource.allow_in_projects'
12
        db.add_column('im_resource', 'allow_in_projects', self.gf('django.db.models.fields.BooleanField')(default=True), keep_default=False)
13

  
14

  
15
    def backwards(self, orm):
16
        
17
        # Deleting field 'Resource.allow_in_projects'
18
        db.delete_column('im_resource', 'allow_in_projects')
19

  
20

  
21
    models = {
22
        'auth.group': {
23
            'Meta': {'object_name': 'Group'},
24
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
25
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
26
            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
27
        },
28
        'auth.permission': {
29
            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
30
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
31
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
32
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
33
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
34
        },
35
        'auth.user': {
36
            'Meta': {'object_name': 'User'},
37
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
38
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
39
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
40
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
41
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
42
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
43
            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
44
            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
45
            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
46
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
47
            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
48
            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
49
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
50
        },
51
        'contenttypes.contenttype': {
52
            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
53
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
54
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
55
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
56
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
57
        },
58
        'im.additionalmail': {
59
            'Meta': {'object_name': 'AdditionalMail'},
60
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
61
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
62
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"})
63
        },
64
        'im.approvalterms': {
65
            'Meta': {'object_name': 'ApprovalTerms'},
66
            'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
67
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
68
            'location': ('django.db.models.fields.CharField', [], {'max_length': '255'})
69
        },
70
        'im.astakosuser': {
71
            'Meta': {'object_name': 'AstakosUser', '_ormbases': ['auth.User']},
72
            'activation_sent': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
73
            'affiliation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
74
            'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
75
            'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
76
            'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
77
            'date_signed_terms': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
78
            'disturbed_quota': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
79
            'email_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
80
            'has_credits': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
81
            'has_signed_terms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
82
            'invitations': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
83
            'is_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
84
            'level': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
85
            'policy': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.AstakosUserQuota']", 'symmetrical': 'False'}),
86
            'provider': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
87
            'third_party_identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
88
            'updated': ('django.db.models.fields.DateTimeField', [], {}),
89
            'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'}),
90
            'uuid': ('django.db.models.fields.CharField', [], {'max_length': '255', 'unique': 'True', 'null': 'True'})
91
        },
92
        'im.astakosuserauthprovider': {
93
            'Meta': {'ordering': "('module', 'created')", 'unique_together': "(('identifier', 'module', 'user'),)", 'object_name': 'AstakosUserAuthProvider'},
94
            'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
95
            'affiliation': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True', 'blank': 'True'}),
96
            'auth_backend': ('django.db.models.fields.CharField', [], {'default': "'astakos'", 'max_length': '255'}),
97
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
98
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
99
            'identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
100
            'info_data': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}),
101
            'module': ('django.db.models.fields.CharField', [], {'default': "'local'", 'max_length': '255'}),
102
            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'auth_providers'", 'to': "orm['im.AstakosUser']"})
103
        },
104
        'im.astakosuserquota': {
105
            'Meta': {'unique_together': "(('resource', 'user'),)", 'object_name': 'AstakosUserQuota'},
106
            'capacity': ('snf_django.lib.db.fields.IntDecimalField', [], {'max_digits': '38', 'decimal_places': '0'}),
107
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
108
            'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"}),
109
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"})
110
        },
111
        'im.authproviderpolicyprofile': {
112
            'Meta': {'ordering': "['priority']", 'object_name': 'AuthProviderPolicyProfile'},
113
            'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
114
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'authpolicy_profiles'", 'symmetrical': 'False', 'to': "orm['auth.Group']"}),
115
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
116
            'is_exclusive': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
117
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
118
            'policy_add': ('django.db.models.fields.NullBooleanField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
119
            'policy_automoderate': ('django.db.models.fields.NullBooleanField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
120
            'policy_create': ('django.db.models.fields.NullBooleanField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
121
            'policy_limit': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
122
            'policy_login': ('django.db.models.fields.NullBooleanField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
123
            'policy_remove': ('django.db.models.fields.NullBooleanField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
124
            'policy_required': ('django.db.models.fields.NullBooleanField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
125
            'policy_switch': ('django.db.models.fields.NullBooleanField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
126
            'priority': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
127
            'provider': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
128
            'users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'authpolicy_profiles'", 'symmetrical': 'False', 'to': "orm['im.AstakosUser']"})
129
        },
130
        'im.chain': {
131
            'Meta': {'object_name': 'Chain'},
132
            'chain': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
133
        },
134
        'im.emailchange': {
135
            'Meta': {'object_name': 'EmailChange'},
136
            'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40', 'db_index': 'True'}),
137
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
138
            'new_email_address': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
139
            'requested_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
140
            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'emailchanges'", 'unique': 'True', 'to': "orm['im.AstakosUser']"})
141
        },
142
        'im.invitation': {
143
            'Meta': {'object_name': 'Invitation'},
144
            'code': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True'}),
145
            'consumed': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
146
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
147
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
148
            'inviter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'invitations_sent'", 'null': 'True', 'to': "orm['im.AstakosUser']"}),
149
            'is_consumed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
150
            'realname': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
151
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
152
        },
153
        'im.pendingthirdpartyuser': {
154
            'Meta': {'unique_together': "(('provider', 'third_party_identifier'),)", 'object_name': 'PendingThirdPartyUser'},
155
            'affiliation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
156
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
157
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
158
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
159
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
160
            'info': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}),
161
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
162
            'provider': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
163
            'third_party_identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
164
            'token': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
165
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
166
        },
167
        'im.project': {
168
            'Meta': {'object_name': 'Project'},
169
            'application': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'project'", 'unique': 'True', 'to': "orm['im.ProjectApplication']"}),
170
            'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
171
            'deactivation_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
172
            'deactivation_reason': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
173
            'id': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'chained_project'", 'unique': 'True', 'primary_key': 'True', 'db_column': "'id'", 'to': "orm['im.Chain']"}),
174
            'last_approval_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
175
            'members': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.AstakosUser']", 'through': "orm['im.ProjectMembership']", 'symmetrical': 'False'}),
176
            'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'unique': 'True', 'null': 'True', 'db_index': 'True'}),
177
            'state': ('django.db.models.fields.IntegerField', [], {'default': '1', 'db_index': 'True'})
178
        },
179
        'im.projectapplication': {
180
            'Meta': {'unique_together': "(('chain', 'id'),)", 'object_name': 'ProjectApplication'},
181
            'applicant': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'projects_applied'", 'to': "orm['im.AstakosUser']"}),
182
            'chain': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'chained_apps'", 'db_column': "'chain'", 'to': "orm['im.Chain']"}),
183
            'comments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
184
            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
185
            'end_date': ('django.db.models.fields.DateTimeField', [], {}),
186
            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '255', 'null': 'True'}),
187
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
188
            'issue_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
189
            'limit_on_members_number': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
190
            'member_join_policy': ('django.db.models.fields.IntegerField', [], {}),
191
            'member_leave_policy': ('django.db.models.fields.IntegerField', [], {}),
192
            'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
193
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'projects_owned'", 'to': "orm['im.AstakosUser']"}),
194
            'precursor_application': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.ProjectApplication']", 'null': 'True', 'blank': 'True'}),
195
            'resource_grants': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.ProjectResourceGrant']", 'blank': 'True'}),
196
            'response': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
197
            'response_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
198
            'start_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
199
            'state': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'})
200
        },
201
        'im.projectmembership': {
202
            'Meta': {'unique_together': "(('person', 'project'),)", 'object_name': 'ProjectMembership'},
203
            'acceptance_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'db_index': 'True'}),
204
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
205
            'leave_request_date': ('django.db.models.fields.DateField', [], {'null': 'True'}),
206
            'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}),
207
            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Project']"}),
208
            'request_date': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'blank': 'True'}),
209
            'state': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'})
210
        },
211
        'im.projectmembershiphistory': {
212
            'Meta': {'object_name': 'ProjectMembershipHistory'},
213
            'date': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'blank': 'True'}),
214
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
215
            'person': ('django.db.models.fields.BigIntegerField', [], {}),
216
            'project': ('django.db.models.fields.BigIntegerField', [], {}),
217
            'reason': ('django.db.models.fields.IntegerField', [], {}),
218
            'serial': ('django.db.models.fields.BigIntegerField', [], {})
219
        },
220
        'im.projectresourcegrant': {
221
            'Meta': {'unique_together': "(('resource', 'project_application'),)", 'object_name': 'ProjectResourceGrant'},
222
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
223
            'member_capacity': ('snf_django.lib.db.fields.IntDecimalField', [], {'default': '0', 'max_digits': '38', 'decimal_places': '0'}),
224
            'project_application': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.ProjectApplication']", 'null': 'True'}),
225
            'project_capacity': ('snf_django.lib.db.fields.IntDecimalField', [], {'null': 'True', 'max_digits': '38', 'decimal_places': '0'}),
226
            'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"})
227
        },
228
        'im.resource': {
229
            'Meta': {'object_name': 'Resource'},
230
            'allow_in_projects': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
231
            'desc': ('django.db.models.fields.TextField', [], {'null': 'True'}),
232
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
233
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
234
            'service': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Service']"}),
235
            'unit': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
236
            'uplimit': ('snf_django.lib.db.fields.IntDecimalField', [], {'default': '0', 'max_digits': '38', 'decimal_places': '0'})
237
        },
238
        'im.serial': {
239
            'Meta': {'object_name': 'Serial'},
240
            'serial': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
241
        },
242
        'im.service': {
243
            'Meta': {'object_name': 'Service'},
244
            'api_url': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
245
            'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
246
            'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
247
            'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
248
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
249
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}),
250
            'url': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'})
251
        },
252
        'im.sessioncatalog': {
253
            'Meta': {'object_name': 'SessionCatalog'},
254
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
255
            'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
256
            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sessions'", 'null': 'True', 'to': "orm['im.AstakosUser']"})
257
        },
258
        'im.usersetting': {
259
            'Meta': {'unique_together': "(('user', 'setting'),)", 'object_name': 'UserSetting'},
260
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
261
            'setting': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
262
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"}),
263
            'value': ('django.db.models.fields.IntegerField', [], {})
264
        }
265
    }
266

  
267
    complete_apps = ['im']
b/snf-astakos-app/astakos/im/models.py
203 203
    service = models.ForeignKey(Service)
204 204
    unit = models.CharField(_('Unit'), null=True, max_length=255)
205 205
    uplimit = intDecimalField(default=0)
206
    allow_in_projects = models.BooleanField(default=True)
206 207

  
207 208
    objects = ForUpdateManager()
208 209

  
......
216 217
        return {'service': str(self.service),
217 218
                'description': self.desc,
218 219
                'unit': self.unit,
220
                'allow_in_projects': self.allow_in_projects,
219 221
                }
220 222

  
221 223
    @property
b/snf-astakos-app/astakos/im/resources.py
37 37

  
38 38
logger = logging.getLogger(__name__)
39 39

  
40
fields = ['name', 'desc', 'unit']
40
fields = ['name', 'desc', 'unit', 'allow_in_projects']
41 41

  
42 42

  
43 43
class ResourceException(Exception):

Also available in: Unified diff