57 lines
1,016 B
Python
57 lines
1,016 B
Python
|
from django import forms
|
||
|
from django.contrib.auth.models import User
|
||
|
|
||
|
from .models import School
|
||
|
|
||
|
|
||
|
class CreateSchool(forms.ModelForm):
|
||
|
class Meta:
|
||
|
model = User
|
||
|
fields = '__all__'
|
||
|
|
||
|
|
||
|
class CreateUser(forms.ModelForm):
|
||
|
class Meta:
|
||
|
model = User
|
||
|
fields = '__all__'
|
||
|
|
||
|
|
||
|
class EditPhone(forms.ModelForm):
|
||
|
class Meta:
|
||
|
model = School
|
||
|
fields = ['phone']
|
||
|
|
||
|
|
||
|
class EditLogo(forms.ModelForm):
|
||
|
class Meta:
|
||
|
model = School
|
||
|
fields = ['logo']
|
||
|
|
||
|
|
||
|
class EditMail(forms.ModelForm):
|
||
|
class Meta:
|
||
|
model = User
|
||
|
fields = ['email']
|
||
|
|
||
|
|
||
|
class EditJury1(forms.ModelForm):
|
||
|
class Meta:
|
||
|
model = School
|
||
|
fields = [
|
||
|
'first_name_j1',
|
||
|
'last_name_j1',
|
||
|
'phone_j1',
|
||
|
'mail_j1'
|
||
|
]
|
||
|
|
||
|
|
||
|
class EditJury2(forms.ModelForm):
|
||
|
class Meta:
|
||
|
model = School
|
||
|
fields = [
|
||
|
'first_name_j2',
|
||
|
'last_name_j2',
|
||
|
'phone_j2',
|
||
|
'mail_j2'
|
||
|
]
|