Revision 272cf735 snf-astakos-app/astakos/im/models.py

b/snf-astakos-app/astakos/im/models.py
1004 1004
### PROJECTS ###
1005 1005
################
1006 1006

  
1007
class MemberJoinPolicy(models.Model):
1008
    policy = models.CharField(_('Policy'), max_length=255, unique=True, db_index=True)
1009
    description = models.CharField(_('Description'), max_length=80)
1010

  
1011
    def __str__(self):
1012
        return self.description.capitalize()
1013

  
1014
class MemberLeavePolicy(models.Model):
1015
    policy = models.CharField(_('Policy'), max_length=255, unique=True, db_index=True)
1016
    description = models.CharField(_('Description'), max_length=80)
1017

  
1018
    def __str__(self):
1019
        return self.description.capitalize()
1020

  
1021 1007
def synced_model_metaclass(class_name, class_parents, class_attributes):
1022 1008

  
1023 1009
    new_attributes = {}
......
1176 1162
                                                 help_text=_("Please provide a short but descriptive abstract of your Project, so that anyone searching can quickly understand what this Project is about. "))
1177 1163
    start_date              =   models.DateTimeField(help_text=_("Here you specify the date you want your Project to start granting its resources. Its members will get the resources coming from this Project on this exact date."))
1178 1164
    end_date                =   models.DateTimeField(help_text=_("Here you specify the date you want your Project to cease. This means that after this date all members will no longer be able to allocate resources from this Project.  "))
1179
    member_join_policy      =   models.ForeignKey(MemberJoinPolicy)
1180
    member_leave_policy     =   models.ForeignKey(MemberLeavePolicy)
1165
    member_join_policy      =   models.IntegerField()
1166
    member_leave_policy     =   models.IntegerField()
1181 1167
    limit_on_members_number =   models.PositiveIntegerField(null=True,
1182 1168
                                                            blank=True,help_text=_("Here you specify the number of members this Project is going to have. This means that this number of people will be granted the resources you will specify in the next step. This can be '1' if you are the only one wanting to get resources. "))
1183 1169
    resource_grants         =   models.ManyToManyField(

Also available in: Unified diff