Skip to content

Commit

Permalink
mark fields as required in the registration form; fixes #58
Browse files Browse the repository at this point in the history
  • Loading branch information
Akasch committed Jan 20, 2020
1 parent f96efcf commit 6620eb1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bitpoll/registration/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@


class RegisterForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['first_name'].required = True
self.fields['last_name'].required = True
self.fields['email'].required = True

class Meta:
model = BitpollUser
fields = ['username', 'first_name', 'last_name', 'email', 'auto_watch',
Expand Down

0 comments on commit 6620eb1

Please sign in to comment.