You are not logged in.

Change Language:

Profile for octopusgrabbus

Name octopusgrabbus
Email Address old_road_farm@verizon.net
Website URLhttp://octopusgrabbus.wordpress.com
AvatarUsers avatar
Posts3
  • Re: Admin site not formatted
    Board >> Getting Started >> Setup and Configuration
    I'll try this and post the results. Thanks for the answer.
  • Admin site not formatted
    Board >> Getting Started >> Setup and Configuration
    This post is related to apache configuration posted yesterday.
    Using apache and not the built-in web server, I can reach the admin site, but it's not formatted well, as it is with the built-in web server.

    Any ideas on what to do?

    Here's the location directive in apache

    <Location "/">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE chapter4.settings
    PythonOption django.root /home/amr/web/django/chapter4
    PythonPath "['/home/amr/web/django/'] + ['/home/amr/web/django/favorites/'] + sys.path
    "
    PythonDebug On
    </Location>
  • apache configuration
    Board >> Getting Started >> Setup and Configuration
    I worked through samples in the Visual Quickpro Guide Django. I used python manage.py runserver while running through the examples.

    Now, I want to configure this in Apache. Django is complaining about finding modules underneath my top directory.

    Here's the apache configuration:

    <Location "/">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE chapter4.settings
    PythonOption django.root /home/amr/web/django/chapter4
    PythonPath "['/home/amr/web/django/'] + ['/home/amr/web/django/favorites/'] + sys.path
    "
    PythonDebug On
    </Location>

    Here is the error:

    Request Method: GET
    Request URL: http://localhost:8586/
    Exception Type: ImportError
    Exception Value:

    No module named favorites.models

    Exception Location: /home/amr/web/django/chapter4/favorites/views.py in <module>, line 3
    P

    I can make this error disappear by editing view.py in chapter4/favorites and modifying

    from favorites.models import *

    to

    from models import *

    My question is what configuration changes can I make in Apache to avoid making this edit, given this code works with Django's default web server?

    Thanks.
    cmn


Powered by Sphene Community Tools