I am using {{ MEDIA_URL }} in my templates for images, CSS and JS. For
example, {{ MEDIA_URL }}img/abc.gif
I want to do something similar when I need absolute URLs, and I was
wondering what approaches exist. For example, I could define SITE_URL
= '
http://www.domain.com/' in settings.py, and then refer to that
(after setting up a context processor). Unfortunately, I have to strip
off the trailing slash from SITE_URL, so that I can do things like
this:
{{ SITE_URL }}{% url 'view_path' %}
(the url tag includes a slash at the beginning, so SITE_URL can't end
in a slash)
Thanks!