comparison gcalendar/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 68c3343f3318
comparison
equal deleted inserted replaced
1016:fd70e9d547ed 1017:21c592cac71c
2 Forms for the gcalendar application. 2 Forms for the gcalendar application.
3 """ 3 """
4 import datetime 4 import datetime
5 import pytz 5 import pytz
6 from django import forms 6 from django import forms
7 from django.conf import settings
8 7
9 from gcalendar.models import Event 8 from gcalendar.models import Event
10 9
11 10
12 TIME_CHOICES = ( 11 TIME_CHOICES = (
80 class Meta: 79 class Meta:
81 model = Event 80 model = Event
82 fields = ('what', 'start_date', 'start_time', 'end_date', 'end_time', 81 fields = ('what', 'start_date', 'start_time', 'end_date', 'end_time',
83 'all_day', 'time_zone', 'where', 'description', 'create_forum_thread') 82 'all_day', 'time_zone', 'where', 'description', 'create_forum_thread')
84 83
85 class Media:
86 css = {
87 'all': (settings.GPP_THIRD_PARTY_CSS['markitup'] +
88 settings.GPP_THIRD_PARTY_CSS['jquery-ui'] +
89 ['css/gcalendar.css'])
90 }
91 js = (settings.GPP_THIRD_PARTY_JS['markitup'] +
92 settings.GPP_THIRD_PARTY_JS['jquery-ui'] +
93 ['js/timezone.js', 'js/gcalendar.js'])
94
95 def __init__(self, *args, **kwargs): 84 def __init__(self, *args, **kwargs):
96 initial = kwargs.get('initial', {}) 85 initial = kwargs.get('initial', {})
97 instance = kwargs.get('instance', None) 86 instance = kwargs.get('instance', None)
98 87
99 if len(args) == 0: # no POST arguments 88 if len(args) == 0: # no POST arguments