Django URL pattern - template tags
Hey
I've made a view which should generate url in form like this (example.com/type/id/slug : example.com/news/1/lorem-ipsum/)
To generate links I use:
<a href="/{{ n.type }}/{{ n.id}}/{{ n.slug }}">{{ n.title|safe}}</a>
It isn't the correct form for that as far as I know.
Could someone explain me how to use {% url %} tag in this situation? I dont quite understand this and I can't manage it to work :)
http://pastebin.com/mVU0iFXt
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/S5dCWRCrzCIJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home