def create_updates (): """ Create some updates for each Coord. """ coords_list = User.objects.filter (groups__name = 'Coords') for coord in coords_list: # List of all SubTasks where coord is one of the Coords assigned new_update = Update (comment_string = 'Hey This is Me ' + coord.get_profile ().name, author = coord) new_update.save () new_update = Update (comment_string = 'Yo! This is Me again! ' + coord.get_profile ().name, author = coord) new_update.save () new_update = Update (comment_string = 'Guess What? ' + coord.get_profile ().name, author = coord) new_update.save () print 'Coord updates - Created'
def create_updates (): """ Create some updates for each Coord. """ coords_list = User.objects.filter (groups__name = 'Coords') for coord in coords_list: # List of all SubTasks where coord is one of the Coords assigned new_update = Update (comment_string = 'This is me ' + coord.get_profile ().name + ', started working on the subtasks assigned ', author = coord) new_update.save () new_update = Update (comment_string = 'Finished two of the subtasks ' , author = coord) new_update.save () new_update = Update (comment_string = ' This is me ' + coord.get_profile ().name + ', will finish the last subtask by tonight ' , author = coord) new_update.save () print 'Coord updates - Created'
def create_updates(): """ Create some updates for each Coord. """ coords_list = User.objects.filter(groups__name='Coords') for coord in coords_list: # List of all SubTasks where coord is one of the Coords assigned new_update = Update(comment_string='Hey This is Me ' + coord.get_profile().name, author=coord) new_update.save() new_update = Update(comment_string='Yo! This is Me again! ' + coord.get_profile().name, author=coord) new_update.save() new_update = Update(comment_string='Guess What? ' + coord.get_profile().name, author=coord) new_update.save() print 'Coord updates - Created'