Skip to content
Advertisement

Django no reverse match at

I have a problem with my code I’m trying to create an edit button to modify the employees subsequently displayed and make the changes but I can’t display with dynamic url in django.

views.py

JavaScript

url.py

JavaScript

employe.html

JavaScript

models.py

JavaScript

screenShot of the page

Advertisement

Answer

The problem is here:

JavaScript

You don’t have employe in the context. You need to change it to:

JavaScript

And you should change <str:pk> to <int:pk> if it is id.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement