24 lines
629 B
Python
24 lines
629 B
Python
from django import forms
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
from webapp.models import OhlhafvChallenge, KaehmyForm
|
|
|
|
|
|
class KaehmyForm_Form(forms.ModelForm):
|
|
|
|
custom_role_name = forms.TextInput(
|
|
attrs={'size': 10, 'title': 'Name of the role', })
|
|
|
|
class Meta:
|
|
model = KaehmyForm
|
|
fields = ['name', 'email', 'year',
|
|
'preset_roles', 'custom_roles', 'text']
|
|
|
|
|
|
class OhlhafvForm(forms.ModelForm):
|
|
|
|
class Meta:
|
|
model = OhlhafvChallenge
|
|
fields = ['challenger', 'challenger_email',
|
|
'victim', 'victim_email', 'series', 'message']
|