Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix admin import errors #65
  • Loading branch information
LeeHanYeong committed Dec 7, 2021
1 parent 887e3bc commit 41fa8b2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion deploy.py
Expand Up @@ -2,7 +2,7 @@
import subprocess
import os

ROOT_DIR = os.path.dirname(os.path.dirname(__file__))
ROOT_DIR = os.path.dirname(__file__)
VERSION_FILE = os.path.join(ROOT_DIR, "version.txt")

if __name__ == "__main__":
Expand Down
11 changes: 11 additions & 0 deletions django_quill/config.py
Expand Up @@ -29,3 +29,14 @@
},
},
}
MEDIA_JS = [
"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js",
"https://cdn.quilljs.com/1.3.7/quill.min.js",
"https://unpkg.com/quill-image-compress@1.2.16/dist/quill.imageCompressor.min.js",
"django_quill/django_quill.js",
]
MEDIA_CSS = [
"https://cdn.quilljs.com/1.3.7/quill.snow.css",
"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/darcula.min.css",
"django_quill/django_quill.css",
]
16 changes: 3 additions & 13 deletions django_quill/widgets.py
Expand Up @@ -10,7 +10,7 @@
from django.utils.functional import Promise
from django.utils.safestring import mark_safe

from .config import DEFAULT_CONFIG
from .config import DEFAULT_CONFIG, MEDIA_JS, MEDIA_CSS

__all__ = (
"LazyEncoder",
Expand All @@ -30,18 +30,8 @@ def default(self, obj):

class QuillWidget(forms.Textarea):
class Media:
js = (
"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js",
"django_quill/django_quill.js",
"https://cdn.quilljs.com/1.3.7/quill.min.js",
)
css = {
"all": (
"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/darcula.min.css",
"django_quill/django_quill.css",
"https://cdn.quilljs.com/1.3.7/quill.snow.css",
)
}
js = MEDIA_JS
css = {"all": MEDIA_CSS}

def __init__(self, config_name="default", *args, **kwargs):
super().__init__(*args, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion version.txt
@@ -1 +1 @@
0.1.24
0.1.25

0 comments on commit 41fa8b2

Please sign in to comment.