edit comments
This commit is contained in:
@@ -4,7 +4,7 @@ from model.State import State
|
||||
|
||||
state_bp = Blueprint('state', __name__)
|
||||
|
||||
|
||||
# ----- State page ------
|
||||
@state_bp.route('/add_state', methods=['GET', 'POST'])
|
||||
@login_required
|
||||
def add_state():
|
||||
@@ -19,7 +19,7 @@ def add_state():
|
||||
|
||||
return render_template('add_state.html', statedata=statedata)
|
||||
|
||||
|
||||
# ----- State check ------
|
||||
@state_bp.route('/check_state', methods=['POST'])
|
||||
@login_required
|
||||
def check_state():
|
||||
@@ -28,21 +28,21 @@ def check_state():
|
||||
|
||||
return state.CheckState(request=request)
|
||||
|
||||
|
||||
# ----- State delete by state id ------
|
||||
@state_bp.route('/delete_state/<int:id>')
|
||||
@login_required
|
||||
def deleteState(id):
|
||||
|
||||
state = State()
|
||||
|
||||
msg = state.DeleteState(request=request, id=id)
|
||||
state.DeleteState(request=request, id=id)
|
||||
|
||||
if not state.isSuccess:
|
||||
return state.resultMessage
|
||||
else:
|
||||
return redirect(url_for('state.add_state'))
|
||||
|
||||
|
||||
# ----- State update by state id ------
|
||||
@state_bp.route('/edit_state/<int:id>', methods=['GET', 'POST'])
|
||||
@login_required
|
||||
def editState(id):
|
||||
|
||||
Reference in New Issue
Block a user