File: django-4.x-django.conf.urls.url-is-removed.patch

package info (click to toggle)
python-enmerkar 0.7.1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 280 kB
  • sloc: python: 645; makefile: 167; sh: 9
file content (25 lines) | stat: -rw-r--r-- 700 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description: Django 4.x: django.conf.urls.url is removed
 Note: upstream already has a patch for it, though mixed with other
 stuff, so not using it directly.
Bug-Debian: https://bugs.debian.org/1013603
Author: Thomas Goirand <zigo@debian.org>
Forwarded: not-needed
Last-Update: 2022-06-30

--- python-enmerkar-0.7.1.orig/tests/testproject/urls.py
+++ python-enmerkar-0.7.1/tests/testproject/urls.py
@@ -1,6 +1,6 @@
 import time
 
-from django.conf.urls import url
+from django.urls import re_path
 from django.shortcuts import render
 from django.utils.timezone import now
 
@@ -14,5 +14,5 @@ def test_view(request):
 
 
 urlpatterns = [
-    url('^$', test_view),
+    re_path('^$', test_view),
 ]