Skip to content

Instantly share code, notes, and snippets.

@katipogluMustafa
Last active December 16, 2021 17:05
Show Gist options
  • Save katipogluMustafa/59db048646b8ad7a777b0f3d6cea9f18 to your computer and use it in GitHub Desktop.
Save katipogluMustafa/59db048646b8ad7a777b0f3d6cea9f18 to your computer and use it in GitHub Desktop.
Django retrival of Tinymce non-input fields from a HTML form
def edit_story(request, story_id):
if request.method == "POST":
title = request.POST["mce_0"]
description = request.POST["mce_2"]
content = request.POST["mce_3"]
update_story_object(story_id, title, description, content)
return redirect("show_story_page", story_id)
else:
story = get_object_or_404(Story, pk=story_id)
return render(request, "edit_story.html", {'story': story})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment