Description of problem: Attempts to access a minimally configured instance of cobbler-web fail. The httpd error_log reports a failure to import a django-provided python module: [Mon Jun 04 20:51:02 2012] [error] [client 10.0.0.183] mod_wsgi (pid=638): Exception occurred processing WSGI script '/usr/share/cobbler/web/cobbler.wsgi'. [Mon Jun 04 20:51:02 2012] [error] [client 10.0.0.183] Traceback (most recent call last): [Mon Jun 04 20:51:02 2012] [error] [client 10.0.0.183] File "/usr/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 219, in __call__ [Mon Jun 04 20:51:02 2012] [error] [client 10.0.0.183] self.load_middleware() [Mon Jun 04 20:51:02 2012] [error] [client 10.0.0.183] File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 47, in load_middleware [Mon Jun 04 20:51:02 2012] [error] [client 10.0.0.183] raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e)) [Mon Jun 04 20:51:02 2012] [error] [client 10.0.0.183] ImproperlyConfigured: Error importing middleware django.contrib.csrf.middleware: "No module named csrf.middleware" Version-Release number of selected component (if applicable): Name : cobbler Version : 2.2.2 Release : 1.fc17 Name : cobbler-web Version : 2.2.2 Release : 1.fc17 Name : Django Version : 1.4 Release : 1.fc17 Steps to Reproduce: 1. Install cobbler, cobbler-web 2. Configure cobbler 3. Access http://example.com/cobbler_web Actual results: httpd reports server error, fail to load required module. Expected results: cobbler-web can find django.contrib.csrf.middleware Additional info: This module was moved/renamed: editing the MIDDLEWARE_CLASSES section of /usr/share/cobbler/web/settings.py to replace 'django.contrib.csrf.middleware.CsrfMiddleware' with 'django.middleware.csrf.CsrfViewMiddleware' will resolve this issue.
This should be resolved in the current release, 2.2.3-1. As part of the new CSRF implementation, there's a conditional in the settings.py file to use the correct CSRF django library based on the django version installed.
*** Bug 832474 has been marked as a duplicate of this bug. ***