2013-07-30 01:19:04 +08:00
|
|
|
from __future__ import unicode_literals
|
2011-10-14 05:34:56 +08:00
|
|
|
|
2010-10-18 21:34:47 +08:00
|
|
|
from django import forms
|
|
|
|
|
2011-10-14 05:34:56 +08:00
|
|
|
from .models import Author
|
2010-10-18 21:34:47 +08:00
|
|
|
|
|
|
|
|
|
|
|
class AuthorForm(forms.ModelForm):
|
|
|
|
name = forms.CharField()
|
|
|
|
slug = forms.SlugField()
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
model = Author
|
2013-02-22 05:56:55 +08:00
|
|
|
fields = ['name', 'slug']
|
2012-12-04 20:18:57 +08:00
|
|
|
|
|
|
|
|
|
|
|
class ContactForm(forms.Form):
|
|
|
|
name = forms.CharField()
|
|
|
|
message = forms.CharField(widget=forms.Textarea)
|