On 11-08-11 09:37, Bastian Ballmann wrote:
Now I start a new project and app, configure Django and last but not
least I have to set the PYTHONPATH variable to my Django project dir in
order to let Django find my apps.
After setting PYTHONPATH django-admin.py looses commands like
startproject and collectstatic and cannot find some Python modules I
installed. When doing an unset PYTHONPATH the missing django-admin.py
commands reappear.
Setting PYTHONPATH probably puts those directories first in the search
path when python searches for modules. So some .py file of yours might
shadow one that django needs. That's what I guess is the problem. Is
there one filename in your project that strikes you as a potential problem?
For proper debugging, try to import one of those missing management
commands in your python prompt with and without the PYTHONPATH.
Best solution, btw: turn your code into a python package. Which means
"add a setup.py". Then install that package with pip, too, and you don't
have to do anything with your python path manually.
Reinout
--
Reinout van Rees http://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul 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
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.