| Name | octopusgrabbus |
|---|---|
| Email Address | old_road_farm@verizon.net |
| Website URL | http://octopusgrabbus.wordpress.com |
| Avatar | ![]() |
| Posts | 3 |
-
- 2010-07-10 19:22:17
- Re: Admin site not formatted
- Board >> Getting Started >> Setup and Configuration
- I'll try this and post the results. Thanks for the answer.
-
- 2010-07-10 12:47:32
- 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>
-
- 2010-07-09 12:36:59
- 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



