Tuesday, July 2, 2013

Re: Getting URL root

On Tue, Jul 2, 2013 at 6:06 AM, Mike Dewhirst <miked@dewhirst.com.au> wrote:
> On 2/07/2013 9:51pm, Larry Martell wrote:
>>
>> 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.
>>
> Ok. If you want to connect externally the domains must be in a public DNS
> and hosted there. You'll need to do some configuration before it will work.

It's not that I need to connect externally. I want to programmatically
generate URLs and and email them to users, which they will use
internally. But those URLs have to have the correct app.company.com or
whatever they use (which I don't know).

--
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