0π
β
In the line
<a href=" {% url 'courses:step' course_pk=step.course.pk step_pk=step_pk %} ">
Here step_pk = step_pk is not working. Step_pk is not defined because you did not return any information about step_pk in def course_detail at this line:
return render(request, "courses/course_detail.html", {"course": course})
pass step inside return and use step_pk = step.pk
Please check it. Thanks.
π€Prakhar Trivedi
1π
you need
{% url 'courses:step' course_pk=step.course.pk step_pk=step.pk %}
step.pk
instead of step_pk
which doesnot exist in your context
π€doniyor
- Django admin change_form with ajax query
- Form wizard does not move to the next screen in a jquery dialog
- M2m relations are not displayed or saved in django
- Javascript django html tags
Source:stackexchange.com