0

I've been having trouble with the edit function for the wiki project1. So far I've tried many different approaches but nothing has worked. I have the "edit" button on every entry page of the encyclopedia. But when I click "edit" nothing happens. The url does not change either.

What am I doing wrong? Any insight into how to create the edit function would help. Thanks!

Views.py and html:

views.py

class

html

Here is the entry function in views.py:

enter image description here

Here is the html for the entry function:

enter image description here

2
  • Please add the code for the wiki page display
    – Vsjain
    Commented Dec 14, 2020 at 14:29
  • Hi @Vsjain did you mean the code for the entry function? If so, I included both the code in views.py and the code in the html file for the entry function, which shows up on each entry in the encyclopedia. Commented Dec 15, 2020 at 4:15

1 Answer 1

1

In the entry page, at the end you are specifying a url which should take you to the edit page. But instead it reloads the entry page as the path is 'entry' not 'edit'. If you do this small change then your code should work.

Hope this helps. If it does please check the tickmark

1
  • Thank you that worked! It now shows the edit form. I also had to add something else to the html file to make it actually save the edits, but this was super helpful. I appreciate it. Commented Dec 16, 2020 at 0:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .