request.META['HTTP_HOST']
If not, check the docs for the request object:
http://docs.djangoproject.com/en/dev/ref/request-response/#httprequest-objects
Shawn
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@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.
I'd be interested to know why you need this. The url name is just a
label, it shouldn't have any actual significance. Where are you using
it?
--
DR.
kelvan.ma...@gmail.com schrieb:
> request.META['HTTP_HOST'] just return the webadress from the server, I
> need the name I gave an url un urls.py.
> Like reverse just the other way
>
> florian
>
> 2009/12/25 Shawn Milochik <sh...@milochik.com>
>
> Try this:
>
> request.META['HTTP_HOST']
>
> If not, check the docs for the request object:
>
> http://docs.djangoproject.com/en/dev/ref/request-response/#httprequest-objects
> <http://docs.djangoproject.com/en/dev/ref/request-response/#httprequest-objects>
>
> Shawn
>
> --
>
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com
> <mailto:django-users%2Bunsu...@googlegroups.com>.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en
http://docs.djangoproject.com/en/1.1/ref/contrib/sites/
Not sure if you've looked into it before and ruled it out... not
entirely sure what you're trying to accomplish.
On Dec 28, 12:06 pm, kelvan.mailingl...@gmail.com wrote:
> I've the site_name with link to the required permission in the db to show only menu entries the user is allowed to see.
> It's ugly but I couldn't find a nicer way. The menus can have a parent if it's a submenu, so I need to know the actual mainmenu to load the submenus. If you know a nice way to handle this permission stuff I'd be happy.
>
> 2009/12/25 Daniel Roseman <dan...@roseman.org.uk>
> On Dec 25, 8:45 pm, kelvan.mailingl...@gmail.com wrote:
> > request.META['HTTP_HOST'] just return the webadress from the server, I need the name I gave an url un urls.py.
> > Like reverse just the other way
> >
> > florian
>
> I'd be interested to know why you need this. The url name is just a
> label, it shouldn't have any actual significance. Where are you using
> it?
> --
> DR.
>
> signature.asc
> < 1KViewDownload