hello,
in a view it's easy to find out under wich host the django-project ist
running:
{{{
def view(request):
from django import http
hostname = http.get_host(request)
}}}
hostname ist set to localhost:8000 running the django-app with ./
manage.py runserver
but how do i access the full host-name (in this case: http://localhost:8000)
in the settings.py?
reason: i don't want to change the media-url constant when i upload it
to another server...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---