Here are the docs. I need help kicking in the id
parameter under the change
function, so that it reroutes the url to the correct admin edit page.
In a very similar question, the following answer was listed:
{% url 'admin:polls_choice_change' choice.id %}
Did I wrap in {% for %}
tags correctly? Am I supposed to?
my views.py:
def customer_details(request, id):
var = model.objects.get(id=id)
return render(request, 'vendor_db/vendors_detail.html', {'var': var,
})
customer_details.html:
{% for items in var %}
<a href="{% url 'admin:app_model_change' items.id %}">Edit</a>
{% endfor %}
UPDATE
question was answered in comments, thanks for the help!