Merge branch 'documents' into beta
This commit is contained in:
commit
6ea92cdcde
13 changed files with 143 additions and 88 deletions
|
|
@ -54,6 +54,15 @@ class ActivityForm(forms.ModelForm):
|
|||
|
||||
class GuestForm(forms.ModelForm):
|
||||
def clean(self):
|
||||
"""
|
||||
Someone can be invited as a Guest to an Activity if:
|
||||
- the activity has not already started.
|
||||
- the activity is validated.
|
||||
- the Guest has not already been invited more than 5 times.
|
||||
- the Guest is already invited.
|
||||
- the inviter already invited 3 peoples.
|
||||
"""
|
||||
|
||||
cleaned_data = super().clean()
|
||||
|
||||
if timezone.now() > timezone.localtime(self.activity.date_start):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue