-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from edx/ahsan/LEARNER-1529-upgrade-edx-search
Upgrade to django 1.11 and implemented tox
- Loading branch information
Showing
8 changed files
with
59 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
""" expose courseware search http interface """ | ||
from django.conf import settings | ||
from django.conf.urls import patterns, url | ||
from django.conf.urls import url | ||
|
||
from . import views | ||
|
||
COURSE_ID_PATTERN = getattr(settings, "COURSE_ID_PATTERN", r'(?P<course_id>[^/+]+(/|\+)[^/+]+(/|\+)[^/]+)') | ||
|
||
# urlpatterns is the standard name to use here | ||
# pylint: disable=invalid-name | ||
urlpatterns = patterns( | ||
'', | ||
urlpatterns = [ | ||
url(r'^$', views.do_search, name='do_search'), | ||
url(r'^{}$'.format(COURSE_ID_PATTERN), views.do_search, name='do_search'), | ||
url(r'^course_discovery/$', views.course_discovery, name='course_discovery'), | ||
) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ mock==1.3.0 | |
pep8==1.6.2 | ||
pytz | ||
codecov | ||
tox>=2.3.1,<3.0.0 | ||
|
||
|
||
# edX libraries | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[tox] | ||
envlist = py{27}-django{18,19,110,111}, quality | ||
|
||
[testenv] | ||
setenv = | ||
# This allows us to reference settings.py | ||
PYTHONPATH = {toxinidir} | ||
|
||
deps = | ||
django18: Django>=1.8,<1.9 | ||
django19: Django>=1.9,<1.10 | ||
django110: Django>=1.10,<1.11 | ||
django111: Django>=1.11,<2.0 | ||
-rtest_requirements.txt | ||
|
||
commands = | ||
coverage run ./manage.py test --settings=settings | ||
coverage report | ||
|
||
[testenv:quality] | ||
commands = | ||
pep8 --config=.pep8 search | ||
pylint --rcfile=pylintrc search |