An patchwork setup dies like this after upgrading the OS to Fedora 17:

mod_python (pid=18233, interpreter='patchwork.dead-in-the-water.org', 
phase='PythonHandler', handler='django.core.handlers.modpython'): Application 
error
ServerName: 'patchwork.dead-in-the-water.org'
DocumentRoot: '/var/www/patchwork.dead-in-the-water.org/patchwork/htdocs/'
URI: '/patch/3584/'
Location: '/'
Directory: None
Filename: '/var/www/patchwork.dead-in-the-water.org/patchwork/htdocs/patch'
PathInfo: '/3584/'
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/mod_python/importer.py", line 1537, 
in HandlerDispatch\n    default=default_handler, arg=req, silent=hlist.silent)
  File "/usr/lib64/python2.7/site-packages/mod_python/importer.py", line 1229, 
in _process_target\n    result = _execute_target(config, req, object, arg)
  File "/usr/lib64/python2.7/site-packages/mod_python/importer.py", line 1128, 
in _execute_target\n    result = object(arg)
  File "/usr/lib/python2.7/site-packages/django/core/handlers/modpython.py", 
line 180, in handler\n    return ModPythonHandler()(req)
  File "/usr/lib/python2.7/site-packages/django/core/handlers/modpython.py", 
line 158, in __call__\n    response = self.get_response(request)
  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 
179, in get_response\n    response = self.handle_uncaught_exception(request, 
resolver, sys.exc_info())
  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 
228, in handle_uncaught_exception\n    return callback(request, **param_dict)
  File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 91, 
in _wrapped_view\n    response = view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/defaults.py", line 32, in 
server_error\n    t = loader.get_template(template_name) # You need to create a 
500.html template.
  File "/usr/lib/python2.7/site-packages/django/template/loader.py", line 145, 
in get_template\n    template, origin = find_template(template_name)
  File "/usr/lib/python2.7/site-packages/django/template/loader.py", line 128, 
in find_template\n    loader = find_template_loader(loader_name)
  File "/usr/lib/python2.7/site-packages/django/template/loader.py", line 101, 
in find_template_loader\n    raise ImproperlyConfigured('Error importing 
template source loader %s: "%s"' % (loader, e))
ImproperlyConfigured: Error importing template source loader 
django.template.loaders.filesystem.load_template_source: "'module' object has 
no attribute 'load_template_source'"

I was able to figure out that the following seems to be needed:

diff --git a/apps/settings.py b/apps/settings.py
index 7523099..06fa64f 100644
--- a/apps/settings.py
+++ b/apps/settings.py
@@ -49,8 +49,8 @@ SECRET_KEY = '000000000000000000000000000000000000000000000000
 
 # List of callables that know how to import templates from various sources.
 TEMPLATE_LOADERS = (
-    'django.template.loaders.filesystem.load_template_source',
-    'django.template.loaders.app_directories.load_template_source',
+     'django.template.loaders.filesystem.Loader',
+     'django.template.loaders.app_directories.Loader',
 #     'django.template.loaders.eggs.load_template_source',
 )
 
But that leads to the following errors:

mod_python (pid=20390, interpreter='patchwork.dead-in-the-water.org', 
phase='PythonHandler', handler='django.core.handlers.modpython'): Application 
error
ServerName: 'patchwork.dead-in-the-water.org'
DocumentRoot: '/var/www/patchwork.dead-in-the-water.org/patchwork/htdocs/'
URI: '/patch/1016/'
Location: '/'
Directory: None
Filename: '/var/www/patchwork.dead-in-the-water.org/patchwork/htdocs/patch'
PathInfo: '/1016/'
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/mod_python/importer.py", line 1537, 
in HandlerDispatch\n    default=default_handler, arg=req, silent=hlist.silent)
  File "/usr/lib64/python2.7/site-packages/mod_python/importer.py", line 1229, 
in _process_target\n    result = _execute_target(config, req, object, arg)
  File "/usr/lib64/python2.7/site-packages/mod_python/importer.py", line 1128, 
in _execute_target\n    result = object(arg)
  File "/usr/lib/python2.7/site-packages/django/core/handlers/modpython.py", 
line 180, in handler\n    return ModPythonHandler()(req)
  File "/usr/lib/python2.7/site-packages/django/core/handlers/modpython.py", 
line 158, in __call__\n    response = self.get_response(request)
  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 
179, in get_response\n    response = self.handle_uncaught_exception(request, 
resolver, sys.exc_info())
  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 
228, in handle_uncaught_exception\n    return callback(request, **param_dict)
  File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 91, 
in _wrapped_view\n    response = view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/defaults.py", line 32, in 
server_error\n    t = loader.get_template(template_name) # You need to create a 
500.html template.
  File "/usr/lib/python2.7/site-packages/django/template/loader.py", line 145, 
in get_template\n    template, origin = find_template(template_name)
  File "/usr/lib/python2.7/site-packages/django/template/loader.py", line 138, 
in find_template\n    raise TemplateDoesNotExist(name)
TemplateDoesNotExist: 500.html

And of course adding a 500.html template only makes the error look "prettier" 
to the use but doesn't fix anything.

Do I have to dig up an older Django for Patchwork?  Any help you could give 
would be appreciated,

Thanks,

  Ralf
_______________________________________________
Patchwork mailing list
[email protected]
https://lists.ozlabs.org/listinfo/patchwork

Reply via email to