Control: tags -1 + patch On 2013-05-16 14:27:44, Matthias Klose wrote: > File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 152, > in > __init__ > raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.") > django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not > be > empty. > make[1]: *** [override_dh_auto_test] Error 1 > make[1]: Leaving directory `/home/packages/tmp/sorl-thumbnail-11.12' > make: *** [build] Error 2 > dpkg-buildpackage: error: debian/rules build gave error exit status 2
The attached patch fixes this. The patch fixes also an issue with django 1.5, that pops up later if SECRET_KEY is set: set -e; \ for python in python2.7; do \ for name in pil pgmagick imagemagick graphicsmagick; do \ LOCPATH=/«PKGBUILDDIR»/tmp-locales LC_ALL=en_US.UTF-8 PYTHONPATH=tests LOCAL_BUILD=1 $python tests/runtests.py --settings=settings.$name ; \ done; \ done ..................................ssE. ====================================================================== ERROR: testEmptyError (thumbnail_tests.tests.TemplateTestCaseClient) ---------------------------------------------------------------------- Traceback (most recent call last): File "/«PKGBUILDDIR»/tests/thumbnail_tests/tests.py", line 403, in testEmptyError response = client.get('/thumbnail9.html') File "/usr/lib/python2.7/dist-packages/django/test/client.py", line 453, in get response = super(Client, self).get(path, data=data, **extra) File "/usr/lib/python2.7/dist-packages/django/test/client.py", line 279, in get return self.request(**r) File "/usr/lib/python2.7/dist-packages/django/test/client.py", line 424, in request six.reraise(*exc_info) File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 92, in get_response response = middleware_method(request) File "/usr/lib/python2.7/dist-packages/django/middleware/common.py", line 69, in process_request if (not urlresolvers.is_valid_path(request.path_info, urlconf) and File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 551, in is_valid_path resolve(path, urlconf) File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 440, in resolve return get_resolver(urlconf).resolve(path) File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 321, in resolve sub_match = pattern.resolve(new_path) File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 223, in resolve return ResolverMatch(self.callback, args, kwargs, self.name) File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 230, in callback self._callback = get_callable(self._callback_str) File "/usr/lib/python2.7/dist-packages/django/utils/functional.py", line 29, in wrapper result = func(*args) File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 104, in get_callable (lookup_view, mod_name)) ViewDoesNotExist: Could not import django.views.generic.simple.direct_to_template. Parent module django.views.generic.simple does not exist. ---------------------------------------------------------------------- Ran 38 tests in 1.108s FAILED (errors=1, skipped=2) Running tests for 'settings.pil' Creating test database for alias 'default'... Destroying test database for alias 'default'... make[1]: *** [override_dh_auto_test] Error 1 make[1]: Leaving directory `/«PKGBUILDDIR»' make: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 direct_to_template got deprecated in 1.4 and removed in django 1.5. Regards -- Sebastian Ramacher
--- a/tests/settings/default.py +++ b/tests/settings/default.py @@ -32,3 +32,4 @@ "django.core.context_processors.request", ) +SECRET_KEY = 'testkey' --- a/tests/thumbnail_tests/urls.py +++ b/tests/thumbnail_tests/urls.py @@ -1,12 +1,16 @@ from django.conf.urls.defaults import * from django.conf import settings +from django.views.generic import TemplateView +class DynamicTemplateView(TemplateView): + def get_template_names(self): + return self.kwargs['template'] urlpatterns = patterns('', (r'^media/(?P<path>.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT, 'show_indexes': True} ), - (r'^(.*\.html)$', 'django.views.generic.simple.direct_to_template'), + (r'^(?P<template>.*\.html)$', DynamicTemplateView.as_view()), )
signature.asc
Description: Digital signature
_______________________________________________ Python-modules-team mailing list Python-modules-team@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team