2020-07-28 20:15:34 +02:00
|
|
|
from django import forms
|
|
|
|
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
|
2020-07-29 20:22:04 +02:00
|
|
|
from .models import Explorer, Place
|
2020-07-28 20:15:34 +02:00
|
|
|
|
|
|
|
class ExplorerCreationForm(UserCreationForm):
|
|
|
|
class Meta:
|
|
|
|
model = Explorer
|
|
|
|
fields = ('username', 'email')
|
|
|
|
|
|
|
|
class ExplorerChangeForm(UserChangeForm):
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
model = Explorer
|
|
|
|
fields = ('username', 'email')
|
2020-07-29 20:22:04 +02:00
|
|
|
|
|
|
|
class PlaceForm(forms.ModelForm):
|
|
|
|
class Meta:
|
|
|
|
model = Place
|
|
|
|
fields = '__all__'
|
|
|
|
exclude = ['submitted_by']
|