Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Websites UFRPE
Wagtail Videos
Commits
b9fcc016
Unverified
Commit
b9fcc016
authored
Nov 08, 2021
by
Seb Brown
Committed by
GitHub
Nov 08, 2021
Browse files
Merge pull request #86 from jkevingutierrez/patch-5
Fix get_chooser_js_data removal from wagtail images
parents
31bf0a52
2fc9a71d
Changes
1
Hide whitespace changes
Inline
Side-by-side
wagtailvideos/views/chooser.py
View file @
b9fcc016
...
@@ -4,10 +4,10 @@ import wagtail
...
@@ -4,10 +4,10 @@ import wagtail
from
django.core.paginator
import
Paginator
from
django.core.paginator
import
Paginator
from
django.shortcuts
import
get_object_or_404
,
render
from
django.shortcuts
import
get_object_or_404
,
render
from
django.urls
import
reverse
from
django.urls
import
reverse
from
django.utils.translation
import
gettext
as
_
from
wagtail.admin.forms.search
import
SearchForm
from
wagtail.admin.forms.search
import
SearchForm
from
wagtail.admin.modal_workflow
import
render_modal_workflow
from
wagtail.admin.modal_workflow
import
render_modal_workflow
from
wagtail.core.models
import
Collection
from
wagtail.core.models
import
Collection
from
wagtail.images.views.chooser
import
get_chooser_js_data
from
wagtail.search
import
index
as
search_index
from
wagtail.search
import
index
as
search_index
from
wagtailvideos
import
get_video_model
from
wagtailvideos
import
get_video_model
...
@@ -24,6 +24,16 @@ else:
...
@@ -24,6 +24,16 @@ else:
permission_checker
=
PermissionPolicyChecker
(
permission_policy
)
permission_checker
=
PermissionPolicyChecker
(
permission_policy
)
def
get_chooser_js_data
():
"""construct context variables needed by the chooser JS"""
return
{
'step'
:
'chooser'
,
'error_label'
:
_
(
"Server Error"
),
'error_message'
:
_
(
"Report this error to your webmaster with the following information:"
),
'tag_autocomplete_url'
:
reverse
(
'wagtailadmin_tag_autocomplete'
),
}
def
get_video_json
(
video
):
def
get_video_json
(
video
):
"""
"""
helper function: given a video, return the json to pass back to the
helper function: given a video, return the json to pass back to the
...
...
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