If I try:
href="{% url post_content product_id=p.id %}"
I have this error:
'url' requires a non-empty first argument. The syntax changed in Django 1.5, see the docs.
How to change it?
Changed in Django 1.5: The first parameter used not to be quoted, which was inconsistent with other template tags. Since Django 1.5, it is evaluated according to the usual rules: it can be a quoted string or a variable that will be looked up in the context.
So: "{% url 'post_content' product_id=p.id %}"
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With