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
c4294f71
Commit
c4294f71
authored
Apr 06, 2022
by
AleksandrSolonitsky
Committed by
13hakta
Oct 04, 2022
Browse files
Separate variable in widgets
parent
f7e32ed2
Changes
1
Hide whitespace changes
Inline
Side-by-side
wagtailvideos/widgets.py
View file @
c4294f71
...
...
@@ -17,14 +17,15 @@ class AdminVideoChooser(AdminChooser):
self
.
video_model
=
get_video_model
()
def
render_html
(
self
,
name
,
value
,
attrs
):
instance
,
value
=
self
.
get_instance_and_id
(
self
.
video_model
,
value
)
instance
,
value_data
=
self
.
get_instance_and_id
(
self
.
video_model
,
value
)
original_field_html
=
super
(
AdminVideoChooser
,
self
).
render_html
(
name
,
value
,
attrs
)
return
render_to_string
(
"wagtailvideos/widgets/video_chooser.html"
,
{
'widget'
:
self
,
'original_field_html'
:
original_field_html
,
'attrs'
:
attrs
,
'value'
:
value
,
'value'
:
value
_data
,
'video'
:
instance
,
})
...
...
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