|
3 | 3 | from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
4 | 4 | from django.conf.urls.static import static
|
5 | 5 | from django.urls import path, re_path
|
6 |
| -from django.views.generic.base import TemplateView, RedirectView |
| 6 | +from django.views.generic.base import TemplateView |
7 | 7 | from django.conf import settings
|
8 | 8 |
|
9 | 9 | from cms.views import custom_404
|
|
24 | 24 | # python section landing pages
|
25 | 25 | path('about/', TemplateView.as_view(template_name="python/about.html"), name='about'),
|
26 | 26 |
|
27 |
| - # Redirect old download links to new downloads pages |
28 |
| - path('download/', RedirectView.as_view(url='https://www.python.org/downloads/', permanent=True)), |
29 |
| - path('download/source/', RedirectView.as_view(url='https://www.python.org/downloads/source/', permanent=True)), |
30 |
| - path('download/mac/', RedirectView.as_view(url='https://www.python.org/downloads/macos/', permanent=True)), |
31 |
| - path('download/windows/', RedirectView.as_view(url='https://www.python.org/downloads/windows/', permanent=True)), |
32 |
| - |
33 | 27 | # duplicated downloads to getit to bypass China's firewall. See
|
34 | 28 | # https://github.com/python/pythondotorg/issues/427 for more info.
|
35 | 29 | path('getit/', include('downloads.urls', namespace='getit')),
|
36 | 30 | path('downloads/', include('downloads.urls', namespace='download')),
|
37 | 31 | path('doc/', views.DocumentationIndexView.as_view(), name='documentation'),
|
38 |
| - path('blog/', RedirectView.as_view(url='/blogs/', permanent=True)), |
39 | 32 | path('blogs/', include('blogs.urls')),
|
40 | 33 | path('inner/', TemplateView.as_view(template_name="python/inner.html"), name='inner'),
|
41 | 34 |
|
|
54 | 47 | name='account_change_password'),
|
55 | 48 | path('accounts/', include('allauth.urls')),
|
56 | 49 | path('box/', include('boxes.urls')),
|
57 |
| - re_path(r'^community-landing(/.*)?$', RedirectView.as_view(url='/community/', permanent=True)), |
58 | 50 | path('community/', include('community.urls', namespace='community')),
|
59 | 51 | path('community/microbit/', TemplateView.as_view(template_name="community/microbit.html"), name='microbit'),
|
60 | 52 | path('events/', include('events.urls', namespace='events')),
|
|
0 commit comments