pythonpath on Ubuntu 8.10
Hey, I have an application that I'm running using Django's built-in server on both Windows XP and Ubuntu 8.10. While it is wokring perfectly fine on XP, I get import errors in Ubuntu. When I tried printing pythonpath on Ubuntu, I managed to locate the problem. It seems like if I start the server with a python script it happens before the shell is updated with correct pythonpath path from the .bashrc. However, if i do it manually it starts perfectly fine (since it manages to update pythonpath at the start). So, the question is: Is it possible to do anything to make it to work with automatic start-up? I.e. update Django's pythonpath somehow? Or maybe put environment variables somewhere else than .bashrc? Anyone? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: pythonpath on Ubuntu 8.10
Seems like I found one solution to that: Add -- pythonpath="path_to_your_app" to the manage.py runserver call. Any better solutions? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: pythonpath on Ubuntu 8.10
Hi python_fan wrote: > Hey, > > I have an application that I'm running using Django's built-in server > on both Windows XP and Ubuntu 8.10. While it is wokring perfectly fine > on XP, I get import errors in Ubuntu. When I tried printing pythonpath > on Ubuntu, I managed to locate the problem. It seems like if I start > the server with a python script it happens before the shell is updated > with correct pythonpath path from the .bashrc. However, if i do it > manually it starts perfectly fine (since it manages to update > pythonpath at the start). > > So, the question is: Is it possible to do anything to make it to work > with automatic start-up? I.e. update Django's pythonpath somehow? Or > maybe put environment variables somewhere else than .bashrc? Anyone? I haven't read your next mail but basically if I understood your quesiton correctly, you are planning to deploy apps on the django's devel server, you can export those variables in a system-wide /etc/bash.bashrc.But, a reminder here, django's devel server automatically exports those for you so you need not do it. However, if you plan to run using "django-admin.py", you'd obviously need PYTHONPATH and DJANGO_SETTINGS_MODULE set accordingly. i...@debian:[~] echo $PYTHONPATH /home/hutch/apps/wikinotes i...@debian:[~] echo $DJANGO_SETTINGS_MODULE settings i...@debian:[~] django-admin.py runserver Validating models... 0 errors found Django version 1.0.2 final, using settings 'settings' Development server is running at http://127.0.0.1:8000/ Quit the server with CONTROL-C. Hope that helps. The django documentation has all these info if you'd want to read. Cheers, Ishwor smime.p7s Description: S/MIME Cryptographic Signature