Skip to content

Instantly share code, notes, and snippets.

@bh-chaker
Created May 1, 2015 17:45
Show Gist options
  • Save bh-chaker/62e1eb815ae977765411 to your computer and use it in GitHub Desktop.
Save bh-chaker/62e1eb815ae977765411 to your computer and use it in GitHub Desktop.
#Delete a category
@app.route('/catalog/<category_name>/delete/<csrf_token>', methods = ['GET','POST'])
def deleteCategory(category_name, csrf_token):
# First check the csrf_token:
if (csrf_token != login_session['csrf_token']):
return redirect('/login')
@linusdong
Copy link

Thanks for sharing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment