36 from soc.logic import out_of_band |
36 from soc.logic import out_of_band |
37 from soc.logic import validate |
37 from soc.logic import validate |
38 from soc.logic.site import id_user |
38 from soc.logic.site import id_user |
39 from soc.views import simple |
39 from soc.views import simple |
40 from soc.views import helper |
40 from soc.views import helper |
|
41 import soc.views.helper.forms |
41 import soc.views.helper.responses |
42 import soc.views.helper.responses |
42 import soc.views.helper.templates |
43 import soc.views.helper.templates |
43 import soc.views.helper.widgets |
44 import soc.views.helper.widgets |
44 from soc.views.helpers import forms_helpers |
|
45 |
45 |
46 import soc.models.site_settings |
46 import soc.models.site_settings |
47 import soc.models.document |
47 import soc.models.document |
48 import soc.logic.document |
48 import soc.logic.document |
49 import soc.logic.site.settings |
49 import soc.logic.site.settings |
50 |
50 |
51 |
51 |
52 class DocumentForm(forms_helpers.DbModelForm): |
52 class DocumentForm(helper.forms.DbModelForm): |
53 content = forms.fields.CharField(widget=helper.widgets.TinyMCE()) |
53 content = forms.fields.CharField(widget=helper.widgets.TinyMCE()) |
54 |
54 |
55 class Meta: |
55 class Meta: |
56 """Inner Meta class that defines some behavior for the form. |
56 """Inner Meta class that defines some behavior for the form. |
57 """ |
57 """ |
61 #: list of model fields which will *not* be gathered by the form |
61 #: list of model fields which will *not* be gathered by the form |
62 exclude = ['partial_path', 'link_name', |
62 exclude = ['partial_path', 'link_name', |
63 'user', 'modified', 'created', 'inheritance_line'] |
63 'user', 'modified', 'created', 'inheritance_line'] |
64 |
64 |
65 |
65 |
66 class SiteSettingsForm(forms_helpers.DbModelForm): |
66 class SiteSettingsForm(helper.forms.DbModelForm): |
67 """Django form displayed when creating or editing Site Settings. |
67 """Django form displayed when creating or editing Site Settings. |
68 """ |
68 """ |
69 class Meta: |
69 class Meta: |
70 """Inner Meta class that defines some behavior for the form. |
70 """Inner Meta class that defines some behavior for the form. |
71 """ |
71 """ |