remotes/origin/1203
Kotiuk Nazarii 11 years ago
commit 2a4535a73f
  1. 86
      settings/old_urls.py
  2. 3
      settings/redirect_views.py

@ -46,42 +46,112 @@ urlpatterns = patterns('',
#url(r'^serv-personal-info.php$', old_redirect, {'redirect_url': '/service/staff/'}),
# EXPO
# city
url(r'^catalog/city-(?P<city>)/theme-(?P<theme>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/{year}/'}),
url(r'^catalog/city-(?P<city>.*)/theme-(?P<theme>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/{year}/{month}/page/{page}/'}),
url(r'^catalog/city-(?P<city>.*)/theme-(?P<theme>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/{year}/{month}/page/{page}/'}),
url(r'^catalog/city-(?P<city>.*)/theme-(?P<theme>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/{year}/{month}/'}),
url(r'^catalog/city-(?P<city>.*)/theme-(?P<theme>.*)/year-(?P<year>\d+)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/{year}/page/{page}/'}),
url(r'^catalog/city-(?P<city>.*)/theme-(?P<theme>.*)/year-(?P<year>\d+)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/{year}/page/{page}/'}),
url(r'^catalog/city-(?P<city>.*)/theme-(?P<theme>.*)/year-(?P<year>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/{year}/'}),
url(r'^catalog/city-(?P<city>.*)/theme-(?P<theme>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/page/{page}/'}),
url(r'^catalog/city-(?P<city>.*)/theme-(?P<theme>.*)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/page/{page}/'}),
url(r'^catalog/city-(?P<city>.*)/theme-(?P<theme>.*)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/'}),
url(r'^catalog/city-(?P<city>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/$', old_redirect, {'redirect_url': '/expo/city/{city}/{year}/{month}'}),
url(r'^catalog/city/(?P<city>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/$', old_redirect, {'redirect_url': '/expo/city/{city}/{year}/{month}'}),
url(r'^catalog/city-(?P<city>.*)/year-(?P<year>\d+)/$', old_redirect, {'redirect_url': '/expo/city/{city}/{year}'}),
url(r'^catalog/city/(?P<city>.*)/year-(?P<year>\d+)/$', old_redirect, {'redirect_url': '/expo/city/{city}/{year}'}),
url(r'^catalog/city-(?P<city>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/city/{city}/{year}/{month}/page/{page}/'}),
url(r'^catalog/city-(?P<city>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/city/{city}/{year}/{month}/page/{page}/'}),
url(r'^catalog/city-(?P<city>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/$', old_redirect, {'redirect_url': '/expo/city/{city}/{year}/{month}/'}),
url(r'^catalog/city/(?P<city>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/city/{city}/{year}/{month}/page/{page}/'}),
url(r'^catalog/city/(?P<city>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/city/{city}/{year}/{month}/page/{page}/'}),
url(r'^catalog/city/(?P<city>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/$', old_redirect, {'redirect_url': '/expo/city/{city}/{year}/{month}/'}),
url(r'^catalog/city-(?P<city>.*)/year-(?P<year>\d+)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/city/{city}/{year}/page/{page}/'}),
url(r'^catalog/city-(?P<city>.*)/year-(?P<year>\d+)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/city/{city}/{year}/page/{page}/'}),
url(r'^catalog/city-(?P<city>.*)/year-(?P<year>\d+)/$', old_redirect, {'redirect_url': '/expo/city/{city}/{year}/'}),
url(r'^catalog/city/(?P<city>.*)/year-(?P<year>\d+)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/city/{city}/{year}/page/{page}/'}),
url(r'^catalog/city/(?P<city>.*)/year-(?P<year>\d+)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/city/{city}/{year}/page/{page}/'}),
url(r'^catalog/city/(?P<city>.*)/year-(?P<year>\d+)/$', old_redirect, {'redirect_url': '/expo/city/{city}/{year}/'}),
#-----------------------------
url(r'^catalog/city-(?P<city>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/city/{city}/page/{page}/'}),
url(r'^catalog/city-(?P<city>.*)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/city/{city}/page/{page}/'}),
url(r'^catalog/city-(?P<city>.*)/$', old_redirect, {'redirect_url': '/expo/city/{city}/'}),
# country
url(r'^catalog/country-(?P<country>)/theme-(?P<theme>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/{year}/'}),
url(r'^catalog/country-(?P<country>.*)/theme-(?P<theme>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/{year}/{month}/page/{page}/'}),
url(r'^catalog/country-(?P<country>.*)/theme-(?P<theme>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/{year}/{month}/page/{page}/'}),
url(r'^catalog/country-(?P<country>.*)/theme-(?P<theme>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/{year}/{month}/'}),
url(r'^catalog/country-(?P<country>.*)/theme-(?P<theme>.*)/year-(?P<year>\d+)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/{year}/page/{page}/'}),
url(r'^catalog/country-(?P<country>.*)/theme-(?P<theme>.*)/year-(?P<year>\d+)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/{year}/page/{page}/'}),
url(r'^catalog/country-(?P<country>.*)/theme-(?P<theme>.*)/year-(?P<year>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/{year}/'}),
url(r'^catalog/country-(?P<country>.*)/theme-(?P<theme>.*)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/page/{page}/'}),
url(r'^catalog/country-(?P<country>.*)/theme-(?P<theme>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/page/{page}/'}),
url(r'^catalog/country-(?P<country>.*)/theme-(?P<theme>.*)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/'}),
url(r'^catalog/country-(?P<country>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/country/{country}/{year}/{month}/page/{page}/'}),
url(r'^catalog/country-(?P<country>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/country/{country}/{year}/{month}/page/{page}/'}),
url(r'^catalog/country-(?P<country>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/$', old_redirect, {'redirect_url': '/expo/country/{country}/{year}/{month}/'}),
url(r'^catalog/country/(?P<country>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/country/{country}/{year}/{month}/page/{page}/'}),
url(r'^catalog/country/(?P<country>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/country/{country}/{year}/{month}/page/{page}/'}),
url(r'^catalog/country/(?P<country>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/$', old_redirect, {'redirect_url': '/expo/country/{country}/{year}/{month}/'}),
url(r'^catalog/country-(?P<country>.*)/year-(?P<year>\d+)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/country/{country}/{year}/page/{page}/'}),
url(r'^catalog/country-(?P<country>.*)/year-(?P<year>\d+)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/country/{country}/{year}/page/{page}/'}),
url(r'^catalog/country-(?P<country>.*)/year-(?P<year>\d+)/$', old_redirect, {'redirect_url': '/expo/country/{country}/{year}/'}),
url(r'^catalog/country/(?P<country>.*)/year-(?P<year>\d+)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/country/{country}/{year}/page/{page}/'}),
url(r'^catalog/country/(?P<country>.*)/year-(?P<year>\d+)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/country/{country}/{year}/page/{page}/'}),
url(r'^catalog/country/(?P<country>.*)/year-(?P<year>\d+)/$', old_redirect, {'redirect_url': '/expo/country/{country}/{year}/'}),
url(r'^catalog/country/(?P<country>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/country/{country}/page/{page}/'}),
url(r'^catalog/country/(?P<country>.*)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/country/{country}/page/{page}/'}),
url(r'^catalog/country-(?P<country>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/country/{country}/'}),
url(r'^catalog/country/(?P<country>.*)/$', old_redirect, {'redirect_url': '/expo/country/{country}/'}),
url(r'^catalog/country-(?P<country>.*)/$', old_redirect, {'redirect_url': '/expo/country/{country}/'}),
url(r'^catalog/country/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/country/page/{page}/'}),
url(r'^catalog/country/$', old_redirect, {'redirect_url': '/expo/country/'}),
# theme
url(r'^catalog/theme-(?P<theme>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/{year}/{month}/page/{page}/'}),
url(r'^catalog/theme-(?P<theme>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/{year}/{month}/page/{page}/'}),
url(r'^catalog/theme-(?P<theme>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/{year}/{month}/'}),
url(r'^catalog/theme-(?P<theme>.*)/year-(?P<year>\d+)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/{year}/page/{page}/'}),
url(r'^catalog/theme-(?P<theme>.*)/year-(?P<year>\d+)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/{year}/page/{page}/'}),
url(r'^catalog/theme-(?P<theme>.*)/year-(?P<year>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/{year}/'}),
url(r'^catalog/theme-(?P<theme>.*)/city-(?P<city>)/year-(?P<year>\d+)/month-(?P<month>.*)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/{year}/'}),
url(r'^catalog/theme-(?P<theme>.*)/city-(?P<city>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/{year}/{month}/page/{page}/'}),
url(r'^catalog/theme-(?P<theme>.*)/city-(?P<city>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/{year}/{month}/page/{page}/'}),
url(r'^catalog/theme-(?P<theme>.*)/city-(?P<city>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/{year}/{month}/'}),
url(r'^catalog/theme-(?P<theme>.*)/city-(?P<city>.*)/year-(?P<year>\d+)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/{year}/page/{page}/'}),
url(r'^catalog/theme-(?P<theme>.*)/city-(?P<city>.*)/year-(?P<year>\d+)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/{year}/page/{page}/'}),
url(r'^catalog/theme-(?P<theme>.*)/city-(?P<city>.*)/year-(?P<year>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/{year}/'}),
url(r'^catalog/theme-(?P<theme>.*)/city-(?P<city>.*)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/page/{page}/'}),
url(r'^catalog/theme-(?P<theme>.*)/city-(?P<city>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/page/{page}/'}),
url(r'^catalog/theme-(?P<theme>.*)/city-(?P<city>.*)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/city/{city}/'}),
url(r'^catalog/theme-(?P<theme>.*)/country-(?P<country>)/year-(?P<year>\d+)/month-(?P<month>.*)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/{year}/'}),
url(r'^catalog/theme-(?P<theme>.*)/country-(?P<country>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/{year}/{month}/page/{page}/'}),
url(r'^catalog/theme-(?P<theme>.*)/country-(?P<country>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/{year}/{month}/page/{page}/'}),
url(r'^catalog/theme-(?P<theme>.*)/country-(?P<country>.*)/year-(?P<year>\d+)/month-(?P<month>.*)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/{year}/{month}/'}),
url(r'^catalog/theme-(?P<theme>.*)/country-(?P<country>.*)/year-(?P<year>\d+)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/{year}/page/{page}/'}),
url(r'^catalog/theme-(?P<theme>.*)/country-(?P<country>.*)/year-(?P<year>\d+)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/{year}/page/{page}/'}),
url(r'^catalog/theme-(?P<theme>.*)/country-(?P<country>.*)/year-(?P<year>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/{year}/'}),
url(r'^catalog/theme-(?P<theme>.*)/country-(?P<country>.*)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/page/{page}/'}),
url(r'^catalog/theme-(?P<theme>.*)/country-(?P<country>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/page/{page}/'}),
url(r'^catalog/theme-(?P<theme>.*)/country-(?P<country>.*)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/country/{country}/'}),
url(r'^catalog/theme/(?P<theme>.*)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/page/{page}/'}),
url(r'^catalog/theme/(?P<theme>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/page/{page}'}),
url(r'^catalog/theme/(?P<theme>.*)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/'}),
url(r'^catalog/theme-(?P<theme>.*)/page-(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/page/{page}/'}),
url(r'^catalog/theme-(?P<theme>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/page/{page}/'}),
url(r'^catalog/theme-(?P<theme>.*)/$', old_redirect, {'redirect_url': '/expo/theme/{theme}/'}),
url(r'^catalog/theme/$', old_redirect, {'redirect_url': '/expo/theme/'}),
# tag
url(r'^tags.php/theme/(?P<tag>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/tag/{tag}/'}),
url(r'^tags.php/theme/(?P<tag>.*)/$', old_redirect, {'redirect_url': '/expo/tag/{tag}/'}),
url(r'^tag/(?P<tag>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/tag/{tag}/page/{page}/'}),
url(r'^tag/(?P<tag>.*)/$', old_redirect, {'redirect_url': '/expo/tag/{tag}/'}),
url(r'^catalog/(?P<city>.*)/page/(?P<page>\d+)/$', old_redirect, {'redirect_url': '/expo/city/{city}/page/{page}/'}),
url(r'^catalog/(?P<city>.*)/$', old_redirect, {'redirect_url': '/expo/city/{city}/'}),
url(r'^catalog/$', old_redirect, {'redirect_url': '/expo/city/'}),
# tag

@ -91,9 +91,11 @@ old_params = {'city': CityRedirect, 'country': CountryRedirect, 'theme': ThemeRe
'page': PageRedirect, 'news_p': News_p}
def old_redirect(request, *args, **kwargs):
redirect = kwargs.get('redirect_url')
params = dict(kwargs)
updates = {}
for key, value in params.iteritems():
if key in old_params:
redirect_obj = old_params[key]()
@ -102,6 +104,7 @@ def old_redirect(request, *args, **kwargs):
params.update(updates)
redirect = redirect.format(**params)
return HttpResponsePermanentRedirect(redirect)
def old_profile(request):

Loading…
Cancel
Save