[PKG-Openstack-devel] Bug#856856: cobbler-web: Doesn't run out of the box with Django 1.10

Tim Small tim at seoss.co.uk
Sun Mar 5 14:54:33 UTC 2017


Package: cobbler-web
Version: 2.6.6+dfsg1-13
Severity: important

The cobbler-web package appears to assume an earlier django version and
breaks on version 1.10 which is currently in Stretch.  500 Server error.

I've made the following changes in an effort to workaround, but given up
as didn't look like it was going to be a quick fix...  Haven't checked
upstream git to see if this has already been done...

in  /usr/share/cobbler-common/web/settings.py


TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [
            '/usr/share/cobbler/web/templates',
        ],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.core.context_processors.request',
            ],
        },
    },
]

ALLOWED_HOSTS = ['cobbler.mydomain']

and have commented out:

#from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS
#
#TEMPLATE_CONTEXT_PROCESSORS += (
#     'django.core.context_processors.request',
#) 

... sources were: https://review.fuel-infra.org/gitweb?p=packages%2Fcentos7%2Fcobbler.git;a=commitdiff;h=234bb8912faacdc1840d00e67caf8833d12ab502

and https://docs.djangoproject.com/en/1.10/ref/templates/upgrading/


In /usr/share/cobbler-common/web/urls.py :


from django.conf.urls import include, url

urlpatterns=[
    url(r'^', include('cobbler_web.urls')),
]

reference: http://stackoverflow.com/questions/38786036/importerror-cannot-import-name-patterns




-- System Information:
Debian Release: 9.0
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)



More information about the Openstack-devel mailing list