Dagur Pall Ammendrup
dagurp at gmail.com
Wed Jul 27 12:27:03 EDT 2005
Jorey Bump wrote: > Dagur Pall Ammendrup wrote: > >> The thing is that I have my project directory in sys.path (and it >> appears if I try to print it out in a mod_python test page) but if I try >> to import anything I'm told it doesn't exist. > > > Only modules or packages can be imported, so if you're trying to > import ~dagur/workspace/myproject/settings/main.py, it must be packaged: > > touch ~dagur/workspace/myproject/__init__.py > touch ~dagur/workspace/myproject/settings/__init__.py > > It isn't necessary to put anything in __init__.py, but the files must > exist. > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python > I did do that and I can import it just fine in the console. This is the error I get: EnvironmentError: Could not import DJANGO_SETTINGS_MODULE 'myproject.settings.main' (is it on sys.path?): No module named myproject.settings.main
|