Commit 35b4754b authored by fred's avatar fred

edit: prefill duration when adding an episode

parent d4aaf49f
......@@ -101,6 +101,7 @@ class EpisodeCreateView(CreateView):
def get_initial(self):
initial = super(EpisodeCreateView, self).get_initial()
initial['emission'] = Emission.objects.get(slug=self.kwargs.get('emission_slug'))
initial['duration'] = initial['emission'].duration
return initial
def get_context_data(self, **kwargs):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment