Exemple #1
0
 def make_community(self, user):
     self.admin = user
     self.save()
     user.community = self
     user.save()
     #create the Home shed that is present in all commuinties
     shed = Shed(community=self, name="Home", shed_address="Home", is_home=True)
     shed.save()
     community_wall = communityWall(wall_name=str(self.zipcode), community=self)
     community_wall.save()
     deleted = communityWall(wall_name="deleted", community=self, is_deleted=True)
     deleted.save()
Exemple #2
0
 def setUp(self):
     # create community
     community = Community(
         zipcode = 14626,
         name = 'First Community')
     community.save()
     # create community wall
     community_wall = communityWall(
         wall_name = 'Test Wall Name',
         community = community)