0002-use-django3.2-compatible-re_path-urls-util-64309.patch
mellon/urls.py | ||
---|---|---|
1 | 1 |
import django |
2 |
from django.conf.urls import url
|
|
2 |
from django.urls import re_path
|
|
3 | 3 | |
4 | 4 |
from . import views |
5 | 5 | |
6 | 6 |
urlpatterns = [ |
7 |
url('login/$', views.login, name='mellon_login'),
|
|
8 |
url('login/debug/$', views.debug_login, name='mellon_debug_login'),
|
|
9 |
url('logout/$', views.logout, name='mellon_logout'),
|
|
10 |
url('metadata/$', views.metadata, name='mellon_metadata'),
|
|
7 |
re_path('login/$', views.login, name='mellon_login'),
|
|
8 |
re_path('login/debug/$', views.debug_login, name='mellon_debug_login'),
|
|
9 |
re_path('logout/$', views.logout, name='mellon_logout'),
|
|
10 |
re_path('metadata/$', views.metadata, name='mellon_metadata'),
|
|
11 | 11 |
] |
tests/urls_tests.py | ||
---|---|---|
13 | 13 |
# You should have received a copy of the GNU Affero General Public License |
14 | 14 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 | |
16 |
from django.conf.urls import include, url |
|
17 | 16 |
from django.http import HttpResponse |
17 |
from django.urls import include, re_path |
|
18 | 18 | |
19 | 19 | |
20 | 20 |
def homepage(request): |
... | ... | |
22 | 22 | |
23 | 23 | |
24 | 24 |
urlpatterns = [ |
25 |
url('^', include('mellon.urls')),
|
|
26 |
url('^$', homepage, name='homepage'),
|
|
25 |
re_path('^', include('mellon.urls')),
|
|
26 |
re_path('^$', homepage, name='homepage'),
|
|
27 | 27 |
] |
tests/urls_tests_template_base.py | ||
---|---|---|
13 | 13 |
# You should have received a copy of the GNU Affero General Public License |
14 | 14 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 | |
16 |
from django.conf.urls import include, url |
|
17 | 16 |
from django.http import HttpResponse |
17 |
from django.urls import include, re_path |
|
18 | 18 | |
19 | 19 | |
20 | 20 |
def homepage(request): |
... | ... | |
22 | 22 | |
23 | 23 | |
24 | 24 |
urlpatterns = [ |
25 |
url('^', include('mellon.urls'), kwargs={'template_base': 'theme.html'}),
|
|
26 |
url('^$', homepage, name='homepage'),
|
|
25 |
re_path('^', include('mellon.urls'), kwargs={'template_base': 'theme.html'}),
|
|
26 |
re_path('^$', homepage, name='homepage'),
|
|
27 | 27 |
] |
tests/urls_tests_template_hook.py | ||
---|---|---|
13 | 13 |
# You should have received a copy of the GNU Affero General Public License |
14 | 14 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 | |
16 |
from django.conf.urls import include, url |
|
17 | 16 |
from django.http import HttpResponse |
17 |
from django.urls import include, re_path |
|
18 | 18 | |
19 | 19 | |
20 | 20 |
def homepage(request): |
... | ... | |
26 | 26 | |
27 | 27 | |
28 | 28 |
urlpatterns = [ |
29 |
url(
|
|
29 |
re_path(
|
|
30 | 30 |
'^', |
31 | 31 |
include('mellon.urls'), |
32 | 32 |
kwargs={ |
... | ... | |
34 | 34 |
'context_hook': context_hook, |
35 | 35 |
}, |
36 | 36 |
), |
37 |
url('^$', homepage, name='homepage'),
|
|
37 |
re_path('^$', homepage, name='homepage'),
|
|
38 | 38 |
] |
39 |
- |