forms.py 557 B

1234567891011121314
  1. #coding:utf-8
  2. from django import forms
  3. from DjangoUeditor.widgets import UEditorWidget
  4. from DjangoUeditor.forms import UEditorField
  5. from models import Blog
  6. class TestUEditorForm(forms.Form):
  7. Name=forms.CharField('姓名')
  8. ImagePath=forms.CharField()
  9. Description=UEditorField("描述",initial="abc",width=600,height=800)
  10. Content=forms.CharField(label="内容",widget=UEditorWidget(width=800,height=500, imagePath='aa', filePath='bb',toolbars={}))
  11. class TestUeditorModelForm(forms.ModelForm):
  12. class Meta:
  13. model=Blog