diff --git a/.travis.yml b/.travis.yml index c3441fb..7d1991c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,25 +3,22 @@ language: python python: - - 3.5 - - 3.6 - 3.8 env: - - TOXENV=django111 - - TOXENV=django20 - - TOXENV=django30 + - TOXENV=django32 + - TOXENV=django42 matrix: include: - - python: 3.6 + - python: 3.8 env: TOXENV=quality - - python: 3.6 + - python: 3.8 env: TOXENV=docs cache: - pip - + before_install: - pip install --upgrade pip diff --git a/Makefile b/Makefile index afa8cb7..74104bc 100644 --- a/Makefile +++ b/Makefile @@ -69,7 +69,7 @@ quality: ## check coding style with pycodestyle and pylint # pip-sync requirements/dev.txt requirements/private.* # test target: -# Meant to be run in Studio's vitrualenv +# Meant to be run in CMS's vitrualenv # We don't use tox because we need to test with the real installation of # Open edX and whatever dependencies it uses. # We use no-cov and nomigrations because they _really_ speed up the test run. diff --git a/README.md b/README.md index 0e8bc7f..d8cd6a4 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ LabXchange "Pathway" Plugin for Open edX This is a django app plugin that implements "Pathways" as an Open edX learning context. It exposes pathway functionality via a REST API and integrates with the -XBlock runtime and XBlock REST APIs. Django 2.2 and 3.2 are supported. +XBlock runtime and XBlock REST APIs. Django 3.2 and 4.2 are supported. A "Pathway" is a short collection of XBlocks that a student works through in a linear sequence. @@ -17,7 +17,7 @@ Unit/Vertical can't exist outside of a learning context.) ## Installation on Devstack ``` -make studio-shell +make cms-shell cd /edx/src git clone https://github.com/open-craft/lx-pathway-plugin.git pip install -e /edx/src/lx-pathway-plugin diff --git a/lx_pathway_plugin/urls.py b/lx_pathway_plugin/urls.py index d89a3d8..016875d 100644 --- a/lx_pathway_plugin/urls.py +++ b/lx_pathway_plugin/urls.py @@ -1,16 +1,16 @@ """ Studio URL configuration for lx-pathway-plugin. """ -from django.conf.urls import include, url +from django.urls import include, re_path from . import views urlpatterns = [ - url(r'^api/lx-pathways/v1/', include([ - url(r'pathway/$', views.create_pathway), + re_path(r'^api/lx-pathways/v1/', include([ + re_path(r'pathway/$', views.create_pathway), # Get/edit/delete a specific pathway: - url(r'pathway/(?P[^/]+)/$', views.PathwayView.as_view()), + re_path(r'pathway/(?P[^/]+)/$', views.PathwayView.as_view()), # Publish or revert changes to a pathway: - url(r'pathway/(?P[^/]+)/publish/$', views.PathwayPublishView.as_view()), + re_path(r'pathway/(?P[^/]+)/publish/$', views.PathwayPublishView.as_view()), ])), ] diff --git a/lx_pathway_plugin/urls_lms.py b/lx_pathway_plugin/urls_lms.py index 42e6dc0..35f260b 100644 --- a/lx_pathway_plugin/urls_lms.py +++ b/lx_pathway_plugin/urls_lms.py @@ -1,13 +1,13 @@ """ LMS URL configuration for lx-pathway-plugin. """ -from django.conf.urls import include, url +from django.urls import include, re_path from . import views urlpatterns = [ - url(r'^api/lx-pathways/v1/', include([ + re_path(r'^api/lx-pathways/v1/', include([ # Get a specific pathway: - url(r'pathway/(?P[^/]+)/$', views.PathwayView.as_view()), + re_path(r'pathway/(?P[^/]+)/$', views.PathwayView.as_view()), ])), ] diff --git a/setup.py b/setup.py index 8de9f55..add3fee 100755 --- a/setup.py +++ b/setup.py @@ -86,16 +86,12 @@ def is_requirement(line): classifiers=[ 'Development Status :: 3 - Alpha', 'Framework :: Django', - 'Framework :: Django :: 1.11', - 'Framework :: Django :: 2.0', - 'Framework :: Django :: 3.0', + 'Framework :: Django :: 3.2', + 'Framework :: Django :: 4.2', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', 'Natural Language :: English', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.8', ], entry_points={