diff --git a/Makefile b/Makefile index 305d3bec..7f25319e 100644 --- a/Makefile +++ b/Makefile @@ -3,11 +3,11 @@ VE ?= ./ve REQUIREMENTS ?= test_reqs.txt SYS_PYTHON ?= python3 PY_SENTINAL ?= $(VE)/sentinal -WHEEL_VERSION ?= 0.33.6 -PIP_VERSION ?= 20.0.2 +WHEEL_VERSION ?= 0.42.0 +PIP_VERSION ?= 24.0 MAX_COMPLEXITY ?= 8 PY_DIRS ?= $(APP) -DJANGO ?= "Django==3.2.13" +DJANGO ?= "Django==4.2.11" FLAKE8 ?= $(VE)/bin/flake8 PIP ?= $(VE)/bin/pip diff --git a/pagetree/templates/pagetree/testblock.html b/pagetree/templates/pagetree/testblock.html index 08939535..80f7a2e2 100644 --- a/pagetree/templates/pagetree/testblock.html +++ b/pagetree/templates/pagetree/testblock.html @@ -1,2 +1 @@ -{% load markup %} -{{pageblock.body|markdown}} +{{pageblock.body}} diff --git a/pagetree/tests/urls.py b/pagetree/tests/urls.py index ba42ad87..bf89c9f3 100644 --- a/pagetree/tests/urls.py +++ b/pagetree/tests/urls.py @@ -1,37 +1,37 @@ from __future__ import unicode_literals -from django.conf.urls import include, url +from django.urls import include, re_path from pagetree.generic.views import EditView, InstructorView, PageView urlpatterns = [ - url(r'^pagetree/', include('pagetree.urls')), + re_path(r'^pagetree/', include('pagetree.urls')), # instantiate generic views using a template that doesn't # extend/depend on base.html - url(r'^pages/edit/(?P.*)$', - EditView.as_view(template_name="pagetree/test_page.html"), - {}, 'edit-page'), - url(r'^pages/instructor/(?P.*)$', - InstructorView.as_view(template_name="pagetree/test_page.html")), - url(r'^pages/(?P.*)$', - PageView.as_view(template_name="pagetree/test_page.html")), + re_path(r'^pages/edit/(?P.*)$', + EditView.as_view(template_name="pagetree/test_page.html"), + {}, 'edit-page'), + re_path(r'^pages/instructor/(?P.*)$', + InstructorView.as_view(template_name="pagetree/test_page.html")), + re_path(r'^pages/(?P.*)$', + PageView.as_view(template_name="pagetree/test_page.html")), # a second set to make sure non-default hierarchies # get handled as well - url(r'^pages2/edit/(?P.*)$', - EditView.as_view( - hierarchy_name="two", - hierarchy_base="/pages2", - template_name="pagetree/test_page.html"), - {}, 'edit-page'), - url(r'^pages2/instructor/(?P.*)$', - InstructorView.as_view( - hierarchy_name="two", - hierarchy_base="/pages2", - template_name="pagetree/test_page.html")), - url(r'^pages2/(?P.*)$', - PageView.as_view( - hierarchy_name="two", - hierarchy_base="/pages2", - template_name="pagetree/test_page.html")), + re_path(r'^pages2/edit/(?P.*)$', + EditView.as_view( + hierarchy_name="two", + hierarchy_base="/pages2", + template_name="pagetree/test_page.html"), + {}, 'edit-page'), + re_path(r'^pages2/instructor/(?P.*)$', + InstructorView.as_view( + hierarchy_name="two", + hierarchy_base="/pages2", + template_name="pagetree/test_page.html")), + re_path(r'^pages2/(?P.*)$', + PageView.as_view( + hierarchy_name="two", + hierarchy_base="/pages2", + template_name="pagetree/test_page.html")), ] diff --git a/pagetree/urls.py b/pagetree/urls.py index e9881cb3..dc884699 100644 --- a/pagetree/urls.py +++ b/pagetree/urls.py @@ -2,7 +2,7 @@ import os.path -from django.conf.urls import url +from django.urls import re_path import django.views.static from pagetree.generic.views import CloneHierarchyView @@ -17,37 +17,37 @@ media_root = os.path.join(os.path.dirname(__file__), "media") urlpatterns = [ - url(r'^media/(?P.*)$', django.views.static.serve, - {'document_root': media_root}), + re_path(r'^media/(?P.*)$', django.views.static.serve, + {'document_root': media_root}), ] urlpatterns += [ - url(r'^reorder_pageblocks/(?P\d+)/$', reorder_pageblocks, {}, - "reorder-pageblocks"), - url(r'^reorder_section_children/(?P\d+)/$', - reorder_section_children, {}, "reorder-section-children"), - url(r'^section/add/(?P\d+)/$', add_child_section, {}, - "add-child-section"), - url(r'^section/move/(?P\d+)/$', move_section, {}, - "move-section"), - url(r'^pageblock/add/(?P\d+)/$', add_pageblock, {}, - "add-pageblock"), - url(r'^pageblock/edit/(?P\d+)/$', edit_pageblock, {}, - "edit-pageblock"), - url(r'^pageblock/jsonexport/(?P\d+)/$', - export_pageblock_json, {}, "export-pageblock-json"), - url(r'^pageblock/jsonimport/(?P\d+)/$', - import_pageblock_json, {}, "import-pageblock-json"), - url(r'^delete_section/(?P\d+)/$', delete_section, {}, - "delete-section"), - url(r'^edit_section/(?P\d+)/$', edit_section, {}, - "edit-section"), - url(r'^delete_pageblock/(?P\d+)/$', delete_pageblock, {}, - "delete-pageblock"), - url(r'^create_tree_root$', create_tree_root, {}, "create_tree_root"), - url(r'^export/$', exporter, {}, 'export-hierarchy'), - url(r'^version/(?P\d+)/revert/$', revert_to_version, {}, - "revert-to-version"), - url(r'^clone_hierarchy/(?P\d+)/$', - CloneHierarchyView.as_view(), name="clone-hierarchy"), + re_path(r'^reorder_pageblocks/(?P\d+)/$', reorder_pageblocks, + {}, "reorder-pageblocks"), + re_path(r'^reorder_section_children/(?P\d+)/$', + reorder_section_children, {}, "reorder-section-children"), + re_path(r'^section/add/(?P\d+)/$', add_child_section, {}, + "add-child-section"), + re_path(r'^section/move/(?P\d+)/$', move_section, {}, + "move-section"), + re_path(r'^pageblock/add/(?P\d+)/$', add_pageblock, {}, + "add-pageblock"), + re_path(r'^pageblock/edit/(?P\d+)/$', edit_pageblock, {}, + "edit-pageblock"), + re_path(r'^pageblock/jsonexport/(?P\d+)/$', + export_pageblock_json, {}, "export-pageblock-json"), + re_path(r'^pageblock/jsonimport/(?P\d+)/$', + import_pageblock_json, {}, "import-pageblock-json"), + re_path(r'^delete_section/(?P\d+)/$', delete_section, {}, + "delete-section"), + re_path(r'^edit_section/(?P\d+)/$', edit_section, {}, + "edit-section"), + re_path(r'^delete_pageblock/(?P\d+)/$', delete_pageblock, {}, + "delete-pageblock"), + re_path(r'^create_tree_root$', create_tree_root, {}, "create_tree_root"), + re_path(r'^export/$', exporter, {}, 'export-hierarchy'), + re_path(r'^version/(?P\d+)/revert/$', revert_to_version, {}, + "revert-to-version"), + re_path(r'^clone_hierarchy/(?P\d+)/$', + CloneHierarchyView.as_view(), name="clone-hierarchy"), ] diff --git a/requirements.txt b/requirements.txt index fa3a7cb6..73c5e22d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ # Used by readthedocs.org to build the documentation -Django>=3.2.14,<4 +Django>=4.2.11,<5 diff --git a/runtests.py b/runtests.py index d2d5dd5b..5847945e 100644 --- a/runtests.py +++ b/runtests.py @@ -47,7 +47,6 @@ def main(): 'django.contrib.contenttypes', 'django.contrib.sessions', 'pagetree', - 'django_markwhat', 'django_jenkins', ), TEST_RUNNER='django.test.runner.DiscoverRunner', diff --git a/setup.py b/setup.py index f0808a6f..795ef071 100644 --- a/setup.py +++ b/setup.py @@ -36,9 +36,7 @@ install_requires=[ "Django", "django-treebeard", - "Markdown", "coverage", - "django-markwhat", "django-bootstrap3", "six", ], diff --git a/test_reqs.txt b/test_reqs.txt index 71902297..cfed276c 100644 --- a/test_reqs.txt +++ b/test_reqs.txt @@ -1,14 +1,12 @@ django-treebeard==4.7.1 -Markdown>=2.6.11,<3 coverage==7.4.3 -importlib-metadata<7.1 # for flake8 +importlib-metadata==7.0.2 # for flake8 typing_extensions==4.10.0 zipp==3.17.0 # for flake8 flake8==7.0.0 django-jenkins==0.110.0 pep8==1.7.1 pyflakes==3.2.0 -django-markwhat==1.6.2 Faker==24.0.0 factory_boy==3.3.0 six==1.16.0