UI: redirect to edit_event after adding time
Tento commit je obsažen v:
rodič
f990040383
revize
9ae3185ade
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
|
@ -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)
|
||||
|
||||
|
|
Načítání…
Odkázat v novém problému