|
40 | 40 |
|
41 | 41 | # Public pages |
42 | 42 | urlpatterns.extend([ |
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'), |
| 43 | + path('', public.views.index, name='index'), |
| 44 | + path('about/', TemplateView.as_view(template_name='public/about.html'), name='page-about'), |
| 45 | + path('art/', TemplateView.as_view(template_name='public/art.html'), name='page-art'), |
| 46 | + path('svn/', TemplateView.as_view(template_name='public/svn.html'), name='page-svn'), |
| 47 | + path('donate/', public.views.donate, name='page-donate'), |
| 48 | + path('download/', public.views.download, name='page-download'), |
| 49 | + path('master-keys/', public.views.keys, name='page-keys'), |
| 50 | + path('master-keys/json/', public.views.keys_json, name='pgp-keys-json'), |
51 | 51 | re_path(r'^people/(?P<slug>[-\w]+)/$', public.views.people, name='people'), |
52 | | - re_path(r'^planet/$', planet.views.index, name='planet'), |
| 52 | + path('planet/', planet.views.index, name='planet'), |
53 | 53 | ]) |
54 | 54 |
|
55 | 55 | # Feeds patterns, used below |
56 | 56 | feeds_patterns = [ |
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())), |
| 57 | + path('', public.views.feeds, name='feeds-list'), |
| 58 | + path('news/', cache_page(311)(NewsFeed())), |
| 59 | + path('packages/', cache_page(313)(PackageFeed())), |
60 | 60 | re_path(r'^packages/(added|removed)/$', cache_page(313)(PackageUpdatesFeed())), |
61 | 61 | re_path(r'^packages/(added|removed)/(?P<arch>[A-z0-9]+)/$', cache_page(313)(PackageUpdatesFeed())), |
62 | 62 | re_path(r'^packages/(added|removed)/all/(?P<repo>[A-z0-9\-]+)/$', cache_page(313)(PackageUpdatesFeed())), |
|
65 | 65 | re_path(r'^packages/(?P<arch>[A-z0-9]+)/$', cache_page(313)(PackageFeed())), |
66 | 66 | re_path(r'^packages/all/(?P<repo>[A-z0-9\-]+)/$', cache_page(313)(PackageFeed())), |
67 | 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'), |
| 68 | + path('releases/', cache_page(317)(ReleaseFeed())), |
| 69 | + path('planet/', cache_page(317)(PlanetFeed()), name='planet-feed'), |
70 | 70 | ] |
71 | 71 |
|
72 | 72 | # Old planet.archlinux.org redirects, to be removed once people have migrated. |
73 | 73 | urlpatterns.extend([ |
74 | | - re_path(r'^planet/rss20.xml$', cache_page(317)(PlanetFeed())), |
75 | | - re_path(r'^planet/atom.xml$', cache_page(317)(PlanetFeed())), |
| 74 | + path('planet/rss20.xml', cache_page(317)(PlanetFeed())), |
| 75 | + path('planet/atom.xml', cache_page(317)(PlanetFeed())), |
76 | 76 | ]) |
77 | 77 |
|
78 | 78 | # Includes and other remaining stuff |
79 | 79 | urlpatterns.extend([ |
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'), |
| 80 | + path('admin/', admin.site.urls), |
| 81 | + path('devel/', include(devel.urls)), |
| 82 | + path('feeds/', include(feeds_patterns)), |
| 83 | + path('groups/', include(packages.urls_groups)), |
| 84 | + path('mirrorlist/', include(mirrors.urls_mirrorlist)), |
| 85 | + path('mirrors/', include(mirrors.urls)), |
| 86 | + path('news/', include(news.urls)), |
| 87 | + path('packages/', include(packages.urls)), |
| 88 | + path('releng/', include(releng.urls)), |
| 89 | + path('todo/', include(todolists.urls)), |
| 90 | + path('visualize/', include(visualize.urls)), |
| 91 | + path('opensearch/packages/', packages.views.opensearch, name='opensearch-packages'), |
| 92 | + path('opensearch/packages/suggest', packages.views.opensearch_suggest, name='opensearch-packages-suggest'), |
93 | 93 | ]) |
94 | 94 |
|
95 | 95 | # Sitemaps |
96 | 96 | urlpatterns.extend([ |
97 | | - re_path(r'^sitemap.xml$', cache_page(1831)(sitemap_views.index), |
98 | | - {'sitemaps': our_sitemaps, 'sitemap_url_name': 'sitemaps'}), |
| 97 | + path('sitemap.xml', cache_page(1831)(sitemap_views.index), |
| 98 | + {'sitemaps': our_sitemaps, 'sitemap_url_name': 'sitemaps'}), |
99 | 99 | re_path(r'^sitemap-(?P<section>.+)\.xml$', cache_page(1831)(sitemap_views.sitemap), |
100 | 100 | {'sitemaps': our_sitemaps, 'template_name': 'sitemaps/sitemap.xml'}, |
101 | 101 | name='sitemaps'), |
102 | | - re_path(r'^news-sitemap\.xml$', cache_page(1831)(sitemap_views.sitemap), |
103 | | - {'sitemaps': news_sitemaps, 'template_name': 'sitemaps/news_sitemap.xml'}, |
104 | | - name='news-sitemap'), |
| 102 | + path('news-sitemap.xml', cache_page(1831)(sitemap_views.sitemap), |
| 103 | + {'sitemaps': news_sitemaps, 'template_name': 'sitemaps/news_sitemap.xml'}, |
| 104 | + name='news-sitemap'), |
105 | 105 | ]) |
106 | 106 |
|
107 | 107 | # Authentication |
108 | 108 | urlpatterns.extend([ |
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'), |
| 109 | + path('login/', auth_views.LoginView.as_view(template_name='registration/login.html'), name='login'), |
| 110 | + path('logout/', auth_views.LogoutView.as_view(template_name='registration/logout.html'), name='logout'), |
111 | 111 | ]) |
112 | 112 |
|
113 | 113 | # django-toolbar |
|
0 commit comments