Event resturcturing

- new short_description field instead of title
- autosave text

- autocompletion on login
This commit is contained in:
Martin Bauer
2013-09-28 18:57:19 +02:00
parent 6c3a7ca408
commit d71c35bcd7
32 changed files with 639 additions and 118 deletions

View File

@@ -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