mirror of
https://github.com/django/django.git
synced 2024-12-26 11:06:07 +00:00
19 lines
343 B
Python
19 lines
343 B
Python
from __future__ import absolute_import
|
|
|
|
from django import forms
|
|
|
|
from .models import Author
|
|
|
|
|
|
class AuthorForm(forms.ModelForm):
|
|
name = forms.CharField()
|
|
slug = forms.SlugField()
|
|
|
|
class Meta:
|
|
model = Author
|
|
|
|
|
|
class ContactForm(forms.Form):
|
|
name = forms.CharField()
|
|
message = forms.CharField(widget=forms.Textarea)
|