forked from abogushov/django-admin-json-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SimpleMDE is now loaded from settings. DAJE_SIMPLE_MDE_CSS and DAJE_SIMPLE_MDE_JS are arrays of files that should be loaded. We default to the original simple MDE. In the example project, we override those with the custom Designlab SimpleMDE files and the DesignLab Showdown Extensions
- Loading branch information
Showing
8 changed files
with
51 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from .admin import JSONEditorWidget # noqa | ||
|
||
__version__ = '0.2.5' | ||
__version__ = '0.2.6' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from django.conf import settings | ||
|
||
|
||
class Settings(object): | ||
""" | ||
Shadow Django's settings with a little logic | ||
""" | ||
|
||
@property | ||
def DAJE_SIMPLE_MDE_CSS(self): | ||
return getattr(settings, 'DAJE_SIMPLE_MDE_CSS', ['django_admin_json_editor/simplemde/simplemde.min.css']) | ||
|
||
@property | ||
def DAJE_SIMPLE_MDE_JS(self): | ||
return getattr(settings, 'DAJE_SIMPLE_MDE_JS', ['django_admin_json_editor/simplemde/simplemde.min.js']) | ||
|
||
|
||
conf = Settings() |
6 changes: 3 additions & 3 deletions
6
django_admin_json_editor/static/django_admin_json_editor/jsoneditor/jsoneditor.min.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.