Re: Django suddenly loses DJANGO_SETTINGS_MODULE running locally

2007-08-28 Thread Rob Hudson

I didn't dig deeper last night because I was "getting things done" and
it was easier to just export the environment and move on.  Looking
harder at the traceback I noticed it was getting hung up on my putting
stuff in the project's __init__.py file which was importing things
from Django.  It looks like a chicken and egg problem if I do that.

"Which came first, the chicken or the egg?  I egged the chicken and
then I ate his leg."  -- Beastie Boys

-Rob

On 8/28/07, Graham Dumpleton <[EMAIL PROTECTED]> wrote:
>
> The OP isn't talking about Apache but using inbuilt Django server
> using manage.py. :-)
>
> The OP should really post the full traceback and messages there are
> getting so it can be seen whether they are interpreting it correctly.
> Information in the details may also be helpful to people in working
> out what is wrong.
>
> Graham

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django suddenly loses DJANGO_SETTINGS_MODULE running locally

2007-08-28 Thread Graham Dumpleton

The OP isn't talking about Apache but using inbuilt Django server
using manage.py. :-)

The OP should really post the full traceback and messages there are
getting so it can be seen whether they are interpreting it correctly.
Information in the details may also be helpful to people in working
out what is wrong.

Graham

On Aug 29, 1:55 am, TheMaTrIx <[EMAIL PROTECTED]> wrote:
> This is why, eventhough its noted in the docs as optional, I add the
> pythonpath to my site in the apache vhosts file by default.
> Adding the path globally isn't really a good thing to do but adding it
> whenever your webserver starts the site its needed for, even if its
> already defined somewhere else, is imho a good practice.
>
> On Aug 28, 5:49 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
>
> > On 8/28/07, Rob Hudson <[EMAIL PROTECTED]> wrote:
>
> > > Has anyone else noticed this?  Isn't "./manage.py" supposed to set up
> > > the settings module correctly?
>
> > manage.py just tries to import the settings module directly; it
> > basically assumes that '.' is on your sys.path, that "settings" is the
> > name of your settings module, and that the current working directory
> > contains the settings module.
>
> > Is it possible any of those things changed?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django suddenly loses DJANGO_SETTINGS_MODULE running locally

2007-08-28 Thread Rob Hudson

On Aug 28, 8:49 am, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
> manage.py just tries to import the settings module directly; it
> basically assumes that '.' is on your sys.path, that "settings" is the
> name of your settings module, and that the current working directory
> contains the settings module.
>
> Is it possible any of those things changed?

None of that changed, which is odd.  I just checked it out from my
repository to run test the project on another computer and the same
thing -- EnvironmentError.

Thanks,
-Rob


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django suddenly loses DJANGO_SETTINGS_MODULE running locally

2007-08-28 Thread TheMaTrIx

This is why, eventhough its noted in the docs as optional, I add the
pythonpath to my site in the apache vhosts file by default.
Adding the path globally isn't really a good thing to do but adding it
whenever your webserver starts the site its needed for, even if its
already defined somewhere else, is imho a good practice.

On Aug 28, 5:49 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
> On 8/28/07, Rob Hudson <[EMAIL PROTECTED]> wrote:
>
> > Has anyone else noticed this?  Isn't "./manage.py" supposed to set up
> > the settings module correctly?
>
> manage.py just tries to import the settings module directly; it
> basically assumes that '.' is on your sys.path, that "settings" is the
> name of your settings module, and that the current working directory
> contains the settings module.
>
> Is it possible any of those things changed?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django suddenly loses DJANGO_SETTINGS_MODULE running locally

2007-08-28 Thread Jeremy Dunck

On 8/28/07, Rob Hudson <[EMAIL PROTECTED]> wrote:
> Has anyone else noticed this?  Isn't "./manage.py" supposed to set up
> the settings module correctly?

manage.py just tries to import the settings module directly; it
basically assumes that '.' is on your sys.path, that "settings" is the
name of your settings module, and that the current working directory
contains the settings module.

Is it possible any of those things changed?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Django suddenly loses DJANGO_SETTINGS_MODULE running locally

2007-08-28 Thread Rob Hudson

I've had this happen a number of times previously and fixed it by
exporting the environment variable, but last night I was running
without and env variable using "./manage.py runserver", stopped the
server after making some changes and it then complained about the
missing environment variable.

It happened right after I added a new context processor.

Has anyone else noticed this?  Isn't "./manage.py" supposed to set up
the settings module correctly?

Thanks,
Rob


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---