move apps to own dir
This commit is contained in:
parent
7b23537ce1
commit
fd9b9c34c7
29 changed files with 4 additions and 0 deletions
18
apps/member/forms.py
Normal file
18
apps/member/forms.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# -*- mode: python; coding: utf-8 -*-
|
||||
# Copyright (C) 2018-2019 by BDE ENS Paris-Saclay
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from django.contrib.auth.forms import UserChangeForm
|
||||
|
||||
|
||||
class CustomUserChangeForm(UserChangeForm):
|
||||
"""
|
||||
Make first name, last name and email required
|
||||
in the default Django Auth User model
|
||||
"""
|
||||
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue