Hi

I'm new with django and have made a small test app which works as it
should with the development server.

However when i try and deploy it with apache and mod_python I cant get
it to work. I have tested that mod_python works. I can do the
recommended mod_python test. When i try to run the django app via
apache it works well as long as the page being displayed does not
actually try and access the database. In other words if I enter a url
that just pops up an empty page with no django tags in it the page is
displayed as it should.

These are my settings.

Apache 2.2.11
mod_python 3.3.2-dev
I am on a Mac (Leopard 10.5.8)
I have the latest stable version of django 1.1

When I start apache the following can be found in the logs

Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7l DAV/2 mod_python/
3.3.2-dev-20080819 Python/2.5.1 configured -- resuming normal
operations

The necessary settings in httpd.conf with regards to django is as
follows

Alias test.django.com "/Users/someone/djangoproject/appname"

SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE appname.settings
PythonDebug On
PythonPath "['/Users/someone/djangoproject/'] + sys.path"

When i run a url that invokes a function which tries to access the
database (sqlite3 in this case) i receive the following error

TemplateSyntaxError at /appname/clients/
Caught an exception while rendering: no such table:
addressbook_contacts

Original Traceback (most recent call last):
  File "/Library/Python/2.5/site-packages/django/template/debug.py",
line 71, in render_node
    result = node.render(context)
  File "/Library/Python/2.5/site-packages/django/template/
defaulttags.py", line 126, in render
    len_values = len(values)
  File "/Library/Python/2.5/site-packages/django/db/models/query.py",
line 81, in __len__
    self._result_cache = list(self.iterator())
  File "/Library/Python/2.5/site-packages/django/db/models/query.py",
line 238, in iterator
    for row in self.query.results_iter():
  File "/Library/Python/2.5/site-packages/django/db/models/sql/
query.py", line 287, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/Library/Python/2.5/site-packages/django/db/models/sql/
query.py", line 2369, in execute_sql
    cursor.execute(sql, params)
  File "/Library/Python/2.5/site-packages/django/db/backends/util.py",
line 19, in execute
    return self.cursor.execute(sql, params)
  File "/Library/Python/2.5/site-packages/django/db/backends/sqlite3/
base.py", line 193, in execute
    return Database.Cursor.execute(self, query, params)
OperationalError: no such table: addressbook_contacts

Now i know for a fact that the database does contain a table called
contacts. I have no problems whatsoever accessing this using the
development server.

As far as I can tell django seems unable to access the database when
going through apache and mod_python.
I have googled and I have searched to no avail. If anyone can give me
a helping hand I would appreciate it very much.

Thanks.
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to