Re: "ImportError: No module named django" persists...

2008-01-16 Thread Scott

@Graham:
It looks like it is a working django load. Also, the permissions are
the same as when they were able to load while in the python site
packages folder.
---
Python 2.4.3 (#1, Dec 11 2006, 11:38:52)
[GCC 4.1.1 20061130 (Red Hat 4.1.1-43)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> print django.__file__
/Working/django/django/__init__.pyc
>>>
---


@Marty:
Here is the path to my django __init__.pyc file as output above in the
test requested by Graham: /Working/django/django/__init__.pyc


@Karen:
This sounds promising I'm digging into that and will post my findings.

Thank you for your responses, kind folks.

Scott
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "ImportError: No module named django" persists...

2008-01-16 Thread Marty Alchin

On Jan 15, 2008 9:48 PM, Scott <[EMAIL PROTECTED]> wrote:
> /Working/django

Out of curiosity, what are the contents of this directory? Is this the
root of the django distribution (containing things like 'docs',
'tests' and another 'django' directory), or is this the django code
itself (containing things like 'core', 'db' and 'contrib')?

If it's the latter, that'll definitely cause you problems, since
Python only sees the *contents* of the directory, so you'd never be
able to "import django" in this manner. If that's the case, try just
using "/Working" and see if that helps. If it's the former, and it
does have a second "django" directory inside it, I don't know what to
suggest.

-Gul

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "ImportError: No module named django" persists...

2008-01-16 Thread Karen Tracey
On Jan 15, 2008 6:55 PM, Scott <[EMAIL PROTECTED]> wrote:

> MY SYSTEM:
>
> OS = { Red Hat Enterprise Linux 5 | RHEL 5 | RHEL5 }
> Python 2.4.3 (#1, Dec 11 2006, 11:38:52)
> Apache/2.2.3 (Red Hat) Server
> mod_python.version '3.2.8'
> Django VERSION = (0, 97, 'pre')
>

>From all the information you've posted it really seems like the apache
process cannot access files under /Working, whereas it can access files
under site-packages.  This despite the fact that the file permissions under
/Working look like they should allow access by apache.  So what could be
going on?  I've never used RHEL5, but I've read some about it and it
includes SELinux (security-enhanced Linux).  Could this be getting in the
way?  This page:

http://www.linuxtopia.org/online_books/rhel5/rhel5_administration/rhel5_sec-sel-admincontrol.html

list some commands to show the status of SELinux.  If you try them on your
system and it's enabled/enforcing and restricting access to /Working, then
that could explain the weird behavior you have described.  Fixing it would
then require either disabling SELinux or changing the config to remove the
restrictions on apache's access to /Working.

Karen

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "ImportError: No module named django" persists...

2008-01-15 Thread Graham Dumpleton

First verify Django is being picked up from where you think it is by
doing:

  import django
  print django.__file__

Second, ensure that the installed Django files have permissions that
would allow user that Apache may be running as to access it. That is,
if Apache is running as a service and the Django files are only
readable by you, it will not be able to load them.

Graham

On Jan 16, 1:48 pm, Scott <[EMAIL PROTECTED]> wrote:
> 1234,
>
> Yes, with these directives:
>
> 
> 
>     SetHandler python-program
>     PythonPath "['/Working/django','/Working/modules','/Working/
> projects','/Working/projects/mysite'] + sys.path"
>     SetEnv DJANGO_SETTINGS_MODULE mysite.settings
>     PythonHandlermod_python.testhandler
>     #PythonHandler django.core.handlers.modpython
>     PythonDebug On
> 
> 
>
> Here's the output for the 'sys.path':
>
> 
> Apache version  Apache/2.2.3 (Red Hat)
> Apache threaded MPM     No (single thread MPM)
> Apache forked MPM       Yes, maximum 256 processes
> Apache server root      /etc/httpd
> Apache document root    /var/www/html
> Apache error log        /etc/httpd/logs/error_log (view last 100 lines)
> Python sys.version      2.4.3 (#1, Dec 11 2006, 11:38:52) [GCC 4.1.1
> 20061130 (Red Hat 4.1.1-43)]
> Python sys.path =
>
> /Working/django
> /Working/modules
> /Working/projects
> /Working/projects/mysite
> /usr/lib/python24.zip
> /usr/lib/python2.4
> /usr/lib/python2.4/plat-linux2
> /usr/lib/python2.4/lib-tk
> /usr/lib/python2.4/lib-dynload
> /usr/lib/python2.4/site-packages
> /usr/lib/python2.4/site-packages/Numeric
> /usr/lib/python2.4/site-packages/gtk-2.0
>
> Python interpreter name server.mysite.commod_python.publisher available  
> Yesmod_python.psp available        Yes
> -
>
> Any thoughts?
>
> Scott
>
> On Jan 15, 6:39 pm, 1234 <[EMAIL PROTECTED]> wrote:
>
> > django is in your sys.path?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "ImportError: No module named django" persists...

2008-01-15 Thread Scott

1234,

Yes, with these directives:



SetHandler python-program
PythonPath "['/Working/django','/Working/modules','/Working/
projects','/Working/projects/mysite'] + sys.path"
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
PythonHandler mod_python.testhandler
#PythonHandler django.core.handlers.modpython
PythonDebug On




Here's the output for the 'sys.path':


Apache version  Apache/2.2.3 (Red Hat)
Apache threaded MPM No (single thread MPM)
Apache forked MPM   Yes, maximum 256 processes
Apache server root  /etc/httpd
Apache document root/var/www/html
Apache error log/etc/httpd/logs/error_log (view last 100 lines)
Python sys.version  2.4.3 (#1, Dec 11 2006, 11:38:52) [GCC 4.1.1
20061130 (Red Hat 4.1.1-43)]
Python sys.path =

/Working/django
/Working/modules
/Working/projects
/Working/projects/mysite
/usr/lib/python24.zip
/usr/lib/python2.4
/usr/lib/python2.4/plat-linux2
/usr/lib/python2.4/lib-tk
/usr/lib/python2.4/lib-dynload
/usr/lib/python2.4/site-packages
/usr/lib/python2.4/site-packages/Numeric
/usr/lib/python2.4/site-packages/gtk-2.0

Python interpreter name server.mysite.com
mod_python.publisher available  Yes
mod_python.psp availableYes
-

Any thoughts?

Scott

On Jan 15, 6:39 pm, 1234 <[EMAIL PROTECTED]> wrote:
> django is in your sys.path?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: "ImportError: No module named django" persists...

2008-01-15 Thread 1234
django is in your sys.path?

2008/1/16, Scott <[EMAIL PROTECTED]>:
>
>
> Thank you to anyone who may be of help...
>
> PROBLEM:
>
> ImportError: No module named django
>
> MY SETTINGS:
>
> /Working/django/django/__init__.py   (file exists)
> /Working/projects/  (my main project
> folder)
> /Working/projects/mysite('mysite' project folder)
> /usr/lib/python2.4/site-packages(my python packages folder)
> (Permissions are 755 with owner:group = root:root)
>
> httpd.conf directives are...
>
> 
> SetHandler python-program
> PythonPath "['/Working/django','/Working/modules','/Working/
> projects','/Working/projects/mysite'] + sys.path"
> SetEnv DJANGO_SETTINGS_MODULE mysite.settings
> #  PythonHandler mod_python.testhandler
> PythonHandler django.core.handlers.modpython
> PythonDebug On
> 
>
> OTHER CLUES:
>
> - Django imports just fine from command line python call with
> $PYTHONPATH exported to same directories as location directive.
> - If I put my django folder in /usr/lib/python2.4/site-packages/ it
> works.
> - A sym link from /Working/django/django to /usr/lib/python2.4/site-
> packages/django does not work.
> - Reference by PythonPath directive also is failing.
> - Viewing testhandler output shows that my /Working/* directories are
> getting into sys.path alright.
>
> MY SYSTEM:
>
> OS = { Red Hat Enterprise Linux 5 | RHEL 5 | RHEL5 }
> Python 2.4.3 (#1, Dec 11 2006, 11:38:52)
> Apache/2.2.3 (Red Hat) Server
> mod_python.version '3.2.8'
> Django VERSION = (0, 97, 'pre')
>
>
> Thank you for looking.
>
> Scott
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---