On Apr 30, 3:26 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > Hi, > > > > > I could use some help getting my Django website back up after an > > upgrade to Hardy Heron. Instead of using svn to get Django, I used > > synaptic this time. Now my site doesn't work and I'm a bit confused > > on path names. > > > I believe Hardy installed Django to /var/lib/python-support/python2.5/ > > django > > My website is at /home/published/www/django/catalog > > > My httpd used to look like: > > > <VirtualHost *:80> > > ServerName www.example.com > > DocumentRoot /home/published/www/django/ > > SetHandler python-program > > PythonHandler django.core.handlers.modpython > > PythonDebug On > > PythonPath "['/home/published/www/django', '/home/ > > published/www/django/catalog'] + sys.path" > > SetEnv DJANGO_SETTINGS_MODULE catalog.settings > > </VirtualHost> > > > At this point I can't remember where I brought Django down with SVN. > > I thought it was /home/publisehd/www/django > > > Any advice on setting up mod_python using the default Hardy install > > path? > > First drop into a python shell and try: > > import django > > Does that work without any errors? If so, Hardy has already installed > Django in your Python path and you can remove the part "'/home/ > published/www/django'," from your Apache conf's PythonPath directive.
Sorry, I suspect that what you are telling him is wrong and you misunderstand what he is telling you about his setup. I don't believe he is saying that that is where Django is installed, but where his Django site is being held. It is known that when using mod_python that you must list the parent directory of where the site is placed. Depending on how you set up stuff in urls.py and other places, you must also list the site directory itself. Thus that they have the two paths in PythonPath is quite valid. See the mod_python documentation on Django site for details. What would help here is if the OP actually said what was meant by 'site doesn't work'. Is there Python exceptions in Apache error logs? What error does the browser show? Graham > If that doesn't work, Django is not in your Python path. You can do > the following: > > cd /home/published/www > mv django django_svn_based > ln -sf /var/lib/python-support/python2.5/django django > > Basically, this links to your Hardy Django install from your existing > setup. > > Then restart Apache. > > However, I would recommend using Django straight from SVN. It's > unlikely that Ubuntu's packaged version is the same as what you used > to have in your /home/published/www/django/. With the SVN version, you > control which revision of Django you want to work with. > > -Rajesh D --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

