Wednesday, June 30, 2010

DATABASE_ROUTERS in settings.py results in Internal Server Error

I tried to configure a database router according to
http://docs.djangoproject.com/en/dev/topics/db/multi-db/#an-example.

All my attempts lead to the Django project outputing "Internal Server
Error" generic message with no further info.

If my project is named 'myproject' and my app named 'myapp' how should
I configure the DATABASE_ROUTERS setting?

I have a AppRouter.py in the folder: myproject/AppRouter.py
The absolute path to AppRouter.py is: /home/username/webapps/django/
myproject/AppRouter.py

My settings.py has the line:
DATABASE_ROUTERS = ['myproject.AppRouter',]

But it doesn't work. How do I configure a 'python path' is it absolute
or relative?

Thank you.

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

No comments:

Post a Comment