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
fe47b4ad
Commit
fe47b4ad
authored
Jul 27, 2016
by
Seb
Browse files
Added travis and tox configs, fixed error found with wagtail 1.4
parent
9b5b8662
Changes
4
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
fe47b4ad
...
...
@@ -4,3 +4,4 @@ dist/
./settings.py
venv/
tests.sqlite3
.tox
.travis.yml
0 → 100644
View file @
fe47b4ad
language
:
python
cache
:
pip
# Matrix of build options
python
:
-
'
3.4'
-
'
3.5'
env
:
global
:
-
DJANGO_SETTINGS_MODULE="tests.app.settings"
-
TOX_ENV=
matrix
:
-
DJANGO='18'
-
DJANGO='19'
-
WAGTAIL='14'
-
WAGTAIL='15'
install
:
-
pip install --upgrade pip wheel tox
cache
:
directories
:
-
$HOME/.cache/pip
-
$HOME/virtualenv
script
:
# Run tox using either a specific environment from TOX_ENV,
# or building one from the environment variables
-
tox -e "${TOX_ENV:-py${TRAVIS_PYTHON_VERSION/./}-dj${DJANGO}-wt${WAGTAIL}}"
tox.ini
0 → 100644
View file @
fe47b4ad
[tox]
skip_missing_interpreters
=
True
envlist
=
py{34,35}-dj{18,19}-wt{14,15}
[testenv]
commands
=
python runtests.py
usedevelop
=
True
pip_pre
=
True
basepython
=
py34:
python3.4
py35:
python3.5
deps
=
dj18:
Django~=1.8.0
dj19:
Django~=1.9.0
wt14:
wagtail~=1.4.0
wt15:
wagtail~=1.5.0
wagtailvideos/views/chooser.py
View file @
fe47b4ad
...
...
@@ -9,6 +9,7 @@ from wagtail.wagtailadmin.utils import PermissionPolicyChecker
from
wagtail.wagtailcore.models
import
Collection
from
wagtail.wagtailsearch
import
index
as
search_index
from
wagtail.wagtailsearch.backends
import
get_search_backends
from
wagtailvideos.forms
import
get_video_form
from
wagtailvideos.models
import
Video
from
wagtailvideos.permissions
import
permission_policy
...
...
@@ -114,7 +115,12 @@ def chooser_upload(request):
video
.
save
()
# Reindex the video to make sure all tags are indexed
search_index
.
insert_or_update_object
(
video
)
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
)
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