Skip to content

Commit

Permalink
Pass views as callables, not as strings
Browse files Browse the repository at this point in the history
  • Loading branch information
akx committed Dec 2, 2015
1 parent 48c0c6a commit b06ec54
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions tinymce/urls.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Copyright (c) 2008 Joost Cassee
# Licensed under the terms of the MIT License (see LICENSE.txt)
from tinymce.views import textareas_js, spell_check, flatpages_link_list, compressor, filebrowser, preview

try:
from django.conf.urls import url, patterns
from django.conf.urls import url
except:
from django.conf.urls.defaults import *
from django.conf.urls.defaults import url

urlpatterns = patterns('tinymce.views',
url(r'^js/textareas/(?P<name>.+)/$', 'textareas_js', name='tinymce-js'),
url(r'^js/textareas/(?P<name>.+)/(?P<lang>.*)$', 'textareas_js', name='tinymce-js-lang'),
url(r'^spellchecker/$', 'spell_check'),
url(r'^flatpages_link_list/$', 'flatpages_link_list'),
url(r'^compressor/$', 'compressor', name='tinymce-compressor'),
url(r'^filebrowser/$', 'filebrowser', name='tinymce-filebrowser'),
url(r'^preview/(?P<name>.+)/$', 'preview', name='tinymce-preview'),
)
urlpatterns = [
url(r'^js/textareas/(?P<name>.+)/$', textareas_js, name='tinymce-js'),
url(r'^js/textareas/(?P<name>.+)/(?P<lang>.*)$', textareas_js, name='tinymce-js-lang'),
url(r'^spellchecker/$', spell_check),
url(r'^flatpages_link_list/$', flatpages_link_list),
url(r'^compressor/$', compressor, name='tinymce-compressor'),
url(r'^filebrowser/$', filebrowser, name='tinymce-filebrowser'),
url(r'^preview/(?P<name>.+)/$', preview, name='tinymce-preview'),
]

0 comments on commit b06ec54

Please sign in to comment.