Tuesday, July 2, 2013

Re: Getting URL root

On Tue, Jul 2, 2013 at 1:25 AM, Mike Dewhirst <miked@dewhirst.com.au> wrote:
> On 2/07/2013 5:07pm, Larry Martell wrote:
>>
>> I need to get it from a standalone program. It's a django script, but
>> not invoked from a request.
>
>
> import socket
> def get_fully_qualified_domain_name():
> return socket.getfqdn()


That's not giving me what I want. For example on my local system it
gives me Ananke.local, but I cannot connect to my app with that. On
one of my client's systems it gives me localhost.localdomain, and I
cannot connect to their app with that either.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate