diff options
| author | Mark Weiman <mark.weiman@markzz.com> | 2015-10-11 01:00:38 -0400 |
|---|---|---|
| committer | Mark Weiman <mark.weiman@markzz.com> | 2015-10-11 01:00:38 -0400 |
| commit | 57aa89824a8dabb631c15af986a39e779d0fe3cb (patch) | |
| tree | 2df3bf79026e1c544e57375566297bcc7634afa5 /root/forms.py | |
| download | website-57aa89824a8dabb631c15af986a39e779d0fe3cb.tar.gz website-57aa89824a8dabb631c15af986a39e779d0fe3cb.zip | |
inital
Diffstat (limited to 'root/forms.py')
| -rw-r--r-- | root/forms.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/root/forms.py b/root/forms.py new file mode 100644 index 0000000..9c00925 --- /dev/null +++ b/root/forms.py @@ -0,0 +1,15 @@ +from django.forms import ModelForm + +from .models import Page + + +class PageForm(ModelForm): + class Meta: + model = Page + fields = ['name', 'title', 'subtitle', 'header_image', 'body'] + exclude = ['edited'] + + def __init__(self, *args, **kwargs): + super(PageForm, self).__init__(*args, **kwargs) + self.fields['body'].widget.attrs['cols'] = 60 + self.fields['body'].widget.attrs['rows'] = 25
\ No newline at end of file |
