Exemplo n.º 1
0
 def tags(self, create, extracted, **kwargs):
     tags = []
     if extracted:
         tags = extracted
     else:
         if MembershipApplicationTag.objects.all().count():
             tags = get_random_objects(MembershipApplicationTag, random.randint(1, MembershipApplicationTag.objects.all().count()))
     for tag in tags:
         self.tags.add(tag)
Exemplo n.º 2
0
 def grants(self, create, extracted, **kwargs):
     grants = []
     if extracted:
         grants = extracted
     else:
         if AccessType.objects.all().count():
             grants = get_random_objects(AccessType, random.randint(1, AccessType.objects.all().count()))
     for grant in grants:
         self.grants.add(grant)
Exemplo n.º 3
0
 def tags(self, create, extracted, **kwargs):
     tags = []
     if extracted:
         tags = extracted
     else:
         if MembershipApplicationTag.objects.all().count():
             tags = get_random_objects(MembershipApplicationTag, random.randint(1, MembershipApplicationTag.objects.all().count()))
     for tag in tags:
         self.tags.add(tag)
Exemplo n.º 4
0
 def mtypes(self, create, extracted, **kwargs):
     mtypes = []
     if extracted:
         mtypes = extracted
     else:
         if not MemberType.objects.all().count():
             types.generate_standard_set()
         mtypes = get_random_objects(MemberType, random.randint(1, MemberType.objects.all().count()))
     for mtype in mtypes:
         self.mtypes.add(mtype)
Exemplo n.º 5
0
 def mtypes(self, create, extracted, **kwargs):
     mtypes = []
     if extracted:
         mtypes = extracted
     else:
         if not MemberType.objects.all().count():
             types.generate_standard_set()
         mtypes = get_random_objects(MemberType, random.randint(1, MemberType.objects.all().count()))
     for mtype in mtypes:
         self.mtypes.add(mtype)
Exemplo n.º 6
0
 def grants(self, create, extracted, **kwargs):
     grants = []
     if extracted:
         grants = extracted
     else:
         if AccessType.objects.all().count():
             grants = get_random_objects(
                 AccessType,
                 random.randint(1,
                                AccessType.objects.all().count()))
     for grant in grants:
         self.grants.add(grant)