On Wed, Dec 31, 2008 at 11:45 AM, [email protected] <[email protected]> wrote: > > i'm confused on the --settings option on manage.py. > > if i have a project call foo, i'd have in ./foo/settings.py > > to run: python manage.py runserver 8080 > > let's say i have a bar.settings.py which contains different values > (like test database to use or something), i'm trying to run: > > python manage.py runserver --settings=bar.settings 8080 (and maybe > combintations of), but keep getting some derivations of: "Could Not > Import settings...is it on the sys.path, no module named bar.settings.
The cause of the confusion here is the name of your settings file. Python uses dot notation to specify module hierarchies. When you specify bar.settings, Python expects to find a directory named bar with a file called settings.py in that directory. If you rename your settings file bar_settings.py (or something else that is compatible with Python module naming) you should stop getting the error you report. Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---

