Skip to content

Commit 3cb4be1

Browse files
AbhishekSrikanthjelly
authored andcommitted
Replaced url() with re_path()
1 parent 4433623 commit 3cb4be1

10 files changed

Lines changed: 135 additions & 139 deletions

File tree

devel/urls.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
from django.conf.urls import url
1+
from django.urls import re_path
22

33
from devel import views
44

55

66
urlpatterns = [
7-
url(r'^admin_log/$', views.admin_log),
8-
url(r'^admin_log/(?P<username>.*)/$', views.admin_log),
9-
url(r'^clock/$', views.clock, name='devel-clocks'),
10-
url(r'^tier0mirror/$', views.tier0_mirror, name='tier0-mirror'),
11-
url(r'^mirrorauth/$', views.tier0_mirror_auth, name='tier0-mirror-atuh'),
12-
url(r'^$', views.index, name='devel-index'),
13-
url(r'^stats/$', views.stats, name='devel-stats'),
14-
url(r'^newuser/$', views.new_user_form),
15-
url(r'^profile/$', views.change_profile),
16-
url(r'^reports/(?P<report_name>.*)/(?P<username>.*)/$', views.report),
17-
url(r'^reports/(?P<report_name>.*)/$', views.report),
7+
re_path(r'^admin_log/$', views.admin_log),
8+
re_path(r'^admin_log/(?P<username>.*)/$', views.admin_log),
9+
re_path(r'^clock/$', views.clock, name='devel-clocks'),
10+
re_path(r'^tier0mirror/$', views.tier0_mirror, name='tier0-mirror'),
11+
re_path(r'^mirrorauth/$', views.tier0_mirror_auth, name='tier0-mirror-atuh'),
12+
re_path(r'^$', views.index, name='devel-index'),
13+
re_path(r'^stats/$', views.stats, name='devel-stats'),
14+
re_path(r'^newuser/$', views.new_user_form),
15+
re_path(r'^profile/$', views.change_profile),
16+
re_path(r'^reports/(?P<report_name>.*)/(?P<username>.*)/$', views.report),
17+
re_path(r'^reports/(?P<report_name>.*)/$', views.report),
1818
]
1919

2020
# vim: set ts=4 sw=4 et:

mirrors/urls.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
from django.conf.urls import url
1+
from django.urls import re_path
22
from django.views.decorators.cache import cache_page
33

44
from .views import mirrors, status, mirror_details, url_details
55
from .views.api import status_json, mirror_details_json, locations_json
66

77
urlpatterns = [
8-
url(r'^$', mirrors, name='mirror-list'),
9-
url(r'^tier/(?P<tier>\d+)/$', mirrors, name='mirror-list-tier'),
10-
url(r'^status/$', status, name='mirror-status'),
11-
url(r'^status/json/$', status_json, name='mirror-status-json'),
12-
url(r'^status/tier/(?P<tier>\d+)/$', status, name='mirror-status-tier'),
13-
url(r'^status/tier/(?P<tier>\d+)/json/$', status_json, name='mirror-status-tier-json'),
14-
url(r'^locations/json/$', cache_page(317)(locations_json), name='mirror-locations-json'),
15-
url(r'^(?P<name>[\.\-\w]+)/$', mirror_details),
16-
url(r'^(?P<name>[\.\-\w]+)/json/$', mirror_details_json),
17-
url(r'^(?P<name>[\.\-\w]+)/(?P<url_id>\d+)/$', url_details),
8+
re_path(r'^$', mirrors, name='mirror-list'),
9+
re_path(r'^tier/(?P<tier>\d+)/$', mirrors, name='mirror-list-tier'),
10+
re_path(r'^status/$', status, name='mirror-status'),
11+
re_path(r'^status/json/$', status_json, name='mirror-status-json'),
12+
re_path(r'^status/tier/(?P<tier>\d+)/$', status, name='mirror-status-tier'),
13+
re_path(r'^status/tier/(?P<tier>\d+)/json/$', status_json, name='mirror-status-tier-json'),
14+
re_path(r'^locations/json/$', cache_page(317)(locations_json), name='mirror-locations-json'),
15+
re_path(r'^(?P<name>[\.\-\w]+)/$', mirror_details),
16+
re_path(r'^(?P<name>[\.\-\w]+)/json/$', mirror_details_json),
17+
re_path(r'^(?P<name>[\.\-\w]+)/(?P<url_id>\d+)/$', url_details),
1818
]
1919

