diff --git a/tasks/forms.py b/tasks/forms.py index 99f1fe3..eef1f93 100644 --- a/tasks/forms.py +++ b/tasks/forms.py @@ -15,3 +15,6 @@ class EventForm(forms.ModelForm): self.fields['date'].initial = datetime.now() self.fields['user'].initial = user + if not user.is_staff: + print(list(self.fields['user'].choices)) + self.fields['user'].choices = [(user.id, user)]