From 59de1e0d9cdc4c93d1ce0a2479be67048a222cf6 Mon Sep 17 00:00:00 2001 From: irtazaakram Date: Mon, 3 Jul 2023 11:37:53 +0500 Subject: [PATCH] PR ready --- setup.cfg | 2 +- test_project/test_app/urls.py | 13 +++++++------ test_project/urls.py | 8 ++++---- tox.ini | 1 - 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/setup.cfg b/setup.cfg index 98f445e..ce353df 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [bumpversion] commit = True -current_version = 0.8.0 +current_version = 0.7.9 tag = True tag_name = {new_version} diff --git a/test_project/test_app/urls.py b/test_project/test_app/urls.py index de7fb01..acb6c79 100644 --- a/test_project/test_app/urls.py +++ b/test_project/test_app/urls.py @@ -1,15 +1,16 @@ # Django try: - from django.urls import path + from django.urls import re_path except ImportError: - from django.conf.urls import url as path + from django.conf.urls import url as re_path # Test App -from test_project.test_app.views import api_index, index +from test_project.test_app.views import index, api_index + app_name = 'test_app' urlpatterns = [ - path('', index, name='index'), - path('api/', api_index, name='api_index'), -] + re_path(r'^$', index, name='index'), + re_path(r'^api/$', api_index, name='api_index'), +] \ No newline at end of file diff --git a/test_project/urls.py b/test_project/urls.py index b856820..7ad01cb 100644 --- a/test_project/urls.py +++ b/test_project/urls.py @@ -2,21 +2,21 @@ from django.conf import settings try: - from django.urls import include, path + from django.urls import include, re_path except ImportError: - from django.conf.urls import url as path + from django.conf.urls import include, url as re_path include_kwargs = dict(namespace='test_app') urlpatterns = [ - path('test_app/', include('test_project.test_app.urls', **include_kwargs)), + re_path(r'^test_app/', include('test_project.test_app.urls', **include_kwargs)), ] if 'django.contrib.admin' in settings.INSTALLED_APPS: from django.contrib import admin admin.autodiscover() urlpatterns += [ - path('', admin.site.urls), + re_path(r'', admin.site.urls), ] if 'django.contrib.staticfiles' in settings.INSTALLED_APPS and settings.DEBUG: diff --git a/tox.ini b/tox.ini index 8ec5551..08c7c60 100644 --- a/tox.ini +++ b/tox.ini @@ -34,7 +34,6 @@ deps = pytest pytest-cov pytest-django - ; pytest-flake8 pytest-runner Cmake setuptools