You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered the same issue.
If you copied the demoapp, you should change the following line: <a href="{% url 'myreservation' obj.pk %}" >{{obj}}</a>(index.html line 12)
to your own model view (named ExampleModel below).
First, in your model urls.py file create the following view (as in the demoapp): re_path(r"create/(?P<pk>\d+)$", ExampleModelReservation.as_view(), name="create_example_model")Then, change the above line accordingly: <a href="{% url 'create_example_model' obj.pk %}" >{{obj}}</a>(index.html line 12)
It proceeded as the official djreservation document, but key Error occurs in the 170th line self.pk = kwargs.pop ('pk') of djreservationviews.py.
The text was updated successfully, but these errors were encountered: