From 44abe84be0ade6ce2aa60a77350d10a3454909bc Mon Sep 17 00:00:00 2001 From: Alzea Arafat Date: Fri, 30 Dec 2016 11:45:02 +0700 Subject: [PATCH] add django 1.10 compability --- quill/admin.py | 2 +- quill/templates/quill/widget.html | 4 ++-- quill/widgets.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/quill/admin.py b/quill/admin.py index 45f0060..39a4414 100644 --- a/quill/admin.py +++ b/quill/admin.py @@ -1,6 +1,6 @@ import json -from django.conf.urls import patterns, url +from django.conf.urls import url from django.contrib import admin from django.core.files.storage import default_storage from django.http import Http404, HttpResponse, HttpResponseBadRequest diff --git a/quill/templates/quill/widget.html b/quill/templates/quill/widget.html index f68059b..b024d8a 100644 --- a/quill/templates/quill/widget.html +++ b/quill/templates/quill/widget.html @@ -21,8 +21,8 @@ var toolbarSelector = '[data-quill="{{ "toolbar_selector"|quill_conf }}"]'; var id = '{{ id }}'; var imageModuleOpts = { - handler: '{% url "admin:quill-file-upload" %}', - allowedExtensions: JSON.parse('{{ "allowed_image_extensions"|quill_conf_json }}') + allowedExtensions: JSON.parse('{{ "allowed_image_extensions"|quill_conf_json }}'), + // handler: '{% url "admin:quill-file-upload" %}', #Commented this our because trown an error. }; var theme = '{{ "theme"|quill_conf }}'; var editor = new QuillDjango(id, editorSelector, toolbarSelector, imageModuleOpts, theme); diff --git a/quill/widgets.py b/quill/widgets.py index 6ee9742..9d70688 100644 --- a/quill/widgets.py +++ b/quill/widgets.py @@ -1,6 +1,6 @@ from django import forms from django.apps import apps -from django.forms.util import flatatt +from django.forms.utils import flatatt from django.template.loader import render_to_string from django.templatetags.static import static from django.utils.safestring import mark_safe