Fix: no success url when saving changes
This commit is contained in:
parent
e34b95f592
commit
bb978e29ce
|
@ -23,8 +23,8 @@ class ContainerListView(LoginRequiredMixin, generic.ListView):
|
||||||
|
|
||||||
class ContainerCreateView(LoginRequiredMixin, generic.CreateView):
|
class ContainerCreateView(LoginRequiredMixin, generic.CreateView):
|
||||||
model = Container
|
model = Container
|
||||||
# template_name = 'container/detail.html'
|
|
||||||
fields = ['named_id', 'description', 'color', 'container_type']
|
fields = ['named_id', 'description', 'color', 'container_type']
|
||||||
|
success_url = '/container/'
|
||||||
|
|
||||||
def form_valid(self, form):
|
def form_valid(self, form):
|
||||||
if not form.instance.named_id.startswith('C-'):
|
if not form.instance.named_id.startswith('C-'):
|
||||||
|
|
Loading…
Reference in New Issue