Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > django and mod_python

Reply
Thread Tools

django and mod_python

 
 
bapolis@gmail.com
Guest
Posts: n/a
 
      03-05-2006
Hi,

I read the mod_python documentation on the Django site but I'm getting
this error:

EnvironmentError: Could not import DJANGO_SETTINGS_MODULE
'accesshiphop.settings' (is it on sys.path?): No module named
accesshiphop.settings

Here's my httpd.conf:

<Location "/public_html/myproject/">
PythonPath "[r'c:/apache/public_html/myproject/']+sys.path"
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE myproject.settings
PythonDebug On
</Location>

Also, the Django site says "Also, if you've manually altered your
PYTHONPATH to put your Django project on it, you'll need to tell
mod_python:"

I don't recall adding my project to my PYTHONPATH. Should I have done
this? How do I do this?

Thanks.

 
Reply With Quote
 
 
 
 
Robin Becker
Guest
Posts: n/a
 
      03-05-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Hi,
>
> I read the mod_python documentation on the Django site but I'm getting
> this error:
>
> EnvironmentError: Could not import DJANGO_SETTINGS_MODULE
> 'accesshiphop.settings' (is it on sys.path?): No module named
> accesshiphop.settings
>
> Here's my httpd.conf:
>
> <Location "/public_html/myproject/">
> PythonPath "[r'c:/apache/public_html/myproject/']+sys.path"
> SetHandler python-program
> PythonHandler django.core.handlers.modpython
> SetEnv DJANGO_SETTINGS_MODULE myproject.settings
> PythonDebug On
> </Location>
>
> Also, the Django site says "Also, if you've manually altered your
> PYTHONPATH to put your Django project on it, you'll need to tell
> mod_python:"

......
in my setup the PythonPath statement puts the folder containing
myproject onto the PythonPath in your case that might be

PythonPath "[r'c:/apache/public_html']+sys.path"

also I place the SetEnv DJANGO_SETTINGS_MODULE .....
before specifying the PythonHandler, but I am unsure if that is required
(I guess it depends on exactly how apache sets up the location), but
it's what I would do in a batch file for example.

 
Reply With Quote
 
 
 
 
tgone
Guest
Posts: n/a
 
      03-05-2006
your suggestions worked. thanks.

 
Reply With Quote
 
Bruno Desthuilliers
Guest
Posts: n/a
 
      03-06-2006
(E-Mail Removed) a écrit :
> Hi,
>
> I read the mod_python documentation on the Django site but I'm getting
> this error:
>
> EnvironmentError: Could not import DJANGO_SETTINGS_MODULE
> 'accesshiphop.settings' (is it on sys.path?): No module named
> accesshiphop.settings
>
> Here's my httpd.conf:


(snip - already answered)

<OT>
BTW, there's a django mailing-list, and IIRC a mod_python mailing-list
too. When possible, post to the most specific(s) list(s).
</OT>
 
Reply With Quote
 
Laurent Rahuel
Guest
Posts: n/a
 
      03-06-2006
Bruno Desthuilliers wrote:

> (E-Mail Removed) a écrit :
>> Hi,
>>
>> I read the mod_python documentation on the Django site but I'm getting
>> this error:
>>
>> EnvironmentError: Could not import DJANGO_SETTINGS_MODULE
>> 'accesshiphop.settings' (is it on sys.path?): No module named
>> accesshiphop.settings
>>
>> Here's my httpd.conf:

>
> (snip - already answered)
>
> <OT>
> BTW, there's a django mailing-list, and IIRC a mod_python mailing-list
> too. When possible, post to the most specific(s) list(s).
> </OT>


Hi,

There are also some wxpython, pyqt, ... mailing-list, iircc and you don't
seem to bother requesters with not being at the right place

Regards,

Laurent.

 
Reply With Quote
 
bruno at modulix
Guest
Posts: n/a
 
      03-06-2006
Laurent Rahuel wrote:
> Bruno Desthuilliers wrote:
>
>
>>(E-Mail Removed) a écrit :
>>
>>>Hi,
>>>
>>>I read the mod_python documentation on the Django site but I'm getting
>>>this error:
>>>
>>>EnvironmentError: Could not import DJANGO_SETTINGS_MODULE
>>>'accesshiphop.settings' (is it on sys.path?): No module named
>>>accesshiphop.settings
>>>
>>>Here's my httpd.conf:

>>
>>(snip - already answered)
>>
>><OT>
>>BTW, there's a django mailing-list, and IIRC a mod_python mailing-list
>>too. When possible, post to the most specific(s) list(s).
>></OT>

>
>
> Hi,
>
> There are also some wxpython, pyqt, ... mailing-list, iircc and you don't
> seem to bother requesters with not being at the right place


Laurent,

I'm not here to bother anyone. The point here is that the OP's question
is more about django/mod_python conf than about Python itself, so I
*advise* him to post on one of these lists.

--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '(E-Mail Removed)'.split('@')])"
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on Django and Django Book John Posner Python 0 11-13-2010 06:55 PM
mod_python.so is garbled mod_python.so is garbled blbmdsmith Python 1 12-14-2006 12:15 AM
Wanted: Django Programmer Seeking PyCon Fame and Glory Jeff Rush Python 0 02-03-2006 04:06 PM
Re: Django and SQLObject. Why not working together? Ksenia Marasanova Python 2 09-08-2005 11:07 PM
Django and SQLObject. Why not working together? Sokolov Yura Python 0 09-08-2005 05:07 PM



Advertisments