Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
manhattan
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
InnovacionDocente
manhattan
Commits
0f42129c
Commit
0f42129c
authored
Feb 06, 2020
by
Enrique Matías Sánchez (Quique)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ui Configuración de Summernote
parent
63b3a3b4
Pipeline
#526
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
8 deletions
+32
-8
settings-sample.py
manhattan_project/settings-sample.py
+32
-8
No files found.
manhattan_project/settings-sample.py
View file @
0f42129c
...
...
@@ -239,6 +239,7 @@ CRISPY_TEMPLATE_PACK = "bootstrap4"
# SUMMERNOTE
MEDIA_URL
=
"/media/"
MEDIA_ROOT
=
os
.
path
.
join
(
BASE_DIR
,
"media"
)
SUMMERNOTE_THEME
=
"bs4"
SUMMERNOTE_CONFIG
=
{
...
...
@@ -259,6 +260,28 @@ SUMMERNOTE_CONFIG = {
# "print": {
# "stylesheetUrl": "/some_static_folder/printable.css",
# },
"codemirror"
:
{
"mode"
:
"htmlmixed"
,
"lineNumbers"
:
"true"
,
# You have to include theme file in 'css' or 'css_for_inplace'
# before using it.
"theme"
:
"monokai"
,
},
"placeholder"
:
"Introduzca sus comentarios"
,
"toolbar"
:
[
# <https://summernote.org/deep-dive/#custom-toolbar-popover>
[
"style"
,
[
"style"
]],
[
"font"
,
[
"bold"
,
"italic"
,
"forecolor"
,
"superscript"
,
"subscript"
,
"clear"
],
],
[
"para"
,
[
"ul"
,
"ol"
,
"paragraph"
]],
[
"table"
,
[
"table"
]],
[
"insert"
,
[
"link"
,
"picture"
]],
[
"view"
,
[
"fullscreen"
,
"codeview"
]],
],
"codeviewFilter"
:
True
,
"codeviewIframeFilter"
:
True
,
},
# Need authentication while uploading attachments.
"attachment_require_authentication"
:
True
,
...
...
@@ -273,6 +296,14 @@ SUMMERNOTE_CONFIG = {
# 'disable_attachment': False,
# Set `True` to return attachment paths in absolute URIs.
# 'attachment_absolute_uri': False,
# test_func in summernote upload view.
# (Allow upload images only when user passes the test)
# https://docs.djangoproject.com/en/2.2/topics/auth/default/#django.contrib.auth.mixins.UserPassesTestMixin
# ```
# def example_test_func(request):
# return request.user.groups.filter(name='group_name').exists()
# ```
# 'test_func_upload_view': example_test_func,
# You can add custom css/js for SummernoteWidget.
# 'css': (),
# 'js': (
...
...
@@ -289,17 +320,10 @@ SUMMERNOTE_CONFIG = {
"css"
:
(
"//cdnjs.cloudflare.com/ajax/libs/codemirror/5.29.0/theme/monokai.min.css"
,
),
"codemirror"
:
{
"mode"
:
"htmlmixed"
,
"lineNumbers"
:
"true"
,
# You have to include theme file in 'css' or 'css_for_inplace' before using it.
"theme"
:
"monokai"
,
},
# Lazy initialize
# If you want to initialize summernote at the bottom of page, set this as True
# and call `initSummernote()` on your page.
"lazy"
:
True
,
# 'lazy': False,
"lazy"
:
False
,
# To use external plugins,
# Include them within `css` and `js`.
# 'js': {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment