Allow user to provide his first and last name on registration.
This commit is contained in:
		| @@ -13,7 +13,7 @@ from lostplaces.models import Place, PlaceImage, Voucher | |||||||
| class ExplorerCreationForm(UserCreationForm): | class ExplorerCreationForm(UserCreationForm): | ||||||
|     class Meta: |     class Meta: | ||||||
|         model = User |         model = User | ||||||
|         fields = ('username', 'email') |         fields = ('username', 'email', 'first_name', 'last_name') | ||||||
|     voucher = forms.CharField( |     voucher = forms.CharField( | ||||||
|         max_length=30, |         max_length=30, | ||||||
|         help_text=_('The Voucher you got from an administrator') |         help_text=_('The Voucher you got from an administrator') | ||||||
| @@ -38,7 +38,7 @@ class ExplorerCreationForm(UserCreationForm): | |||||||
| class ExplorerChangeForm(UserChangeForm): | class ExplorerChangeForm(UserChangeForm): | ||||||
|     class Meta: |     class Meta: | ||||||
|         model = User |         model = User | ||||||
|         fields = ('username', 'email') |         fields = ('username', 'email', 'first_name', 'last_name') | ||||||
|  |  | ||||||
| class PlaceForm(forms.ModelForm): | class PlaceForm(forms.ModelForm): | ||||||
|     class Meta: |     class Meta: | ||||||
|   | |||||||
| @@ -19,6 +19,14 @@ | |||||||
|                 {% include 'partials/form/inputField.html' with field=form.email %} |                 {% include 'partials/form/inputField.html' with field=form.email %} | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|  |         <div class="LP-Form__Composition LP-Form__Composition--breakable"> | ||||||
|  |             <div class="LP-Form__Field"> | ||||||
|  |                 {% include 'partials/form/inputField.html' with field=form.first_name %} | ||||||
|  |             </div> | ||||||
|  |             <div class="LP-Form__Field"> | ||||||
|  |                 {% include 'partials/form/inputField.html' with field=form.last_name %} | ||||||
|  |             </div> | ||||||
|  |         </div> | ||||||
|  |  | ||||||
|         <div class="LP-Form__Composition"> |         <div class="LP-Form__Composition"> | ||||||
|             <div class="LP-Form__Field"> |             <div class="LP-Form__Field"> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user