There's a practical and stylistic issue I don't understand about the
recommended use of Django and I hope someone can enlighten me.
Application design starts with model design and URL structure design.
Each URLconf provides a mapping from URLs to views. There are
several different mechanisms for providing reverse mappings:
get_absolute_url() methods in models, reverse() function in views, and
{% url ... %} tag in templates. Maybe others?
So: Why is the use of explicit URLs discouraged, especially in
templates? Why is it better to write {% url
project_name.app_name.views.results %} in a template than to write /
results/ (assuming the URLconf maps /results/ to the view results)?
Second: Doesn't the use of get_absolute_url() somehow violate the
separation of URLs from models?
Third: If one is to reverse map views to URLs, which is the best way
to do it (if there is a best way)?
Thanks.
Rodney
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---