Starting custom settings with django-admin.py failed

14 views
Skip to first unread message

Joshua Partogi

unread,
Mar 16, 2009, 9:47:42 AM3/16/09
to django...@googlegroups.com
Dear all,

I have a custom setting which I would like to run with django-admin as such:

django-admin.py runserver --settings=portal.settings

The name of my project is 'portal' and in my project directory there's
already __init__.py so I assume that python will already recognize
this as a python module.

But instead I receive this error:
Error: Could not import settings 'portal.settings' (Is it on sys.path?
Does it have syntax errors?): No module named portal.settings

Have I missed on something here that needs to be configured?

Thank you very much in advance

--
If you can't believe in God the chances are your God is too small.

Read my blog: http://joshuajava.wordpress.com/
Follow me on twitter: http://twitter.com/jpartogi

Alex Robbins

unread,
Mar 17, 2009, 8:13:13 AM3/17/09
to Django users
Hmm, try opening up a python interpreter and importing
"portal.settings". Does that work?
If not there are two likely candidates:
1. It isn't enough for 'portal' to have an __init__.py file, it needs
to be on your pythonpath. Check your pythonpath (import sys;print
sys.path)
2. There is a syntax error in your settings file. To check for this
you could just run "python /path/to/your/settings.py" from the shell.
See if that exits with errors.

Happy Djangoing!
Alex
Reply all
Reply to author
Forward
0 new messages