flows: allow uploading of custom flow backgrounds, update default flow background

This commit is contained in:
Jens Langhammer
2020-12-02 14:24:24 +01:00
parent 821458373d
commit cc5a0c23aa
12 changed files with 97 additions and 25 deletions

View File

@ -235,6 +235,8 @@ class FlowExecutorShellView(TemplateView):
template_name = "flows/shell.html"
def get_context_data(self, **kwargs) -> Dict[str, Any]:
flow: Flow = get_object_or_404(Flow, slug=self.kwargs.get("flow_slug"))
kwargs["background_url"] = flow.background.url
kwargs["exec_url"] = reverse("passbook_flows:flow-executor", kwargs=self.kwargs)
self.request.session[SESSION_KEY_GET] = self.request.GET
return kwargs