2020
# vim: set ts=4 sw=4 et:

mirrors/urls_mirrorlist.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
from django.conf.urls import url
2-
1+
from django.urls import re_path
32
from mirrors.views import mirrorlist as views
43

54
urlpatterns = [
6-
url(r'^$', views.generate_mirrorlist, name='mirrorlist'),
7-
url(r'^all/$', views.find_mirrors, {'countries': ['all']}),
8-
url(r'^all/(?P<protocol>[A-z]+)/$', views.find_mirrors_simple, name='mirrorlist_simple')
5+
re_path(r'^$', views.generate_mirrorlist, name='mirrorlist'),
6+
re_path(r'^all/$', views.find_mirrors, {'countries': ['all']}),
7+
re_path(r'^all/(?P<protocol>[A-z]+)/$', views.find_mirrors_simple, name='mirrorlist_simple')
98
]
109

1110
# vim: set ts=4 sw=4 et:

news/urls.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
from django.conf.urls import url
1+
from django.urls import re_path
22
from django.contrib.auth.decorators import permission_required
33
from .views import (NewsDetailView, NewsListView, NewsCreateView, NewsEditView,
44
NewsDeleteView, preview, view_redirect)
55

66

77
urlpatterns = [
8-
url(r'^$', NewsListView.as_view(), name='news-list'),
8+
re_path(r'^$', NewsListView.as_view(), name='news-list'),
99

10-
url(r'^preview/$', preview),
10+
re_path(r'^preview/$', preview),
1111
# old news URLs, permanent redirect view so we don't break all links
12-
url(r'^(?P<object_id>\d+)/$', view_redirect),
12+
re_path(r'^(?P<object_id>\d+)/$', view_redirect),
1313

14-
url(r'^add/$',
14+
re_path(r'^add/$',
1515
permission_required('news.add_news')(NewsCreateView.as_view())),
16-
url(r'^(?P<slug>[-\w]+)/$',
16+
re_path(r'^(?P<slug>[-\w]+)/$',
1717
NewsDetailView.as_view()),
18-
url(r'^(?P<slug>[-\w]+)/edit/$',
18+
re_path(r'^(?P<slug>[-\w]+)/edit/$',
1919
permission_required('news.change_news')(NewsEditView.as_view())),
20-
url(r'^(?P<slug>[-\w]+)/delete/$',
20+
re_path(r'^(?P<slug>[-\w]+)/delete/$',
2121
permission_required('news.delete_news')(NewsDeleteView.as_view())),
2222
]
2323

packages/urls.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
1-
from django.conf.urls import include, url
2-
1+
from django.conf.urls import include
2+
from django.urls import re_path
33
from packages import views
44
from packages.views import display, flag, signoff, search
55

66

77
package_patterns = [
8-
url(r'^$', display.details),
9-
url(r'^json/$', display.details_json),
10-
url(r'^files/$', display.files),
11-
url(r'^files/json/$', display.files_json),
12-
url(r'^flag/$', flag.flag),
13-
url(r'^flag/done/$', flag.flag_confirmed, name='package-flag-confirmed'),
14-
url(r'^unflag/$', flag.unflag),
15-
url(r'^unflag/all/$', flag.unflag_all),
16-
url(r'^signoff/$', signoff.signoff_package),
17-
url(r'^signoff/revoke/$', signoff.signoff_package, {'revoke': True}),
18-
url(r'^signoff/options/$', signoff.signoff_options),
19-
url(r'^download/$', display.download),
20-
url(r'^download.sig/$', display.download, {'sig': True}),
21-
url(r'^sonames/$', display.sonames),
22-
url(r'^sonames/json/$', display.sonames_json),
8+
re_path(r'^$', display.details),
9+
re_path(r'^json/$', display.details_json),
10+
re_path(r'^files/$', display.files),
11+
re_path(r'^files/json/$', display.files_json),
12+
re_path(r'^flag/$', flag.flag),
13+
re_path(r'^flag/done/$', flag.flag_confirmed, name='package-flag-confirmed'),
14+
re_path(r'^unflag/$', flag.unflag),
15+
re_path(r'^unflag/all/$', flag.unflag_all),
16+
re_path(r'^signoff/$', signoff.signoff_package),
17+
re_path(r'^signoff/revoke/$', signoff.signoff_package, {'revoke': True}),
18+
re_path(r'^signoff/options/$', signoff.signoff_options),
19+
re_path(r'^download/$', display.download),
20+
re_path(r'^download.sig/$', display.download, {'sig': True}),
21+
re_path(r'^sonames/$', display.sonames),
22+
re_path(r'^sonames/json/$', display.sonames_json),
2323
]
2424

2525
urlpatterns = [
26-
url(r'^flaghelp/$', flag.flaghelp),
27-
url(r'^signoffs/$', signoff.signoffs, name='package-signoffs'),
28-
url(r'^signoffs/json/$', signoff.signoffs_json, name='package-signoffs-json'),
29-
url(r'^update/$', views.update),
30-
url(r'^sonames$', views.sonames),
26+
re_path(r'^flaghelp/$', flag.flaghelp),
27+
re_path(r'^signoffs/$', signoff.signoffs, name='package-signoffs'),
28+
re_path(r'^signoffs/json/$', signoff.signoffs_json, name='package-signoffs-json'),
29+
re_path(r'^update/$', views.update),
30+
re_path(r'^sonames$', views.sonames),
3131

32-
url(r'^$', search.SearchListView.as_view(), name='packages-search'),
33-
url(r'^search/json/$', search.search_json),
32+
re_path(r'^$', search.SearchListView.as_view(), name='packages-search'),
33+
re_path(r'^search/json/$', search.search_json),
3434

35-
url(r'^differences/$', views.arch_differences, name='packages-differences'),
36-
url(r'^stale_relations/$', views.stale_relations),
37-
url(r'^stale_relations/update/$', views.stale_relations_update),
35+
re_path(r'^differences/$', views.arch_differences, name='packages-differences'),
36+
re_path(r'^stale_relations/$', views.stale_relations),
37+
re_path(r'^stale_relations/update/$', views.stale_relations_update),
3838

39-
url(r'^(?P<name>[^ /]+)/$', display.details),
40-
url(r'^(?P<repo>[A-z0-9\-]+)/(?P<name>[^ /]+)/$', display.details),
39+
re_path(r'^(?P<name>[^ /]+)/$', display.details),
40+
re_path(r'^(?P<repo>[A-z0-9\-]+)/(?P<name>[^ /]+)/$', display.details),
4141
# canonical package url. subviews defined above
42-
url(r'^(?P<repo>[A-z0-9\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[^ /]+)/', include(package_patterns)),
42+
re_path(r'^(?P<repo>[A-z0-9\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[^ /]+)/', include(package_patterns)),
4343
]
4444

4545
# vim: set ts=4 sw=4 et:

packages/urls_groups.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
from django.conf.urls import url
2-
1+
from django.urls import re_path
32
from packages.views.display import groups, group_details
43

54
urlpatterns = [
6-
url(r'^$', groups, name='groups-list'),
7-
url(r'^(?P<arch>[A-z0-9]+)/$', groups),
8-
url(r'^(?P<arch>[A-z0-9]+)/(?P<name>[^ /]+)/$', group_details),
5+
re_path(r'^$', groups, name='groups-list'),
6+
re_path(r'^(?P<arch>[A-z0-9]+)/$', groups),
7+
re_path(r'^(?P<arch>[A-z0-9]+)/(?P<name>[^ /]+)/$', group_details),
98
]
109

1110
# vim: set ts=4 sw=4 et:

releng/urls.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
from django.conf.urls import include, url
2-
1+
from django.conf.urls import include
2+
from django.urls import re_path
33
from .views import ReleaseListView, ReleaseDetailView
44
from releng import views
55

66
releases_patterns = [
7-
url(r'^$', ReleaseListView.as_view(), name='releng-release-list'),
8-
url(r'^json/$', views.releases_json, name='releng-release-list-json'),
9-
url(r'^(?P<version>[-.\w]+)/$', ReleaseDetailView.as_view(), name='releng-release-detail'),
10-
url(r'^(?P<version>[-.\w]+)/torrent/$', views.release_torrent, name='releng-release-torrent'),
7+
re_path(r'^$', ReleaseListView.as_view(), name='releng-release-list'),
8+
re_path(r'^json/$', views.releases_json, name='releng-release-list-json'),
9+
re_path(r'^(?P<version>[-.\w]+)/$', ReleaseDetailView.as_view(), name='releng-release-detail'),
10+
re_path(r'^(?P<version>[-.\w]+)/torrent/$', views.release_torrent, name='releng-release-torrent'),
1111
]
1212

1313
netboot_patterns = [
14-
url(r'^archlinux\.ipxe$', views.netboot_config, name='releng-netboot-config'),
15-
url(r'^$', views.netboot_info, name='releng-netboot-info')
14+
re_path(r'^archlinux\.ipxe$', views.netboot_config, name='releng-netboot-config'),
15+
re_path(r'^$', views.netboot_info, name='releng-netboot-info')
1616
]
1717

1818
urlpatterns = [
19-
url(r'^releases/', include(releases_patterns)),
20-
url(r'^netboot/', include(netboot_patterns)),
19+
re_path(r'^releases/', include(releases_patterns)),
20+
re_path(r'^netboot/', include(netboot_patterns)),
2121
]
2222

2323
# vim: set ts=4 sw=4 et:

todolists/urls.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
from django.conf.urls import url
1+
from django.urls import re_path
22
from django.contrib.auth.decorators import permission_required
33

44
from .views import (view, view_json, add, edit, flag,
55
list_pkgbases, DeleteTodolist, TodolistListView)
66

77
urlpatterns = [
8-
url(r'^$', TodolistListView.as_view(), name='todolist-list'),
8+
re_path(r'^$', TodolistListView.as_view(), name='todolist-list'),
99

10-
url(r'^add/$',
10+
re_path(r'^add/$',
1111
permission_required('todolists.add_todolist')(add)),
12-
url(r'^(?P<slug>[-\w]+)/$', view),
13-
url(r'^(?P<slug>[-\w]+)/json$', view_json),
14-
url(r'^(?P<slug>[-\w]+)/edit/$',
12+
re_path(r'^(?P<slug>[-\w]+)/$', view),
13+
re_path(r'^(?P<slug>[-\w]+)/json$', view_json),
14+
re_path(r'^(?P<slug>[-\w]+)/edit/$',
1515
permission_required('todolists.change_todolist')(edit)),
16-
url(r'^(?P<slug>[-\w]+)/delete/$',
16+
re_path(r'^(?P<slug>[-\w]+)/delete/$',
1717
permission_required('todolists.delete_todolist')(DeleteTodolist.as_view())),
18-
url(r'^(?P<slug>[-\w]+)/flag/(?P<pkg_id>\d+)/$',
18+
re_path(r'^(?P<slug>[-\w]+)/flag/(?P<pkg_id>\d+)/$',
1919
permission_required('todolists.change_todolistpackage')(flag)),
20-
url(r'^(?P<slug>[-\w]+)/pkgbases/(?P<svn_root>[a-z]+)/$',
20+
re_path(r'^(?P<slug>[-\w]+)/pkgbases/(?P<svn_root>[a-z]+)/$',
2121
list_pkgbases),
2222
]
2323

urls.py

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from django.conf.urls import url
2-
from django.urls import include, path
1+
from django.urls import include, path, re_path
32
from django.contrib import admin
43
from django.contrib.sitemaps import views as sitemap_views
54
from django.contrib.auth import views as auth_views
@@ -41,74 +40,74 @@
4140

4241
# Public pages
4342
urlpatterns.extend([
44-
url(r'^$', public.views.index, name='index'),
45-
url(r'^about/$', TemplateView.as_view(template_name='public/about.html'), name='page-about'),
46-
url(r'^art/$', TemplateView.as_view(template_name='public/art.html'), name='page-art'),
47-
url(r'^svn/$', TemplateView.as_view(template_name='public/svn.html'), name='page-svn'),
48-
url(r'^donate/$', public.views.donate, name='page-donate'),
49-
url(r'^download/$', public.views.download, name='page-download'),
50-
url(r'^master-keys/$', public.views.keys, name='page-keys'),
51-
url(r'^master-keys/json/$', public.views.keys_json, name='pgp-keys-json'),
52-
url(r'^people/(?P<slug>[-\w]+)/$', public.views.people, name='people'),
53-
url(r'^planet/$', planet.views.index, name='planet'),
43+
re_path(r'^$', public.views.index, name='index'),
44+
re_path(r'^about/$', TemplateView.as_view(template_name='public/about.html'), name='page-about'),
45+
re_path(r'^art/$', TemplateView.as_view(template_name='public/art.html'), name='page-art'),
46+
re_path(r'^svn/$', TemplateView.as_view(template_name='public/svn.html'), name='page-svn'),
47+
re_path(r'^donate/$', public.views.donate, name='page-donate'),
48+
re_path(r'^download/$', public.views.download, name='page-download'),
49+
re_path(r'^master-keys/$', public.views.keys, name='page-keys'),
50+
re_path(r'^master-keys/json/$', public.views.keys_json, name='pgp-keys-json'),
51+
re_path(r'^people/(?P<slug>[-\w]+)/$', public.views.people, name='people'),
52+
re_path(r'^planet/$', planet.views.index, name='planet'),
5453
])
5554

5655
# Feeds patterns, used below
5756
feeds_patterns = [
58-
url(r'^$', public.views.feeds, name='feeds-list'),
59-
url(r'^news/$', cache_page(311)(NewsFeed())),
60-
url(r'^packages/$', cache_page(313)(PackageFeed())),
61-
url(r'^packages/(added|removed)/$', cache_page(313)(PackageUpdatesFeed())),
62-
url(r'^packages/(added|removed)/(?P<arch>[A-z0-9]+)/$', cache_page(313)(PackageUpdatesFeed())),
63-
url(r'^packages/(added|removed)/all/(?P<repo>[A-z0-9\-]+)/$', cache_page(313)(PackageUpdatesFeed())),
64-
url(r'^packages/(added|removed)/(?P<arch>[A-z0-9]+)/(?P<repo>[A-z0-9\-]+)/$',
57+
re_path(r'^$', public.views.feeds, name='feeds-list'),
58+
re_path(r'^news/$', cache_page(311)(NewsFeed())),
59+
re_path(r'^packages/$', cache_page(313)(PackageFeed())),
60+
re_path(r'^packages/(added|removed)/$', cache_page(313)(PackageUpdatesFeed())),
61+
re_path(r'^packages/(added|removed)/(?P<arch>[A-z0-9]+)/$', cache_page(313)(PackageUpdatesFeed())),
62+
re_path(r'^packages/(added|removed)/all/(?P<repo>[A-z0-9\-]+)/$', cache_page(313)(PackageUpdatesFeed())),
63+
re_path(r'^packages/(added|removed)/(?P<arch>[A-z0-9]+)/(?P<repo>[A-z0-9\-]+)/$',
6564
cache_page(313)(PackageUpdatesFeed())),
66-
url(r'^packages/(?P<arch>[A-z0-9]+)/$', cache_page(313)(PackageFeed())),
67-
url(r'^packages/all/(?P<repo>[A-z0-9\-]+)/$', cache_page(313)(PackageFeed())),
68-
url(r'^packages/(?P<arch>[A-z0-9]+)/(?P<repo>[A-z0-9\-]+)/$', cache_page(313)(PackageFeed())),
69-
url(r'^releases/$', cache_page(317)(ReleaseFeed())),
70-
url(r'^planet/$', cache_page(317)(PlanetFeed()), name='planet-feed'),
65+
re_path(r'^packages/(?P<arch>[A-z0-9]+)/$', cache_page(313)(PackageFeed())),
66+
re_path(r'^packages/all/(?P<repo>[A-z0-9\-]+)/$', cache_page(313)(PackageFeed())),
67+
re_path(r'^packages/(?P<arch>[A-z0-9]+)/(?P<repo>[A-z0-9\-]+)/$', cache_page(313)(PackageFeed())),
68+
re_path(r'^releases/$', cache_page(317)(ReleaseFeed())),
69+
re_path(r'^planet/$', cache_page(317)(PlanetFeed()), name='planet-feed'),
7170
]
7271

7372
# Old planet.archlinux.org redirects, to be removed once people have migrated.
7473
urlpatterns.extend([
75-
url(r'^planet/rss20.xml$', cache_page(317)(PlanetFeed())),
76-
url(r'^planet/atom.xml$', cache_page(317)(PlanetFeed())),
74+
re_path(r'^planet/rss20.xml$', cache_page(317)(PlanetFeed())),
75+
re_path(r'^planet/atom.xml$', cache_page(317)(PlanetFeed())),
7776
])
7877

7978
# Includes and other remaining stuff
8079
urlpatterns.extend([
81-
url(r'^admin/', admin.site.urls),
82-
url(r'^devel/', include(devel.urls)),
83-
url(r'^feeds/', include(feeds_patterns)),
84-
url(r'^groups/', include(packages.urls_groups)),
85-
url(r'^mirrorlist/', include(mirrors.urls_mirrorlist)),
86-
url(r'^mirrors/', include(mirrors.urls)),
87-
url(r'^news/', include(news.urls)),
88-
url(r'^packages/', include(packages.urls)),
89-
url(r'^releng/', include(releng.urls)),
90-
url(r'^todo/', include(todolists.urls)),
91-
url(r'^visualize/', include(visualize.urls)),
92-
url(r'^opensearch/packages/$', packages.views.opensearch, name='opensearch-packages'),
93-
url(r'^opensearch/packages/suggest$', packages.views.opensearch_suggest, name='opensearch-packages-suggest'),
80+
re_path(r'^admin/', admin.site.urls),
81+
re_path(r'^devel/', include(devel.urls)),
82+
re_path(r'^feeds/', include(feeds_patterns)),
83+
re_path(r'^groups/', include(packages.urls_groups)),
84+
re_path(r'^mirrorlist/', include(mirrors.urls_mirrorlist)),
85+
re_path(r'^mirrors/', include(mirrors.urls)),
86+
re_path(r'^news/', include(news.urls)),
87+
re_path(r'^packages/', include(packages.urls)),
88+
re_path(r'^releng/', include(releng.urls)),
89+
re_path(r'^todo/', include(todolists.urls)),
90+
re_path(r'^visualize/', include(visualize.urls)),
91+
re_path(r'^opensearch/packages/$', packages.views.opensearch, name='opensearch-packages'),
92+
re_path(r'^opensearch/packages/suggest$', packages.views.opensearch_suggest, name='opensearch-packages-suggest'),
9493
])
9594

9695
# Sitemaps
9796
urlpatterns.extend([
98-
url(r'^sitemap.xml$', cache_page(1831)(sitemap_views.index),
97+
re_path(r'^sitemap.xml$', cache_page(1831)(sitemap_views.index),
9998
{'sitemaps': our_sitemaps, 'sitemap_url_name': 'sitemaps'}),
100-
url(r'^sitemap-(?P<section>.+)\.xml$', cache_page(1831)(sitemap_views.sitemap),
99+
re_path(r'^sitemap-(?P<section>.+)\.xml$', cache_page(1831)(sitemap_views.sitemap),
101100
{'sitemaps': our_sitemaps, 'template_name': 'sitemaps/sitemap.xml'},
102101
name='sitemaps'),
103-
url(r'^news-sitemap\.xml$', cache_page(1831)(sitemap_views.sitemap),
102+
re_path(r'^news-sitemap\.xml$', cache_page(1831)(sitemap_views.sitemap),
104103
{'sitemaps': news_sitemaps, 'template_name': 'sitemaps/news_sitemap.xml'},
105104
name='news-sitemap'),
106105
])
107106

108107
# Authentication
109108
urlpatterns.extend([
110-
url(r'^login/$', auth_views.LoginView.as_view(template_name='registration/login.html'), name='login'),
111-
url(r'^logout/$', auth_views.LogoutView.as_view(template_name='registration/logout.html'), name='logout'),
109+
re_path(r'^login/$', auth_views.LoginView.as_view(template_name='registration/login.html'), name='login'),
110+
re_path(r'^logout/$', auth_views.LogoutView.as_view(template_name='registration/logout.html'), name='logout'),
112111
])
113112

114113
# django-toolbar

0 commit comments

Comments
 (0)