On Tue, Jul 2, 2013 at 6:46 AM, Mike Dewhirst <mi...@dewhirst.com.au> wrote:
> On 2/07/2013 4:43pm, Larry Martell wrote:
>>
>> On Mon, Jul 1, 2013 at 7:55 PM, Sithembewena Lloyd Dube
>> <zebr...@gmail.com> wrote:
>>>
>>> It sounds like you want to get the subdomain. Havew a look at the
>>> urlparse
>>> module and its usage.
>>>
>>>
>>> http://stackoverflow.com/questions/6925825/get-subdomain-from-url-using-python
>>
>>
>>
>> Perhaps I wasn't clear. I don't know the URL - I'm not trying to parse
>> it, I need to find out what it is.
>>
>>
>>
>>> On Tue, Jul 2, 2013 at 2:09 AM, Larry Martell <larry.mart...@gmail.com>
>>> wrote:
>>>>
>>>>
>>>> I have an app I distribute to clients.
>>>>
>>>> When I run the app on my local machine I connect to http://127.0.0.1/...
>>>> When I'm VPN-ed into a client site I connect to the app on their
>>>> machine with http://xx.xx.xx.xx/...
>>>> When a client is running locally at their site they connect with
>>>> http://myappsname.company.com/....
>
>
> Do you know the IP address of the client's server running your app??

I know them, but I need to programmatically get it in a way that works
everywhere.

> Does your client know the URL?

Yes, they know what to use and they type it in or have it bookmarked.

> In any case, there must be a lookup somewhere - either in the internal DNS,
> an external DNS or in all the users' hosts files.

Yes, it's in their local DNS but I don't have a way of generically
knowing what to look for. It has different names at different clients.
What I think I'll do is put something in the settings file that I can
pick up. This will become part of the installation procedure. I don't
love it, but I can't think of any other way.

> I'm losing concentration here. Past my bedtime.

I appreciate the help. Go get some sleep.


>>>>
>>>> I need to get that initial part of the URL from the python side. Is
>>>> there some way to do that? (I may be using the wrong terminology here
>>>> when I say 'url root'.)
>>>>
>>>> --
>>>> 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+unsubscr...@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.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Regards,
>>> Sithu Lloyd Dube
>>>
>>> --
>>> 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+unsubscr...@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.
>>>
>>>
>>
>
> --
> 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+unsubscr...@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.
>
>

-- 
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+unsubscr...@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.


Reply via email to