from django.conf.urls.defaults import patterns, url
from django.contrib import admin
from ckeditor import views

urlpatterns = patterns(
    '',
    url(r'^upload/', admin.site.admin_view(views.upload), name='ckeditor_upload'),
    url(r'^browse/', admin.site.admin_view(views.browse), name='ckeditor_browse'),
)

try:
    from django.conf.urls import patterns, url
except ImportError: # django < 1.4
    from django.conf.urls.defaults import patterns, url
from django.contrib import admin
from ckeditor import views

urlpatterns = patterns(
    '',
    url(r'^upload/', admin.site.admin_view(views.upload), name='ckeditor_upload'),
    url(r'^browse/', admin.site.admin_view(views.browse), name='ckeditor_browse'),
)

Fix the file url for Django 1.6
Fix the file url for Django 1.6

+ try:
+     from django.conf.urls import patterns, url
+ except ImportError: # django < 1.4
- from django.conf.urls.defaults import patterns, url
+     from django.conf.urls.defaults import patterns, url
  from django.contrib import admin
  from ckeditor import views
  
  urlpatterns = patterns(
      '',
      url(r'^upload/', admin.site.admin_view(views.upload), name='ckeditor_upload'),
      url(r'^browse/', admin.site.admin_view(views.browse), name='ckeditor_browse'),
  )
  
Fix the file url for Django 1.6
## Code Before:
from django.conf.urls.defaults import patterns, url
from django.contrib import admin
from ckeditor import views

urlpatterns = patterns(
    '',
    url(r'^upload/', admin.site.admin_view(views.upload), name='ckeditor_upload'),
    url(r'^browse/', admin.site.admin_view(views.browse), name='ckeditor_browse'),
)

## Instruction:
Fix the file url for Django 1.6
## Code After:
try:
    from django.conf.urls import patterns, url
except ImportError: # django < 1.4
    from django.conf.urls.defaults import patterns, url
from django.contrib import admin
from ckeditor import views

urlpatterns = patterns(
    '',
    url(r'^upload/', admin.site.admin_view(views.upload), name='ckeditor_upload'),
    url(r'^browse/', admin.site.admin_view(views.browse), name='ckeditor_browse'),
)
