Hey -
I'm coming from a c background into this - more or less a newbie to
the python/django environment.

That said - I have an issue with paths and mod_python that I can't
seem to resolve.

I have the following directory structure
django_project/
      __init.py__
      manage.py , etc ....
      apps/
          __init.py__
          myapp/
                __init.py__
                views.py
                models.py
                templatetags/
                       __init.py__, etc ...
                templates/
                       __init.py__, etc...

When I run the app using fastcgi there are no problems, and everything
works just fine
but when I run it with mod_python I get the following error:

global name 'apps' is not defined
the error references a line inside views.py
the import that its complaining about is
from django_project.apps.myapp.models import ModelOne, ModelTwo,
ModelThree

my httpd.conf looks like
<Location "/">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE django_project.settings
    PythonPath "['/var/www/webapps/django_project','/var/www/lib/
python2.5'] + sys.path"
    PythonOption django.root /django_project
</Location>

I've tried a number of things, but nothing seems to be resolving the
issue.
Maybe someone else has run into this.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to