diff forums/forms.py @ 1017:21c592cac71c

ManifestStaticFilesStorage: stop using form Media. It's okay for the admin, but not for user facing stuff.
author Brian Neal <bgneal@gmail.com>
date Sun, 06 Dec 2015 14:48:30 -0600
parents 4619290d171d
children
line wrap: on
line diff
--- a/forums/forms.py	Sun Dec 06 13:22:09 2015 -0600
+++ b/forums/forms.py	Sun Dec 06 14:48:30 2015 -0600
@@ -5,7 +5,6 @@
 from collections import OrderedDict
 
 from django import forms
-from django.conf import settings
 
 from forums.models import Forum
 from forums.models import Topic
@@ -18,17 +17,6 @@
 from core.markup import site_markup
 
 
-FORUMS_FORM_CSS = {
-    'all': (settings.GPP_THIRD_PARTY_CSS['markitup'] +
-            settings.GPP_THIRD_PARTY_CSS['jquery-ui'])
-}
-FORUMS_FORM_JS = (
-    settings.GPP_THIRD_PARTY_JS['markitup'] +
-    settings.GPP_THIRD_PARTY_JS['jquery-ui'] +
-    ['js/jquery.form.min.js', 'js/forums.js']
-)
-
-
 class NewPostForm(forms.Form):
     """Form for creating a new post."""
     body = forms.CharField(label='',
@@ -37,10 +25,6 @@
     topic_id = forms.IntegerField(widget=forms.HiddenInput)
     topic = None
 
-    class Media:
-        css = FORUMS_FORM_CSS
-        js = FORUMS_FORM_JS
-
     def __init__(self, *args, **kwargs):
         super(NewPostForm, self).__init__(*args, **kwargs)
         attachments = args[0].getlist('attachment') if len(args) else []
@@ -95,10 +79,6 @@
     forum = None
     has_mod_fields = False
 
-    class Media:
-        css = FORUMS_FORM_CSS
-        js = FORUMS_FORM_JS
-
     def __init__(self, user, forum, *args, **kwargs):
         super(NewTopicForm, self).__init__(*args, **kwargs)
         self.user = user
@@ -176,10 +156,6 @@
         model = Post
         fields = ('body', )
 
-    class Media:
-        css = FORUMS_FORM_CSS
-        js = FORUMS_FORM_JS
-
     def __init__(self, *args, **kwargs):
         topic_name = kwargs.pop('topic_name', None)
         super(PostForm, self).__init__(*args, **kwargs)