comparison downloads/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 ee87ea74d46b
children a5ebc74dc3f3
comparison
equal deleted inserted replaced
1016:fd70e9d547ed 1017:21c592cac71c
2 Forms for the downloads application. 2 Forms for the downloads application.
3 """ 3 """
4 import os 4 import os
5 5
6 from django import forms 6 from django import forms
7 from django.conf import settings
8 7
9 from downloads.models import PendingDownload 8 from downloads.models import PendingDownload
10 from downloads.models import AllowedExtension 9 from downloads.models import AllowedExtension
11 10
12 11
26 raise forms.ValidationError('The file extension "%s" is not allowed.' % ext) 25 raise forms.ValidationError('The file extension "%s" is not allowed.' % ext)
27 26
28 class Meta: 27 class Meta:
29 model = PendingDownload 28 model = PendingDownload
30 fields = ('title', 'category', 'description', 'file') 29 fields = ('title', 'category', 'description', 'file')
31
32 class Media:
33 css = {
34 'all': (settings.GPP_THIRD_PARTY_CSS['markitup'] +
35 settings.GPP_THIRD_PARTY_CSS['jquery-ui'])
36 }
37 js = (settings.GPP_THIRD_PARTY_JS['markitup'] +
38 settings.GPP_THIRD_PARTY_JS['jquery-ui'])