Work-around to fix Django 1.6 urls.defaults compatibility with thrid-party app

Work-around to fix Django 1.6 urls.defaults compatibility with thrid-party app

Posted: 10 years ago in  Python | Django |


Since Django 1.6, running third-party django application, you will get error "ImportError: No module named defaults"


Since Django 1.6, running third-party django application, you will get error "ImportError: No module named defaults"

I get this error when reuse django-ckeditor 4.4.4 plugin

Using traceback and find where urls.defaults imported, the code should be like

from django.conf.urls.defaults import *

It should be fixed

from django.conf.urls import *

Fix:

You can copy their urls.py to urls.py in your app/project with appropriate import or fork their app while wait them to fix the bug.