Event resturcturing
- new short_description field instead of title - autosave text - autocompletion on login
This commit is contained in:
@@ -119,7 +119,7 @@ class EventForm( ModelForm ):
|
||||
|
||||
class Meta:
|
||||
model = Event
|
||||
fields= [ 'type', 'title', 'date','time', 'meeting_time', 'location', 'map_location', 'desc', ]
|
||||
fields= [ 'type', 'short_desc', 'date', 'end_date', 'time', 'meeting_time', 'location', 'map_location', 'desc', ]
|
||||
|
||||
widgets = {
|
||||
'location' : TextInput(),
|
||||
@@ -132,13 +132,24 @@ class EventUpdate( UpdateView ):
|
||||
model = Event
|
||||
template_name_suffix = "_update_form"
|
||||
success_url = '.'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(UpdateView, self).get_context_data(**kwargs)
|
||||
context['viewtype'] = "update"
|
||||
return context
|
||||
|
||||
|
||||
class EventCreate( CreateView ):
|
||||
|
||||
form_class = EventForm
|
||||
model = Event
|
||||
template_name_suffix = "_update_form"
|
||||
success_url = '.'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(CreateView, self).get_context_data(**kwargs)
|
||||
context['viewtype'] = "create"
|
||||
return context
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user