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

By default, create an absolute URI for the uploaded media file. #493

Merged
Merged
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ SUMMERNOTE_CONFIG = {
# You can completely disable the attachment feature.
'disable_attachment': False,

# Set to `True` to return attachment paths in absolute URIs.
'attachment_absolute_uri': False,
# Set to `False` to return attachment paths in relative URIs.
'attachment_absolute_uri': True,

# 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
Expand Down
2 changes: 1 addition & 1 deletion django_summernote/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_default_config(self):
'attachment_filesize_limit': 1024 * 1024,
'attachment_require_authentication': False,
'attachment_model': 'django_summernote.Attachment',
'attachment_absolute_uri': False,
'attachment_absolute_uri': True,

# additional test_func, for example you want to check if user is in specific group:
# https://docs.djangoproject.com/en/2.2/topics/auth/default/#django.contrib.auth.mixins.UserPassesTestMixin
Expand Down