1

I have a problem when i try to install a Django website, on a Mocha hosting, and their technical support is so much uninformed... (I strongly don't recomment Mocha hosting for a django hosting) They have mod_wsgi support, and mod_python installed, but when i am uploading the site as in their tutorial http://www.mochasupport.com/kayako/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=448&nav=0,46 but at the end i am getting an error like:
Traceback (most recent call last):

File "/usr/lib64/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent)

File "/usr/lib64/python2.5/site-packages/mod_python/importer.py", line 1202, in _process_target module = import_module(module_name, path=path)

File "/usr/lib64/python2.5/site-packages/mod_python/importer.py", line 304, in import_module return import(module_name, {}, {}, ['*'])

ImportError: No module named django.core.handlers.modpython

I know this issue has been treated here as well: Error while deploying Django on Apache

But i don't have access to the terminal, how can i solve it? Is there a way to correctly set the python path without terminal access? Thanks!

2
  • 1
    mod_python is dead. Consider using mod_wsgi. Commented Nov 5, 2010 at 5:47
  • Not exactly an answer, but ive used webfaction for django hosting and it is awesome. the support is great and they have django preinstalled Commented Nov 5, 2010 at 7:59

2 Answers 2

2

Do you double check that you upload a django in

/home/youraccount/webapps/django

Most likely the hosting provieder has harcode (width you account) that path in the apache configuration for the mod_python approach.

Or

Why don't you use mod_wsgi and in the wsgi script add your django, like this.

import os
import sys

sys.path.append('/home/youraccount/webapps/django') # Path to your custom django.
from django.core.handlers.wsgi import WSGIHandler

os.environ['DJANGO_SETTINGS_MODULE'] = 'myapp.settings' 
application = WSGIHandler()
Sign up to request clarification or add additional context in comments.

Comments

1

Looking at that article, it seems that they don't provide Django for your use. You'll need to upload it as well.

1 Comment

yes... though at first they said they actually provide Django... i am confused.. and dissapointed.. i hope i will find a way to make it work, though..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.