In Views.py def car_details(request, id): redirect_to=1
single_car = get_object_or_404(Car, pk=id),
data = { 'single_car': single_car, # 'url': url, }
# reverse('single_car', args=(id))
return render(request, 'cars/car_details.html', data)
In urls.py of my app
urlpatterns = [ path('', views.cars, name='cars'),
path('\<int:id\>/car_details', views.car_details, name='car_details'),]
and In my templates cars.html
{% for car in cars %} <h1> <a href="{% url ">{{car.car_title}}</a>
</h1>
<a href="{% url "> {{car.state}}, {{car.city}} </a>
{% endfor %}
when i tried to call this car_details.html with urls function it show me
this error Reverse for 'car_details' with arguments '('',)' not found. 1
pattern(s) tried: I also tried with reverse function it doesnot work,How
can I solve this error
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/558ec0a3-0500-451a-bb5d-e31de430dfd2n%40googlegroups.com.