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
e297936f
Commit
e297936f
authored
Jan 09, 2017
by
seb-b
Committed by
GitHub
Jan 09, 2017
Browse files
Merge pull request #15 from takeflight/remove-compat-code
Remove compatibility code for unsupported django, wagtail versions
parents
5b4a65c6
ee916b77
Changes
2
Hide whitespace changes
Inline
Side-by-side
wagtailvideos/models.py
View file @
e297936f
...
...
@@ -227,10 +227,7 @@ class AbstractVideo(CollectionMember, index.Indexed, models.Model):
@
classmethod
def
get_transcode_model
(
cls
):
if
django
.
VERSION
>=
(
1
,
9
):
return
cls
.
transcodes
.
rel
.
related_model
else
:
return
cls
.
transcodes
.
related
.
related_model
return
cls
.
transcodes
.
rel
.
related_model
def
get_transcode
(
self
,
media_format
):
Transcode
=
self
.
get_transcode_model
()
...
...
wagtailvideos/views/chooser.py
View file @
e297936f
...
...
@@ -118,12 +118,7 @@ def chooser_upload(request):
video
.
save
()
# Reindex the video to make sure all tags are indexed
from
wagtail.wagtailcore
import
__version__
if
__version__
.
startswith
(
"1.4"
):
for
backend
in
get_search_backends
():
backend
.
add
(
video
)
else
:
search_index
.
insert_or_update_object
(
video
)
search_index
.
insert_or_update_object
(
video
)
return
render_modal_workflow
(
request
,
None
,
'wagtailvideos/chooser/video_chosen.js'
,
...
...
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