18 lines
482 B
Python
18 lines
482 B
Python
from flask import abort
|
|
|
|
import db
|
|
|
|
from core.flask_app import app
|
|
from .data_form import _data_form
|
|
|
|
|
|
@app.route("/game/<slug>/objects/<int:definition_id>/data/<int:row_id>/edit", methods=["GET", "POST"])
|
|
def data_edit(slug, definition_id, row_id):
|
|
definition = db.get_definition(slug, definition_id)
|
|
if not definition:
|
|
abort(404)
|
|
row = db.get_row(slug, definition, row_id)
|
|
if not row:
|
|
abort(404)
|
|
return _data_form(slug, definition_id, row=row)
|