Timeline
This package contains views related to the ward timelines
Mode Switch View
- class ycms.cms.views.timeline.mode_switch_view.ModeSwitchView(**kwargs)
Bases:
UpdateViewView to the mode in which a user sees wards
- dispatch(request, *args, **kwargs)
- fields = ['ward_as_timeline']
- get_object(queryset=None)
Return the object the view is displaying.
Require self.queryset and a pk or slug argument in the URLconf. Subclasses can override this to return any object.
- get_success_url()
Return the URL to redirect to after processing a valid form.
Timeline View
- class ycms.cms.views.timeline.timeline_view.TimelineView(**kwargs)
Bases:
TemplateViewView to see a ward as a timeline
- dispatch(request, *args, **kwargs)
- get_context_data(**kwargs)
This function returns a list of all bed future or current bed assignments to the ward, formatted so that vis-timeline.js can visualize them
- Parameters:
kwargs (dict) – The supplied keyword arguments
- Returns:
Response for filtered offers
- Return type:
- post(request, *args, **kwargs)
Method to bulk-save bed assignments submitted through the timeline
- Parameters:
request (HttpRequest) – The current request
*args (list) – The supplied arguments
**kwargs (dict) – The supplied keyword arguments
- Returns:
Redirect to list of wards
- Return type:
- template_name = 'timeline/timeline.html'