Rob,
You could use a middleware to do this, which runs before every view.
Try and get a connection in there, and if it can't then forward to the
'no database' template.
http://www.djangoproject.com/documentation/middleware/
The disadvantage is that you incur an extra SQL query for every
reques
What web server are you using in development ? I suspect this might be
a lighttpd / fastcgi problem. Have you tried Apache / mod_python ?
Just as a reference I'm managing 90,000+ hits a day on one Apache on a
UML virtual server, with the load rarely going above 2. With you setup
and Django you
akhen,
I tend to use a cron job. That runs a small shell script which sets
PYTHONPATH and DJANGO_SETTINGS_MODULE and runs the Python script. In
there you import your models and do whetever you need to do really.
Regards,
Graham.
--~--~-~--~~~---~--~~
You rec
Jaroslaw,
It nearly drove me crazy too !
You need to enter your name and email on the "settings" page
(http://code.djangoproject.com/settings) before you post anything.
Regards,
Graham.
--~--~-~--~~~---~--~~
You received this message because you are subsc
4 matches
Mail list logo