mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-01 15:54:53 +00:00
Retire some legacy URL redirects
Some of this goes back to the old website, and some goes back even further. Clean some up, leave those that are still clearly in use.
This commit is contained in:
@ -1,22 +1,5 @@
|
|||||||
from django.http import HttpResponseRedirect
|
from django.http import HttpResponseRedirect
|
||||||
|
|
||||||
def presskit(request, version, language):
|
|
||||||
return HttpResponseRedirect("/about/press/presskit%s/%s/" % (
|
|
||||||
version, language)
|
|
||||||
)
|
|
||||||
|
|
||||||
def news(request, newsid):
|
|
||||||
return HttpResponseRedirect("/about/news/%s/" % newsid)
|
|
||||||
|
|
||||||
def event(request, eventid):
|
|
||||||
return HttpResponseRedirect("/about/event/%s/" % eventid)
|
|
||||||
|
|
||||||
def signup(request):
|
|
||||||
return HttpResponseRedirect("/account/signup/")
|
|
||||||
|
|
||||||
def html_extension(request, prior_to_html):
|
|
||||||
return HttpResponseRedirect("/%s" % prior_to_html)
|
|
||||||
|
|
||||||
def mailpref(request, listname):
|
def mailpref(request, listname):
|
||||||
# Just redirect to the homepage of pglister, don't try specific lists
|
# Just redirect to the homepage of pglister, don't try specific lists
|
||||||
return HttpResponseRedirect("https://lists.postgresql.org/")
|
return HttpResponseRedirect("https://lists.postgresql.org/")
|
||||||
|
@ -112,28 +112,18 @@ urlpatterns = [
|
|||||||
url(r'^downloads/$', RedirectView.as_view(url='/download/', permanent=True)),
|
url(r'^downloads/$', RedirectView.as_view(url='/download/', permanent=True)),
|
||||||
|
|
||||||
###
|
###
|
||||||
# Legacy URLs from the old website, that are likely to be used from other
|
# Legacy URLs from old structurs, but used in places like press releases
|
||||||
# sites or press releases or such
|
# so needs to live a bit longer.
|
||||||
###
|
###
|
||||||
url(r'^about/press/contact/$', RedirectView.as_view(url='/about/press/', permanent=True)),
|
url(r'^about/press/contact/$', RedirectView.as_view(url='/about/press/', permanent=True)),
|
||||||
url(r'^about/press/presskit(\d+)\.html\.(\w+)$', pgweb.legacyurl.views.presskit),
|
|
||||||
url(r'^about/news\.(\d+)$', pgweb.legacyurl.views.news),
|
|
||||||
url(r'^about/event\.(\d+)$', pgweb.legacyurl.views.event),
|
|
||||||
url(r'^community/signup', pgweb.legacyurl.views.signup),
|
|
||||||
|
|
||||||
###
|
###
|
||||||
# Images that are used from other community sites
|
# Images that are used from other community sites
|
||||||
###
|
###
|
||||||
url(r'^layout/images/(?P<f>[a-z0-9_\.]+)$', RedirectView.as_view(url='/media/img/layout/%(f)s', permanent=True)),
|
url(r'^layout/images/(?P<f>[a-z0-9_\.]+)$', RedirectView.as_view(url='/media/img/layout/%(f)s', permanent=True)),
|
||||||
###
|
###
|
||||||
# These URLs were legacy even on the old site...
|
# Handle redirect on incorrect spelling of licence
|
||||||
###
|
###
|
||||||
url(r'^developer/sourcecode/$', RedirectView.as_view(url='/developer/coding/', permanent=True)),
|
|
||||||
url(r'^developer/bios/$', RedirectView.as_view(url='/community/contributors/', permanent=True)),
|
|
||||||
url(r'^docs/techdocs.*', RedirectView.as_view(url='https://wiki.postgresql.org/', permanent=True)),
|
|
||||||
url(r'^docs/faqs.FAQ.html$', RedirectView.as_view(url='https://wiki.postgresql.org/wiki/FAQ', permanent=True)),
|
|
||||||
url(r'^docs/faqs.FAQ_DEV.*', RedirectView.as_view(url='https://wiki.postgresql.org/wiki/Development_information', permanent=True)),
|
|
||||||
url(r'^docs/faqs.TODO.*', RedirectView.as_view(url='https://wiki.postgresql.org/wiki/Todo', permanent=True)),
|
|
||||||
url(r'^about/license/$', RedirectView.as_view(url='/about/licence', permanent=True)),
|
url(r'^about/license/$', RedirectView.as_view(url='/about/licence', permanent=True)),
|
||||||
|
|
||||||
###
|
###
|
||||||
@ -163,9 +153,6 @@ urlpatterns = [
|
|||||||
# Crash testing URL :-)
|
# Crash testing URL :-)
|
||||||
url(r'^crashtest/$', pgweb.misc.views.crashtest),
|
url(r'^crashtest/$', pgweb.misc.views.crashtest),
|
||||||
|
|
||||||
# If we're getting an attempt for something ending in HTML, just get rid of it
|
|
||||||
url(r'^(.*)\.html$', pgweb.legacyurl.views.html_extension),
|
|
||||||
|
|
||||||
# Fallback for static pages, must be at the bottom
|
# Fallback for static pages, must be at the bottom
|
||||||
url(r'^(.*)/$', pgweb.core.views.fallback),
|
url(r'^(.*)/$', pgweb.core.views.fallback),
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user