File: django-4-compat.patch

package info (click to toggle)
python-django-pyscss 2.0.3-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 372 kB
  • sloc: python: 474; makefile: 20
file content (24 lines) | stat: -rw-r--r-- 827 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
Description: Django 4.x compat
 The django.conf.urls API has been removed from Djang 4.0.
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2022-06-27

Index: python-django-pyscss/testproject/testproject/urls.py
===================================================================
--- python-django-pyscss.orig/testproject/testproject/urls.py
+++ python-django-pyscss/testproject/testproject/urls.py
@@ -1,4 +1,5 @@
-from django.conf.urls import include, url
+from django.conf.urls import include
+from django.urls import re_path
 
 from django.contrib import admin
 admin.autodiscover()
@@ -8,5 +9,5 @@ urlpatterns = [
     # url(r'^$', 'testproject.views.home', name='home'),
     # url(r'^blog/', include('blog.urls')),
 
-    url(r'^admin/', admin.site.urls),
+    re_path(r'^admin/', admin.site.urls),
 ]