check django is ok

start up a python interpreter
import django
django.get_version()

and make sure there are no errors there


It could be a permissions problem,

make sure the apache user owns the coursedb directory

on debian the account is called www-data

so

chown -R www-data:www-data /home/mycode/coursedb

should do that, also make sure they can read and write the files anyway

chmod -R u+rw /home/mycode/coursedb

delete any pyc files that might have come from your local machine

cd /home/mycode/coursedb
find . -name '*.pyc' -exec rm {} \;

(be careful with that find command, dont want to go deleting the wrong
files)

after each step above restart apache, I assume its apache2 so

apache2ctl restart

>From experience I would say the file permission issue is the most likely
culprit

Good luck

Sean


Tim Kersten wrote:
> Without having looked it up or used mod_python, would you not need to
> add /home/django to the python path just like you did with
> /home/mycode?
>
> Tim ^,^
>
>
>
>
> On Wed, Nov 5, 2008 at 12:04 AM, Christian Kortenhorst <[EMAIL PROTECTED]> 
> wrote:
>   
>> So been wrecking my head about installing django with mod_python on a server
>> that i have limited root access to (by this i mean i have to ask hosting
>> company to do some stuff and then they might say no).
>>
>> So have installed python on my own personal box debian etch, django version
>> 0.97 and have it up and running when i run my project
>> python manage.py runserver 192.168.1.4:8080
>>
>> directory structure:
>> /home/mycode/
>> |-- __init__.py
>> |-- __init__.pyc
>> |-- coursedb
>> |-- etc..
>>
>> /home/django/
>> |-- __init__.py
>> |-- __init__.pyc
>> |-- bin
>> |-- conf
>> |-- core
>> |-- etc....
>>
>> But when i configure apache
>>
>> <Location "/coursedb">
>>     SetHandler python-program
>>     PythonHandler django.core.handlers.modpython
>>     SetEnv DJANGO_SETTINGS_MODULE coursedb.settings
>>     PythonDebug On
>>     PythonPath "['/home/mycode'] + sys.path"
>> </Location>
>>
>> and then go to visit on it in lynx it just shows up
>>
>> Mod_python error: "PythonHandler django.core.handlers.modpython"
>> .....
>> ImportError: Could not import settings 'coursedb.settings' (Is it on
>> sys.path? Does it have syntax
>> errors?): No module named settings
>>
>> the django svn install is in /home/django and I put a ln to /usr/local/bin
>> so could run django-admin anywhere.
>>
>> Can anyone help me?
>> n.b: i can change a lot on my own server but when i move to shared hosting
>> server it will be a lot harder to configure, so just wanted all the code for
>> django and my app to be in my home directory and get apache to run it
>> througt mod python. but i seam to be doing something wrong.
>>
>> --
>> Christian Kortenhorst
>> mob: +353-(0)87-6183349
>> home: +353-(0)1-4966287
>>
>>     
>
> >
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Python Ireland" 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.ie/group/pythonireland?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to