equal
deleted
inserted
replaced
35 new_profile.save() |
35 new_profile.save() |
36 return new_user |
36 return new_user |
37 except IntegrityError: |
37 except IntegrityError: |
38 pass |
38 pass |
39 |
39 |
40 def create_event(title, desc, start_date, stop_date, created_by=None): |
40 def create_event(title, description, start_date, stop_date, created_by=None): |
41 """ make an event and save it. |
41 """ make an event and save it. |
42 """ |
42 """ |
43 |
43 |
44 new_event = Event() |
44 new_event = Event() |
45 new_event.title = title |
45 new_event.title = title |
46 new_event.description = desc |
46 new_event.description = description |
47 new_event.start_date = start_date |
47 new_event.start_date = start_date |
48 new_event.stop_date = stop_date |
48 new_event.stop_date = stop_date |
49 new_event.save() |
49 new_event.save() |
50 if created_by: |
50 if created_by: |
51 new_event.organizers.add(created_by) |
51 new_event.organizers.add(created_by) |