From 9ae3185adef25d93cbf93c6568578c2c87a8b677 Mon Sep 17 00:00:00 2001 From: boyska Date: Fri, 9 Sep 2016 10:53:26 +0200 Subject: [PATCH] UI: redirect to edit_event after adding time --- larigira/dbadmin/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/larigira/dbadmin/__init__.py b/larigira/dbadmin/__init__.py index 11b8e67..a9e6ffb 100644 --- a/larigira/dbadmin/__init__.py +++ b/larigira/dbadmin/__init__.py @@ -6,7 +6,7 @@ Templates are self-contained in this directory from __future__ import print_function from flask import current_app, Blueprint, render_template, jsonify, abort, \ - request + request, redirect, url_for from larigira.entrypoints_utils import get_avail_entrypoints from larigira import forms @@ -41,7 +41,7 @@ def addtime_kind(kind): data = receiver(form) model = current_app.larigira.monitor.source.model eid = model.add_alarm(data) - return jsonify(dict(inserted=eid, data=data)) + return redirect(url_for('db.edit_event', alarmid=eid)) return render_template('add_time_kind.html', form=form, kind=kind)