Commit 3084c7dd authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

fix astakosgroup creation form

parent 8174b6ea
......@@ -493,13 +493,14 @@ def get_astakos_group_creation_form(request):
issue_date = forms.DateField(widget=SelectDateWidget())
expiration_date = forms.DateField(widget=SelectDateWidget())
kind = forms.ModelChoiceField(queryset=GroupKind.objects.all(), empty_label=None)
name = forms.URLField()
class Meta:
model = AstakosGroup
def __init__(self, *args, **kwargs):
super(AstakosGroupCreationForm, self).__init__(*args, **kwargs)
self.fields.keyOrder = ['kind', 'name', 'identifier', 'desc', 'issue_date',
self.fields.keyOrder = ['kind', 'name', 'desc', 'issue_date',
'expiration_date', 'estimated_participants',
'moderatation_enabled']
......@@ -508,7 +509,7 @@ def get_astakos_group_creation_form(request):
if commit:
g.save()
g.owner = [request.user]
g.approve_member(request.user)
# g.approve_member(request.user)
return g
return AstakosGroupCreationForm
......
......@@ -20,8 +20,7 @@ class Migration(SchemaMigration):
('group_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.Group'], unique=True, primary_key=True)),
('kind', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.GroupKind'])),
('desc', self.gf('django.db.models.fields.TextField')(null=True)),
('identifier', self.gf('django.db.models.fields.URLField')(default='', unique=True, max_length=200, db_index=True)),
('creation_date', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2012, 8, 2, 22, 23, 54, 131886))),
('creation_date', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2012, 8, 3, 11, 26, 47, 642626))),
('issue_date', self.gf('django.db.models.fields.DateTimeField')(null=True)),
('expiration_date', self.gf('django.db.models.fields.DateTimeField')(null=True)),
('moderatation_enabled', self.gf('django.db.models.fields.BooleanField')(default=False)),
......@@ -38,6 +37,18 @@ class Migration(SchemaMigration):
))
db.send_create_signal('im', ['ResourceMetadata'])
# Adding model 'AstakosGroupQuota'
db.create_table('im_astakosgroupquota', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('limit', self.gf('django.db.models.fields.PositiveIntegerField')()),
('resource', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.Resource'])),
('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.AstakosGroup'], blank=True)),
))
db.send_create_signal('im', ['AstakosGroupQuota'])
# Adding unique constraint on 'AstakosGroupQuota', fields ['resource', 'group']
db.create_unique('im_astakosgroupquota', ['resource_id', 'group_id'])
# Adding model 'Resource'
db.create_table('im_resource', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
......@@ -54,21 +65,12 @@ class Migration(SchemaMigration):
))
db.create_unique('im_resource_meta', ['resource_id', 'resourcemetadata_id'])
# Adding model 'AstakosUserQuota'
db.create_table('im_astakosuserquota', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('limit', self.gf('django.db.models.fields.PositiveIntegerField')()),
('resource', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.Resource'])),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.AstakosUser'])),
))
db.send_create_signal('im', ['AstakosUserQuota'])
# Adding model 'Membership'
db.create_table('im_membership', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('person', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.AstakosUser'])),
('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.AstakosGroup'])),
('date_requested', self.gf('django.db.models.fields.DateField')(default=datetime.datetime(2012, 8, 2, 22, 23, 54, 135644))),
('date_requested', self.gf('django.db.models.fields.DateField')(default=datetime.datetime(2012, 8, 3, 11, 26, 47, 646518))),
('date_joined', self.gf('django.db.models.fields.DateField')(null=True, db_index=True)),
))
db.send_create_signal('im', ['Membership'])
......@@ -76,14 +78,17 @@ class Migration(SchemaMigration):
# Adding unique constraint on 'Membership', fields ['person', 'group']
db.create_unique('im_membership', ['person_id', 'group_id'])
# Adding model 'AstakosGroupQuota'
db.create_table('im_astakosgroupquota', (
# Adding model 'AstakosUserQuota'
db.create_table('im_astakosuserquota', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('limit', self.gf('django.db.models.fields.PositiveIntegerField')()),
('resource', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.Resource'])),
('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.AstakosGroup'])),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['im.AstakosUser'])),
))
db.send_create_signal('im', ['AstakosGroupQuota'])
db.send_create_signal('im', ['AstakosUserQuota'])
# Adding unique constraint on 'AstakosUserQuota', fields ['resource', 'user']
db.create_unique('im_astakosuserquota', ['resource_id', 'user_id'])
# Adding index on 'Service', fields ['name']
db.create_index('im_service', ['name'])
......@@ -102,9 +107,15 @@ class Migration(SchemaMigration):
# Removing index on 'Service', fields ['name']
db.delete_index('im_service', ['name'])
# Removing unique constraint on 'AstakosUserQuota', fields ['resource', 'user']
db.delete_unique('im_astakosuserquota', ['resource_id', 'user_id'])
# Removing unique constraint on 'Membership', fields ['person', 'group']
db.delete_unique('im_membership', ['person_id', 'group_id'])
# Removing unique constraint on 'AstakosGroupQuota', fields ['resource', 'group']
db.delete_unique('im_astakosgroupquota', ['resource_id', 'group_id'])
# Deleting model 'GroupKind'
db.delete_table('im_groupkind')
......@@ -114,20 +125,20 @@ class Migration(SchemaMigration):
# Deleting model 'ResourceMetadata'
db.delete_table('im_resourcemetadata')
# Deleting model 'AstakosGroupQuota'
db.delete_table('im_astakosgroupquota')
# Deleting model 'Resource'
db.delete_table('im_resource')
# Removing M2M table for field meta on 'Resource'
db.delete_table('im_resource_meta')
# Deleting model 'AstakosUserQuota'
db.delete_table('im_astakosuserquota')
# Deleting model 'Membership'
db.delete_table('im_membership')
# Deleting model 'AstakosGroupQuota'
db.delete_table('im_astakosgroupquota')
# Deleting model 'AstakosUserQuota'
db.delete_table('im_astakosuserquota')
# Removing M2M table for field owner on 'AstakosUser'
db.delete_table('im_astakosuser_owner')
......@@ -178,27 +189,26 @@ class Migration(SchemaMigration):
},
'im.approvalterms': {
'Meta': {'object_name': 'ApprovalTerms'},
'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 8, 2, 22, 23, 54, 137733)', 'db_index': 'True'}),
'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 8, 3, 11, 26, 47, 648667)', 'db_index': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'location': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
'im.astakosgroup': {
'Meta': {'object_name': 'AstakosGroup', '_ormbases': ['auth.Group']},
'approval_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 8, 2, 22, 23, 54, 131886)'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 8, 3, 11, 26, 47, 642626)'}),
'desc': ('django.db.models.fields.TextField', [], {'null': 'True'}),
'estimated_participants': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
'expiration_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
'group_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.Group']", 'unique': 'True', 'primary_key': 'True'}),
'identifier': ('django.db.models.fields.URLField', [], {'default': "''", 'unique': 'True', 'max_length': '200', 'db_index': 'True'}),
'issue_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
'kind': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.GroupKind']"}),
'moderatation_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'policy': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.AstakosGroupQuota']", 'blank': 'True'})
},
'im.astakosgroupquota': {
'Meta': {'object_name': 'AstakosGroupQuota'},
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosGroup']"}),
'Meta': {'unique_together': "(('resource', 'group'),)", 'object_name': 'AstakosGroupQuota'},
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosGroup']", 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'limit': ('django.db.models.fields.PositiveIntegerField', [], {}),
'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"})
......@@ -226,7 +236,7 @@ class Migration(SchemaMigration):
'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'})
},
'im.astakosuserquota': {
'Meta': {'object_name': 'AstakosUserQuota'},
'Meta': {'unique_together': "(('resource', 'user'),)", 'object_name': 'AstakosUserQuota'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'limit': ('django.db.models.fields.PositiveIntegerField', [], {}),
'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"}),
......@@ -237,7 +247,7 @@ class Migration(SchemaMigration):
'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40', 'db_index': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'new_email_address': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
'requested_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 8, 2, 22, 23, 54, 139243)'}),
'requested_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 8, 3, 11, 26, 47, 650373)'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'emailchange_user'", 'unique': 'True', 'to': "orm['im.AstakosUser']"})
},
'im.groupkind': {
......@@ -259,7 +269,7 @@ class Migration(SchemaMigration):
'im.membership': {
'Meta': {'unique_together': "(('person', 'group'),)", 'object_name': 'Membership'},
'date_joined': ('django.db.models.fields.DateField', [], {'null': 'True', 'db_index': 'True'}),
'date_requested': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2012, 8, 2, 22, 23, 54, 135644)'}),
'date_requested': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2012, 8, 3, 11, 26, 47, 646518)'}),
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosGroup']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"})
......
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding unique constraint on 'AstakosGroupQuota', fields ['group', 'resource']
db.create_unique('im_astakosgroupquota', ['group_id', 'resource_id'])
# Adding unique constraint on 'AstakosUserQuota', fields ['resource', 'user']
db.create_unique('im_astakosuserquota', ['resource_id', 'user_id'])
def backwards(self, orm):
# Removing unique constraint on 'AstakosUserQuota', fields ['resource', 'user']
db.delete_unique('im_astakosuserquota', ['resource_id', 'user_id'])
# Removing unique constraint on 'AstakosGroupQuota', fields ['group', 'resource']
db.delete_unique('im_astakosgroupquota', ['group_id', 'resource_id'])
models = {
'auth.group': {
'Meta': {'object_name': 'Group'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
'auth.permission': {
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
'im.additionalmail': {
'Meta': {'object_name': 'AdditionalMail'},
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"})
},
'im.approvalterms': {
'Meta': {'object_name': 'ApprovalTerms'},
'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 8, 3, 1, 33, 55, 30509)', 'db_index': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'location': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
'im.astakosgroup': {
'Meta': {'object_name': 'AstakosGroup', '_ormbases': ['auth.Group']},
'approval_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 8, 3, 1, 33, 55, 24384)'}),
'desc': ('django.db.models.fields.TextField', [], {'null': 'True'}),
'estimated_participants': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
'expiration_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
'group_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.Group']", 'unique': 'True', 'primary_key': 'True'}),
'identifier': ('django.db.models.fields.URLField', [], {'default': "''", 'unique': 'True', 'max_length': '200', 'db_index': 'True'}),
'issue_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
'kind': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.GroupKind']"}),
'moderatation_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'policy': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.AstakosGroupQuota']", 'blank': 'True'})
},
'im.astakosgroupquota': {
'Meta': {'unique_together': "(('resource', 'group'),)", 'object_name': 'AstakosGroupQuota'},
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosGroup']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'limit': ('django.db.models.fields.PositiveIntegerField', [], {}),
'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"})
},
'im.astakosuser': {
'Meta': {'unique_together': "(('provider', 'third_party_identifier'),)", 'object_name': 'AstakosUser', '_ormbases': ['auth.User']},
'activation_sent': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'affiliation': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'astakos_groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.AstakosGroup']", 'symmetrical': 'False', 'through': "orm['im.Membership']", 'blank': 'True'}),
'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
'date_signed_terms': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'email_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'has_credits': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'has_signed_terms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'invitations': ('django.db.models.fields.IntegerField', [], {'default': '100'}),
'is_verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'owner': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'owner'", 'null': 'True', 'to': "orm['im.AstakosGroup']"}),
'policy': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.Resource']", 'null': 'True', 'through': "orm['im.AstakosUserQuota']", 'symmetrical': 'False'}),
'provider': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'third_party_identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'updated': ('django.db.models.fields.DateTimeField', [], {}),
'user_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True', 'primary_key': 'True'})
},
'im.astakosuserquota': {
'Meta': {'unique_together': "(('resource', 'user'),)", 'object_name': 'AstakosUserQuota'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'limit': ('django.db.models.fields.PositiveIntegerField', [], {}),
'resource': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Resource']"}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"})
},
'im.emailchange': {
'Meta': {'object_name': 'EmailChange'},
'activation_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40', 'db_index': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'new_email_address': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
'requested_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 8, 3, 1, 33, 55, 32043)'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'emailchange_user'", 'unique': 'True', 'to': "orm['im.AstakosUser']"})
},
'im.groupkind': {
'Meta': {'object_name': 'GroupKind'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'})
},
'im.invitation': {
'Meta': {'object_name': 'Invitation'},
'code': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True'}),
'consumed': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'inviter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'invitations_sent'", 'null': 'True', 'to': "orm['im.AstakosUser']"}),
'is_consumed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'realname': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
},
'im.membership': {
'Meta': {'unique_together': "(('person', 'group'),)", 'object_name': 'Membership'},
'date_joined': ('django.db.models.fields.DateField', [], {'null': 'True', 'db_index': 'True'}),
'date_requested': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2012, 8, 3, 1, 33, 55, 28179)'}),
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosGroup']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'person': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.AstakosUser']"})
},
'im.resource': {
'Meta': {'object_name': 'Resource'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'meta': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['im.ResourceMetadata']", 'symmetrical': 'False'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}),
'service': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['im.Service']"})
},
'im.resourcemetadata': {
'Meta': {'object_name': 'ResourceMetadata'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}),
'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
'im.service': {
'Meta': {'object_name': 'Service'},
'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
'icon': ('django.db.models.fields.FilePathField', [], {'max_length': '100', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}),
'url': ('django.db.models.fields.FilePathField', [], {'max_length': '100'})
}
}
complete_apps = ['im']
......@@ -109,14 +109,13 @@ class GroupKind(models.Model):
class AstakosGroup(Group):
kind = models.ForeignKey(GroupKind)
desc = models.TextField('Description', null=True)
identifier = models.URLField('URI identifier', unique=True, default='', db_index=True)
policy = models.ManyToManyField(Resource, null=True, blank=True, through='AstakosGroupQuota')
creation_date = models.DateTimeField('Creation date', default=datetime.now())
issue_date = models.DateTimeField('Issue date', null=True)
expiration_date = models.DateTimeField('Expiration date', null=True)
moderatation_enabled = models.BooleanField('Moderated membership?', default=False)
approval_date = models.DateTimeField('Activation date', null=True, blank=True)
estimated_participants = models.PositiveIntegerField('Estimated number of participants', null=True)
estimated_participants = models.PositiveIntegerField('Estimated #participants', null=True)
@property
def is_disabled(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment