19 lines
464 B
Python
19 lines
464 B
Python
from django import forms
|
|
from django.forms import ModelForm
|
|
from .models import PersLetter
|
|
|
|
|
|
class PersLetterForm(forms.ModelForm):
|
|
|
|
class Meta:
|
|
model = PersLetter
|
|
fields = ['text']
|
|
|
|
labels = {
|
|
'text' : "Ihr persönlicher Text"
|
|
}
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
super(PersLetterForm, self).__init__(*args, **kwargs)
|
|
self.fields['text'] = forms.CharField(label="Ihr persönlicher Text", widget=forms.Textarea(attrs={"rows":15, "cols":35}))
|
|
|