Python Forum
Help finishing my Wikipedia page
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help finishing my Wikipedia page
#3
I thought that was the syntax of all views? Why does it matter if I pass it or not? I'm not using it on save.html.

So I shouldn't call render? Why not? What should I do instead?

would i just use "return util.save_entry(title, content)"? What page should it load?

the original page where I did the editing was wiki/<title> How can I get the title on the save page because I need to use that title to go back to the original page. How else can I get the title variable?

OK I used your advice and figured it out. I changed it to:

def save(request):
    title = request.POST.get("title")
    content = request.POST.get("content")
    util.save_entry(title, content)
    return render(request, "encyclopedia/wiki.html", {
        "entries": util.get_entry(title)
    })
Probably not the most efficient but it works!

OK I'm on the final step! Now I have to change the markup to HTML when shown to the user. I'm going to fiddle around with this later tonight. Any tips as I do it?

Thanks
Reply


Messages In This Thread
Help finishing my Wikipedia page - by card51shor - Jul-06-2020, 07:45 AM
RE: Help finishing my Wikipedia page - by ndc85430 - Jul-06-2020, 08:43 AM
RE: Help finishing my Wikipedia page - by card51shor - Jul-07-2020, 03:20 AM
RE: Help finishing my Wikipedia page - by ndc85430 - Jul-07-2020, 04:39 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help in finishing my scripts mohank84 5 3,963 Oct-16-2019, 04:54 PM
Last Post: jefsummers

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020