Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add django 1.10 compability #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion quill/admin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json

from django.conf.urls import patterns, url
from django.conf.urls import url

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

patterns is referenced below, how does this work?

from django.contrib import admin
from django.core.files.storage import default_storage
from django.http import Http404, HttpResponse, HttpResponseBadRequest
Expand Down
4 changes: 2 additions & 2 deletions quill/templates/quill/widget.html
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a viable solution, without an explanation. Commenting out code isn't a preferred practice either.

};
var theme = '{{ "theme"|quill_conf }}';
var editor = new QuillDjango(id, editorSelector, toolbarSelector, imageModuleOpts, theme);
Expand Down
2 changes: 1 addition & 1 deletion quill/widgets.py
Original file line number Diff line number Diff line change
@@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work for older versions of Django.

from django.template.loader import render_to_string
from django.templatetags.static import static
from django.utils.safestring import mark_safe
Expand Down