On 23 sep, 02:42, Bobby Roberts <[EMAIL PROTECTED]> wrote:
> > import os
> > os.environ['SERVER_NAME']
>
> > See how that goes.
>
> I get:
> KeyError: 'SERVER_NAME'
>
> So i'm assuming we aren't
You mean you don't know which web development solution you're using ???
--~--~-~--~~--
I wasn't aware of that group. Thanks for posting the info.
On Sep 23, 5:08 am, bruno desthuilliers
<[EMAIL PROTECTED]> wrote:
> On 23 sep, 02:01, Bobby Roberts <[EMAIL PROTECTED]> wrote:
>
> > On Sep 22, 6:11 pm, Erik Allik <[EMAIL PROTECTED]> wrote:
>
> > > Shouldn't that be os.path.abspath(os.
On 23 sep, 02:01, Bobby Roberts <[EMAIL PROTECTED]> wrote:
> On Sep 22, 6:11 pm, Erik Allik <[EMAIL PROTECTED]> wrote:
>
> > Shouldn't that be os.path.abspath(os.path.dirname(__file__)) instead
> > just in case the .py file is executed with a relative path?
>
> > And Bobby, I would instead use th
> import os
> os.environ['SERVER_NAME']
>
> See how that goes.
I get:
KeyError: 'SERVER_NAME'
So i'm assuming we aren't
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, s
On Sep 23, 10:01 am, Bobby Roberts <[EMAIL PROTECTED]> wrote:
> I need to find the x part of the path which is the domain name
> (whatever.com, ie). I'm thinking that the only way to do this is to
> get the current URL being viewed but I can't figure that out.
Assuming you are using Python C
On Sep 22, 6:11 pm, Erik Allik <[EMAIL PROTECTED]> wrote:
> Shouldn't that be os.path.abspath(os.path.dirname(__file__)) instead
> just in case the .py file is executed with a relative path?
>
> And Bobby, I would instead use the Sites framework to compute the URL
> of the site, not rely on
Shouldn't that be os.path.abspath(os.path.dirname(__file__)) instead
just in case the .py file is executed with a relative path?
And Bobby, I would instead use the Sites framework to compute the URL
of the site, not rely on a local folder name.
Erik
On 23.09.2008, at 0:51, Plamen Dragozov w
From inside a python module:
os.path.dirname(__file__)
Best,
Plamen Dragozov
Bobby Roberts wrote:
>
> On Sep 22, 5:05 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
>
>> os.path.dirname()
>>
>
>
> Thanks. The main problem is that i have to dynamically get the url
> i'm at so i can pass to
On Sep 22, 5:05 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
> os.path.dirname()
Thanks. The main problem is that i have to dynamically get the url
i'm at so i can pass to that function ( Python returns that i'm
missing 1 argument and I don't know how to dynamically pass that in.)
--~--~---
os.path.dirname()
Wiadomość napisana w dniu 2008-09-22, o godz. 22:51, przez Bobby
Roberts:
>
> i've got a setup like most people where i have directory structure
> such as:
>
> home/sites/xxx/whatever
>
>
> where xxx is the domain name
>
> If I have a file sitting in the "whatever" directory,
i've got a setup like most people where i have directory structure
such as:
home/sites/xxx/whatever
where xxx is the domain name
If I have a file sitting in the "whatever" directory, how can i find
the domain name under which the file resides?
Thanks for helping a noob.
--~--~-~--~-
11 matches
Mail list logo