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
2fc9a71d
Commit
2fc9a71d
authored
Nov 05, 2021
by
Kevin Gutiérrez
Committed by
Kevin Gutiérrez
Nov 05, 2021
Browse files
Fix get_chooser_js_data removal from wagtail images
Fix #85
parent
31bf0a52
Changes
1
Hide whitespace changes
Inline
Side-by-side
wagtailvideos/views/chooser.py
View file @
2fc9a71d
...
...
@@ -4,10 +4,10 @@ import wagtail
from
django.core.paginator
import
Paginator
from
django.shortcuts
import
get_object_or_404
,
render
from
django.urls
import
reverse
from
django.utils.translation
import
gettext
as
_
from
wagtail.admin.forms.search
import
SearchForm
from
wagtail.admin.modal_workflow
import
render_modal_workflow
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
wagtailvideos
import
get_video_model
...
...
@@ -24,6 +24,16 @@ else:
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
):
"""
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