0.5.10 documentation insert video, file storage
This commit is contained in:
@@ -29,17 +29,23 @@ DEBUG = True
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||
CSRF_TRUSTED_ORIGINS = ['https://aerbim.com', 'http://127.0.0.1:8019/']
|
||||
|
||||
CSRF_TRUSTED_ORIGINS = ['https://aerbim.com', 'http://127.0.0.1:8019/', 'https://www.youtube.com/']
|
||||
X_FRAME_OPTIONS = 'SAMEORIGIN'
|
||||
# Application definition
|
||||
|
||||
FILEBROWSER_SHOW_IN_DASHBOARD = False
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'colorfield',
|
||||
'modeltranslation',
|
||||
"admin_interface",
|
||||
|
||||
'super_inlines',
|
||||
|
||||
# 'grappelli',
|
||||
'filebrowser',
|
||||
|
||||
"admin_interface",
|
||||
'modeltranslation',
|
||||
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
@@ -72,7 +78,7 @@ MIDDLEWARE = [
|
||||
# 'AuthApp.middleware.ResponseInterceptionMiddleware',
|
||||
]
|
||||
|
||||
X_FRAME_OPTIONS = 'SAMEORIGIN'
|
||||
|
||||
|
||||
ROOT_URLCONF = 'pAerBim.urls'
|
||||
|
||||
@@ -220,8 +226,12 @@ CKEDITOR_CONFIGS = {
|
||||
'toolbar': 'Custom',
|
||||
'forcePasteAsPlainText': True,
|
||||
'allowedContent': True,
|
||||
'extraAllowedContent': 'iframe[*]',
|
||||
# 'disallowedContent': 'img{width,height};img[width,height]',
|
||||
# 'extraPlugins': 'image2',
|
||||
'extraPlugins': ','.join([
|
||||
'codesnippet',
|
||||
# 'youtube'
|
||||
]),
|
||||
|
||||
'enterMode': 2,
|
||||
'basicEntities' : False,
|
||||
@@ -250,7 +260,12 @@ CKEDITOR_CONFIGS = {
|
||||
'/',
|
||||
{'name': 'links', 'items': ['Link', 'Unlink', 'Anchor', '-', 'Blockquote' ]},
|
||||
{'name': 'insert',
|
||||
'items': ['Image', 'Update', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe']},
|
||||
'items': ['Image', 'Youtube', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe']
|
||||
},
|
||||
# {
|
||||
# 'name': 'youtube',
|
||||
# 'items': ['Youtube',]
|
||||
# }
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,16 @@ from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
from django.conf.urls.static import static
|
||||
from django.conf import settings
|
||||
from filebrowser.sites import site
|
||||
|
||||
|
||||
# from django.core.files.storage import DefaultStorage
|
||||
# from filebrowser.sites import FileBrowserSite
|
||||
#
|
||||
# site = FileBrowserSite(name="filebrowser", storage=DefaultStorage())
|
||||
# customsite = FileBrowserSite(name='custom_filebrowser', storage=DefaultStorage())
|
||||
# customsite.directory = "uploads/"
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
path('ckeditor/', include('ckeditor_uploader.urls')),
|
||||
@@ -14,6 +24,9 @@ urlpatterns = [
|
||||
|
||||
from django.conf.urls.i18n import i18n_patterns
|
||||
urlpatterns += i18n_patterns(
|
||||
path('admin/filebrowser/', site.urls),
|
||||
|
||||
# path('grappelli/', include('grappelli.urls')),
|
||||
|
||||
path('admin/', admin.site.urls),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user