Tuesday, June 28, 2011

vendor makes python Django possible

$ python manage.py runserver 8005
Traceback (most recent call last):
File "manage.py", line 5, in
from django.core.management import execute_manager
ImportError: No module named django.core.management

[2:52pm] haoqili: django setup question: why is my "python manage.py runserver" working when I can't "import django" in python?
[2:53pm] wenzel: haoqili: django is part of the vendor/ dir
[2:53pm] wenzel: which is not in Python's standard library path
[2:53pm] haoqili: okay
[2:53pm] wenzel: buuut, manage.py puts it into the library path
[2:53pm] wenzel: edit manage.py and look for site.addsitedir (or something like that)
[2:53pm] jsocol: you can do `python manage.py shell`
[2:53pm] wenzel: that's what puts the vendor/ dir on the list of places where Python looks for imports

No comments:

Post a Comment