from django.conf import settings def url_info(request): """Return useful variables to know the media url and, if you need it, your apps url.""" return { 'myapp_url': settings.MYAPP_URL, 'media_url': settings.MEDIA_URL, }