1496: Внепланово со скайпа 404

1497: Внепланово со скайпа seo
remotes/origin/stage4
Alexander Burdeiny 10 years ago
parent 31f84fa248
commit edd92d4d6b
  1. 35
      accounts/views.py
  2. 102
      conference/urls.py
  3. 100
      exposition/urls.py
  4. 12
      meta/models.py
  5. 2
      templates/client/article/news.html
  6. 6
      templates/client/includes/place/place_object.html

@ -221,12 +221,7 @@ class ProfileCompanyView(TemplateView):
return context
class UserView(MetadataMixin, TemplateView):
"""
display user information for another users
"""
template_name = 'client/accounts/user.html'
class UserMixin(object):
def get_user(self):
url = self.kwargs.get('url')
@ -238,6 +233,14 @@ class UserView(MetadataMixin, TemplateView):
self.kwargs['user_full_name'] = user.get_full_name()
return user
class UserView(UserMixin, MetadataMixin, TemplateView):
"""
display user information for another users
"""
template_name = 'client/accounts/user.html'
def get_context_data(self, **kwargs):
user = self.get_user()
context = super(UserView, self).get_context_data(**kwargs)
@ -382,11 +385,11 @@ class UserEventView(ListView):
obj = None
event_type = None
def get_queryset(self):
url = self.kwargs.get('url')
user = get_user(url)
self.obj = user
return user.exposition_users.language().select_related('country').all()
# def get_queryset(self):
# url = self.kwargs.get('url')
# user = get_user(url)
# self.obj = user
# return user.exposition_users.language().select_related('country').all()
def get_context_data(self, **kwargs):
context = super(UserEventView, self).get_context_data(**kwargs)
@ -395,29 +398,27 @@ class UserEventView(ListView):
return context
class UserExpositionsView(MetadataMixin, UserEventView):
class UserExpositionsView(UserMixin, MetadataMixin, UserEventView):
"""
return template with list of expos that user joined
"""
event_type = _(u'Выставки')
def get_queryset(self):
url = self.kwargs.get('url')
user = get_user(url)
user = self.get_user()
self.obj = user
self.kwargs['user_full_name'] = user.get_full_name()
return user.get_expos()
class UserConferenceView(MetadataMixin, UserEventView):
class UserConferenceView(UserMixin, MetadataMixin, UserEventView):
"""
return template with list of confs that user joined
"""
event_type = _(u'Конференции')
def get_queryset(self):
url = self.kwargs.get('url')
user = get_user(url)
user = self.get_user()
self.obj = user
self.kwargs['user_full_name'] = user.get_full_name()
return user.get_confs()

@ -23,81 +23,81 @@ from .views import (
urlpatterns = patterns('',
url(r'^conference/add-note/(?P<slug>.*)/$', 'conference.views.add_note'),
url(r'^conference/add-note/(?P<slug>[^/]*)/$', 'conference.views.add_note'),
url(r'^conference-add-calendar/(?P<id>\d+)/$', 'conference.views.conference_add_calendar'),
url(r'^conference-visit/(?P<id>\d+)/$', 'conference.views.conference_visit'),
# search
url(r'^conference/search/', ExpositionSearchView.as_view()),
# country catalog
url(r'^conference/country/$', ConferenceByCountry.as_view(), {'meta_id':51}),
url(r'^conference/country/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceCountryCatalog.as_view(), {'meta_id':25}),
url(r'^conference/country/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceCountryCatalog.as_view(), {'meta_id':24}),
url(r'^conference/country/(?P<slug>.*)/page/(?P<page>\d+)/$', ConferenceCountryCatalog.as_view(), {'meta_id':23}),
url(r'^conference/country/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ConferenceCountryCatalog.as_view(), {'meta_id':25}),
url(r'^conference/country/(?P<slug>.*)/(?P<year>\d+)/$', ConferenceCountryCatalog.as_view(), {'meta_id':24}),
url(r'^conference/country/(?P<slug>.*)/$', ConferenceCountryCatalog.as_view(), {'meta_id':23}),
url(r'^conference/country/(?P<slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/page/(?P<page>\d+)/$', ConferenceCountryCatalog.as_view(), {'meta_id':25}),
url(r'^conference/country/(?P<slug>[^/]*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceCountryCatalog.as_view(), {'meta_id':24}),
url(r'^conference/country/(?P<slug>[^/]*)/page/(?P<page>\d+)/$', ConferenceCountryCatalog.as_view(), {'meta_id':23}),
url(r'^conference/country/(?P<slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/$', ConferenceCountryCatalog.as_view(), {'meta_id':25}),
url(r'^conference/country/(?P<slug>[^/]*)/(?P<year>\d+)/$', ConferenceCountryCatalog.as_view(), {'meta_id':24}),
url(r'^conference/country/(?P<slug>[^/]*)/$', ConferenceCountryCatalog.as_view(), {'meta_id':23}),
# city catalog
url(r'^conference/city/$', ConferenceByCity.as_view(), {'meta_id':52}),
url(r'^conference/city/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceCityCatalog.as_view(), {'meta_id':28}),
url(r'^conference/city/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceCityCatalog.as_view(), {'meta_id':27}),
url(r'^conference/city/(?P<slug>.*)/page/(?P<page>\d+)/$', ConferenceCityCatalog.as_view(), {'meta_id':26}),
url(r'^conference/city/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ConferenceCityCatalog.as_view(), {'meta_id':28}),
url(r'^conference/city/(?P<slug>.*)/(?P<year>\d+)/$', ConferenceCityCatalog.as_view(), {'meta_id':27}),
url(r'^conference/city/(?P<slug>.*)/$', ConferenceCityCatalog.as_view(), {'meta_id':26}),
url(r'^conference/city/(?P<slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/page/(?P<page>\d+)/$', ConferenceCityCatalog.as_view(), {'meta_id':28}),
url(r'^conference/city/(?P<slug>[^/]*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceCityCatalog.as_view(), {'meta_id':27}),
url(r'^conference/city/(?P<slug>[^/]*)/page/(?P<page>\d+)/$', ConferenceCityCatalog.as_view(), {'meta_id':26}),
url(r'^conference/city/(?P<slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/$', ConferenceCityCatalog.as_view(), {'meta_id':28}),
url(r'^conference/city/(?P<slug>[^/]*)/(?P<year>\d+)/$', ConferenceCityCatalog.as_view(), {'meta_id':27}),
url(r'^conference/city/(?P<slug>[^/]*)/$', ConferenceCityCatalog.as_view(), {'meta_id':26}),
# theme catalog
url(r'^conference/theme/$', ConferenceByTheme.as_view(), {'meta_id':50}),
url(r'^conference/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/(?P<year>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>[^/]*)/country/(?P<country_slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>[^/]*)/country/(?P<country_slug>[^/]*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>[^/]*)/country/(?P<country_slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>[^/]*)/country/(?P<country_slug>[^/]*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>[^/]*)/country/(?P<country_slug>[^/]*)/(?P<year>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>[^/]*)/country/(?P<country_slug>[^/]*)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/(?P<year>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>[^/]*)/city/(?P<city_slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>[^/]*)/city/(?P<city_slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>[^/]*)/city/(?P<city_slug>[^/]*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>[^/]*)/city/(?P<city_slug>[^/]*)/(?P<year>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>[^/]*)/city/(?P<city_slug>[^/]*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view(), {'meta_id':31}),
url(r'^conference/theme/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view(), {'meta_id':30}),
url(r'^conference/theme/(?P<slug>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view(), {'meta_id':29}),
url(r'^conference/theme/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ConferenceThemeCatalog.as_view(), {'meta_id':31}),
url(r'^conference/theme/(?P<slug>.*)/(?P<year>\d+)/$', ConferenceThemeCatalog.as_view(), {'meta_id':30}),
url(r'^conference/theme/(?P<slug>.*)/$', ConferenceThemeCatalog.as_view(), {'meta_id':29}),
url(r'^conference/theme/(?P<slug>[^/]*)/city/(?P<city_slug>[^/]*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>[^/]*)/city/(?P<city_slug>[^/]*)/$', ConferenceThemeCatalog.as_view()),
url(r'^conference/theme/(?P<slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view(), {'meta_id':31}),
url(r'^conference/theme/(?P<slug>[^/]*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view(), {'meta_id':30}),
url(r'^conference/theme/(?P<slug>[^/]*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view(), {'meta_id':29}),
url(r'^conference/theme/(?P<slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/$', ConferenceThemeCatalog.as_view(), {'meta_id':31}),
url(r'^conference/theme/(?P<slug>[^/]*)/(?P<year>\d+)/$', ConferenceThemeCatalog.as_view(), {'meta_id':30}),
url(r'^conference/theme/(?P<slug>[^/]*)/$', ConferenceThemeCatalog.as_view(), {'meta_id':29}),
# tag catalog
url(r'^conference/tag/$', ConferenceByTag.as_view(), {'meta_id':50}),
url(r'^conference/tag/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceTagCatalog.as_view(), {'meta_id':34}),
url(r'^conference/tag/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceTagCatalog.as_view(), {'meta_id':33}),
url(r'^conference/tag/(?P<slug>.*)/page/(?P<page>\d+)/$', ConferenceTagCatalog.as_view(), {'meta_id':32}),
url(r'^conference/tag/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ConferenceTagCatalog.as_view(), {'meta_id':34}),
url(r'^conference/tag/(?P<slug>.*)/(?P<year>\d+)/$', ConferenceTagCatalog.as_view(), {'meta_id':33}),
url(r'^conference/tag/(?P<slug>.*)/$', ConferenceTagCatalog.as_view(), {'meta_id':32}),
url(r'^conference/tag/(?P<slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/page/(?P<page>\d+)/$', ConferenceTagCatalog.as_view(), {'meta_id':34}),
url(r'^conference/tag/(?P<slug>[^/]*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceTagCatalog.as_view(), {'meta_id':33}),
url(r'^conference/tag/(?P<slug>[^/]*)/page/(?P<page>\d+)/$', ConferenceTagCatalog.as_view(), {'meta_id':32}),
url(r'^conference/tag/(?P<slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/$', ConferenceTagCatalog.as_view(), {'meta_id':34}),
url(r'^conference/tag/(?P<slug>[^/]*)/(?P<year>\d+)/$', ConferenceTagCatalog.as_view(), {'meta_id':33}),
url(r'^conference/tag/(?P<slug>[^/]*)/$', ConferenceTagCatalog.as_view(), {'meta_id':32}),
# conf additional pages
url(r'^conference/(?P<slug>.*)/send_to_organiser/$', 'conference.views.send_to_organiser'),
url(r'^conference/(?P<slug>.*)/photo/page/(?P<page>\d+)/$', ConferencePhotoView.as_view(), {'meta_id': 93}),
url(r'^conference/(?P<slug>.*)/photo/$', ConferencePhotoView.as_view(), {'meta_id': 93}),
url(r'^conference/(?P<slug>.*)/visitors/page/(?P<page>\d+)/$', ConferenceVisitors.as_view()),
url(r'^conference/(?P<slug>.*)/visitors/$', ConferenceVisitors.as_view()),
url(r'^conference/(?P<slug>.*)/members/page/(?P<page>\d+)/$', ConferenceMembers.as_view()),
url(r'^conference/(?P<slug>.*)/members/$', ConferenceMembers.as_view()),
url(r'^conference/(?P<slug>.*)/service/thanks/', ConferenceThankView.as_view()),
url(r'^conference/(?P<slug>.*)/service/visit/', 'conference.views.visit_redirect'),
url(r'^conference/(?P<slug>[^/]*)/send_to_organiser/$', 'conference.views.send_to_organiser'),
url(r'^conference/(?P<slug>[^/]*)/photo/page/(?P<page>\d+)/$', ConferencePhotoView.as_view(), {'meta_id': 93}),
url(r'^conference/(?P<slug>[^/]*)/photo/$', ConferencePhotoView.as_view(), {'meta_id': 93}),
url(r'^conference/(?P<slug>[^/]*)/visitors/page/(?P<page>\d+)/$', ConferenceVisitors.as_view()),
url(r'^conference/(?P<slug>[^/]*)/visitors/$', ConferenceVisitors.as_view()),
url(r'^conference/(?P<slug>[^/]*)/members/page/(?P<page>\d+)/$', ConferenceMembers.as_view()),
url(r'^conference/(?P<slug>[^/]*)/members/$', ConferenceMembers.as_view()),
url(r'^conference/(?P<slug>[^/]*)/service/thanks/', ConferenceThankView.as_view()),
url(r'^conference/(?P<slug>[^/]*)/service/visit/', 'conference.views.visit_redirect'),
url(r'^conference/(?P<slug>.*)/service/(?P<service_url>.*)/', ConferenceServiceView.as_view()),
url(r'^conference/(?P<slug>[^/]*)/service/(?P<service_url>[^/]*)/', ConferenceServiceView.as_view()),
# conf list
url(r'^conference/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceList.as_view(), {'meta_id':22}),
url(r'^conference/(?P<year>\d+)/(?P<month>[^/]*)/page/(?P<page>\d+)/$', ConferenceList.as_view(), {'meta_id':22}),
url(r'^conference/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceList.as_view(), {'meta_id':21}),
url(r'^conference/(?P<year>\d+)/(?P<month>.*)/$', ConferenceList.as_view(), {'meta_id':22}),
url(r'^conference/(?P<year>\d+)/(?P<month>[^/]*)/$', ConferenceList.as_view(), {'meta_id':22}),
url(r'^conference/(?P<year>\d+)/$', ConferenceList.as_view(), {'meta_id':21}),
url(r'^conference/page/(?P<page>\d+)/$', ConferenceList.as_view(), {'meta_id':20}),
# conf page
url(r'^conference/(?P<slug>.*)/$', ConferenceDetail.as_view(), {'meta_id':35}),
url(r'^conference/(?P<slug>[^/]*)/$', ConferenceDetail.as_view(), {'meta_id':35}),
url(r'^conference/$', ConferenceList.as_view(), {'meta_id':20}),
)

@ -32,65 +32,65 @@ urlpatterns = patterns('',
# country catalog
url(r'^expo/country/$', ExpositionByCountry.as_view(), {'meta_id':54}),
url(r'^expo/country/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ExpoCountryCatalog.as_view(), {'meta_id':7}),
url(r'^expo/country/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoCountryCatalog.as_view(), {'meta_id':6}),
url(r'^expo/country/(?P<slug>.*)/page/(?P<page>\d+)/$', ExpoCountryCatalog.as_view(), {'meta_id':5}),
url(r'^expo/country/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ExpoCountryCatalog.as_view(), {'meta_id':7}),
url(r'^expo/country/(?P<slug>.*)/(?P<year>\d+)/$', ExpoCountryCatalog.as_view(), {'meta_id':6}),
url(r'^expo/country/(?P<slug>.*)/$', ExpoCountryCatalog.as_view(), {'meta_id':5}),
url(r'^expo/country/(?P<slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/page/(?P<page>\d+)/$', ExpoCountryCatalog.as_view(), {'meta_id':7}),
url(r'^expo/country/(?P<slug>[^/]*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoCountryCatalog.as_view(), {'meta_id':6}),
url(r'^expo/country/(?P<slug>[^/]*)/page/(?P<page>\d+)/$', ExpoCountryCatalog.as_view(), {'meta_id':5}),
url(r'^expo/country/(?P<slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/$', ExpoCountryCatalog.as_view(), {'meta_id':7}),
url(r'^expo/country/(?P<slug>[^/]*)/(?P<year>\d+)/$', ExpoCountryCatalog.as_view(), {'meta_id':6}),
url(r'^expo/country/(?P<slug>[^/]*)/$', ExpoCountryCatalog.as_view(), {'meta_id':5}),
# city catalog
url(r'^expo/city/$', ExpositionByCity.as_view(), {'meta_id':53}),
url(r'^expo/city/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ExpoCityCatalog.as_view(), {'meta_id':10}),
url(r'^expo/city/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoCityCatalog.as_view(), {'meta_id':9}),
url(r'^expo/city/(?P<slug>.*)/page/(?P<page>\d+)/$', ExpoCityCatalog.as_view(), {'meta_id':8}),
url(r'^expo/city/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ExpoCityCatalog.as_view(), {'meta_id':10}),
url(r'^expo/city/(?P<slug>.*)/(?P<year>\d+)/$', ExpoCityCatalog.as_view(), {'meta_id':9}),
url(r'^expo/city/(?P<slug>.*)/$', ExpoCityCatalog.as_view(), {'meta_id':8}),
url(r'^expo/city/(?P<slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/page/(?P<page>\d+)/$', ExpoCityCatalog.as_view(), {'meta_id':10}),
url(r'^expo/city/(?P<slug>[^/]*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoCityCatalog.as_view(), {'meta_id':9}),
url(r'^expo/city/(?P<slug>[^/]*)/page/(?P<page>\d+)/$', ExpoCityCatalog.as_view(), {'meta_id':8}),
url(r'^expo/city/(?P<slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/$', ExpoCityCatalog.as_view(), {'meta_id':10}),
url(r'^expo/city/(?P<slug>[^/]*)/(?P<year>\d+)/$', ExpoCityCatalog.as_view(), {'meta_id':9}),
url(r'^expo/city/(?P<slug>[^/]*)/$', ExpoCityCatalog.as_view(), {'meta_id':8}),
# theme catalog
url(r'^expo/theme/$', ExpositionByTheme.as_view(), {'meta_id':55}),
url(r'^expo/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':44}),
url(r'^expo/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':44}),
url(r'^expo/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ExpoThemeCatalog.as_view(), {'meta_id':44}),
url(r'^expo/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':44}),
url(r'^expo/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/(?P<year>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':44}),
url(r'^expo/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/$', ExpoThemeCatalog.as_view(), {'meta_id':44}),
url(r'^expo/theme/(?P<slug>[^/]*)/country/(?P<country_slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':44}),
url(r'^expo/theme/(?P<slug>[^/]*)/country/(?P<country_slug>[^/]*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':44}),
url(r'^expo/theme/(?P<slug>[^/]*)/country/(?P<country_slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/$', ExpoThemeCatalog.as_view(), {'meta_id':44}),
url(r'^expo/theme/(?P<slug>[^/]*)/country/(?P<country_slug>[^/]*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':44}),
url(r'^expo/theme/(?P<slug>[^/]*)/country/(?P<country_slug>[^/]*)/(?P<year>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':44}),
url(r'^expo/theme/(?P<slug>[^/]*)/country/(?P<country_slug>[^/]*)/$', ExpoThemeCatalog.as_view(), {'meta_id':44}),
url(r'^expo/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':42}),
url(r'^expo/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ExpoThemeCatalog.as_view(), {'meta_id':42}),
url(r'^expo/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':42}),
url(r'^expo/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/(?P<year>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':42}),
url(r'^expo/theme/(?P<slug>[^/]*)/city/(?P<city_slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':42}),
url(r'^expo/theme/(?P<slug>[^/]*)/city/(?P<city_slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/$', ExpoThemeCatalog.as_view(), {'meta_id':42}),
url(r'^expo/theme/(?P<slug>[^/]*)/city/(?P<city_slug>[^/]*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':42}),
url(r'^expo/theme/(?P<slug>[^/]*)/city/(?P<city_slug>[^/]*)/(?P<year>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':42}),
url(r'^expo/theme/(?P<slug>[^/]*)/city/(?P<city_slug>[^/]*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':42}),
url(r'^expo/theme/(?P<slug>[^/]*)/city/(?P<city_slug>[^/]*)/$', ExpoThemeCatalog.as_view(), {'meta_id':42}),
url(r'^expo/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':42}),
url(r'^expo/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/$', ExpoThemeCatalog.as_view(), {'meta_id':42}),
url(r'^expo/theme/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':13}),
url(r'^expo/theme/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':12}),
url(r'^expo/theme/(?P<slug>.*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':11}),
url(r'^expo/theme/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ExpoThemeCatalog.as_view(), {'meta_id':13}),
url(r'^expo/theme/(?P<slug>.*)/(?P<year>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':12}),
url(r'^expo/theme/(?P<slug>.*)/$', ExpoThemeCatalog.as_view(), {'meta_id':11}),
url(r'^expo/theme/(?P<slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':13}),
url(r'^expo/theme/(?P<slug>[^/]*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':12}),
url(r'^expo/theme/(?P<slug>[^/]*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':11}),
url(r'^expo/theme/(?P<slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/$', ExpoThemeCatalog.as_view(), {'meta_id':13}),
url(r'^expo/theme/(?P<slug>[^/]*)/(?P<year>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':12}),
url(r'^expo/theme/(?P<slug>[^/]*)/$', ExpoThemeCatalog.as_view(), {'meta_id':11}),
# tag catalog
url(r'^expo/tag/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ExpoTagCatalog.as_view(), {'meta_id':17}),
url(r'^expo/tag/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoTagCatalog.as_view(), {'meta_id':15}),
url(r'^expo/tag/(?P<slug>.*)/page/(?P<page>\d+)/$', ExpoTagCatalog.as_view(), {'meta_id':14}),
url(r'^expo/tag/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ExpoTagCatalog.as_view(), {'meta_id':17}),
url(r'^expo/tag/(?P<slug>.*)/(?P<year>\d+)/$', ExpoTagCatalog.as_view(), {'meta_id':15}),
url(r'^expo/tag/(?P<slug>.*)/$', ExpoTagCatalog.as_view(), {'meta_id':14}),
url(r'^expo/tag/(?P<slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/page/(?P<page>\d+)/$', ExpoTagCatalog.as_view(), {'meta_id':17}),
url(r'^expo/tag/(?P<slug>[^/]*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoTagCatalog.as_view(), {'meta_id':15}),
url(r'^expo/tag/(?P<slug>[^/]*)/page/(?P<page>\d+)/$', ExpoTagCatalog.as_view(), {'meta_id':14}),
url(r'^expo/tag/(?P<slug>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/$', ExpoTagCatalog.as_view(), {'meta_id':17}),
url(r'^expo/tag/(?P<slug>[^/]*)/(?P<year>\d+)/$', ExpoTagCatalog.as_view(), {'meta_id':15}),
url(r'^expo/tag/(?P<slug>[^/]*)/$', ExpoTagCatalog.as_view(), {'meta_id':14}),
# expo additional pages
url(r'^expo/(?P<slug>.*)/send_to_organiser/$', 'exposition.views.send_to_organiser'),
url(r'^expo/(?P<slug>.*)/statistic/$', ExpositionStatistic.as_view(), {'meta_id':60}),
url(r'^expo/(?P<slug>.*)/price/$', ExpositionPrice.as_view(), {'meta_id':61}),
url(r'^expo/(?P<slug>.*)/program/$', ExpositionProgramme.as_view(), {'meta_id':62}),
url(r'^expo/(?P<slug>.*)/visitors/page/(?P<page>\d+)/$', ExpoVisitors.as_view(), {'meta_id':64}),
url(r'^expo/(?P<slug>.*)/visitors/$', ExpoVisitors.as_view(), {'meta_id':64}),
url(r'^expo/(?P<slug>.*)/photo/page/(?P<page>\d+)/$', ExpoPhotoView.as_view(), {'meta_id': 92}),
url(r'^expo/(?P<slug>.*)/photo/$', ExpoPhotoView.as_view(), {'meta_id': 92}),
url(r'^expo/(?P<slug>.*)/members/page/(?P<page>\d+)/$', ExpoMembers.as_view(), {'meta_id':63}),
url(r'^expo/(?P<slug>.*)/members/$', ExpoMembers.as_view(), {'meta_id':63}),
url(r'^expo/(?P<slug>.*)/service/thanks/', ExpositionThankView.as_view()),
url(r'^expo/(?P<slug>.*)/service/visit/', 'exposition.views.visit_redirect'),
url(r'^expo/(?P<slug>.*)/service/(?P<service_url>.*)/', ExpositionServiceView.as_view()),
url(r'^expo/(?P<slug>[^/]*)/send_to_organiser/$', 'exposition.views.send_to_organiser'),
url(r'^expo/(?P<slug>[^/]*)/statistic/$', ExpositionStatistic.as_view(), {'meta_id':60}),
url(r'^expo/(?P<slug>[^/]*)/price/$', ExpositionPrice.as_view(), {'meta_id':61}),
url(r'^expo/(?P<slug>[^/]*)/program/$', ExpositionProgramme.as_view(), {'meta_id':62}),
url(r'^expo/(?P<slug>[^/]*)/visitors/page/(?P<page>\d+)/$', ExpoVisitors.as_view(), {'meta_id':64}),
url(r'^expo/(?P<slug>[^/]*)/visitors/$', ExpoVisitors.as_view(), {'meta_id':64}),
url(r'^expo/(?P<slug>[^/]*)/photo/page/(?P<page>\d+)/$', ExpoPhotoView.as_view(), {'meta_id': 92}),
url(r'^expo/(?P<slug>[^/]*)/photo/$', ExpoPhotoView.as_view(), {'meta_id': 92}),
url(r'^expo/(?P<slug>[^/]*)/members/page/(?P<page>\d+)/$', ExpoMembers.as_view(), {'meta_id':63}),
url(r'^expo/(?P<slug>[^/]*)/members/$', ExpoMembers.as_view(), {'meta_id':63}),
url(r'^expo/(?P<slug>[^/]*)/service/thanks/', ExpositionThankView.as_view()),
url(r'^expo/(?P<slug>[^/]*)/service/visit/', 'exposition.views.visit_redirect'),
url(r'^expo/(?P<slug>[^/]*)/service/(?P<service_url>[^/]*)/', ExpositionServiceView.as_view()),
# expo list
url(r'^expo/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ExpoList.as_view(), {'meta_id':4}),
url(r'^expo/(?P<year>\d+)/(?P<month>[^/]*)/page/(?P<page>\d+)/$', ExpoList.as_view(), {'meta_id':4}),
url(r'^expo/(?P<year>\d+)/page/(?P<page>\d+)/$', ExpoList.as_view(), {'meta_id':3}),
url(r'^expo/(?P<year>\d+)/(?P<month>.*)/$', ExpoList.as_view(), {'meta_id':4}),
url(r'^expo/(?P<year>\d+)/$', ExpoList.as_view(), {'meta_id':3}),

@ -150,14 +150,12 @@ class SeoTextManager(TranslationManager):
url = kwargs.get('url')
lang = kwargs.get('lang')[:2] or translation.get_language()[:2]
key = 'seo_text_cache'
if key in cache:
result = cache.get(key)
return result.get("%s_%s" % (lang, url))
else:
result = cache.get(key)
if result is None:
qs = list(SeoText.objects.language('all'))
value_dict = {obj.language_code+'_'+obj.url: obj for obj in qs}
cache.set(key, value_dict, self.cache_time)
return value_dict.get("%s_%s" % (lang, url))
result = {obj.language_code+'_'+obj.url: obj for obj in qs}
cache.set(key, result, self.cache_time)
return result.get("%s_%s" % (lang, url), None)
class SeoText(TranslatableModel):

@ -55,7 +55,7 @@
</div>
<div class="rq-to-hide">
<div class="s-comments">
<div class="sect-title blog_link"><span>{% trans 'Последние новости' %} {{ object.main_title }}</span><a class="button more" href="/news/">{% trans 'Все новости' %}</a></div>
<div class="sect-title blog_link"><span>{% trans 'Последние новости' %}</span><a class="button more" href="/news/">{% trans 'Все новости' %}</a></div>
<div class="cat-list sc-comments">
{% for news in object.similar %}
<div class="cl-item">

@ -206,8 +206,8 @@
<div class="cli-dim">{{ pl.total_area }}</div>
{% endif %}
<div class="cli-place">
<a href="/places/country/{{ pl.country.url }}/">{{ pl.country }}</a>, <a href="places/city/{{ pl.city.url }}/">{{ pl.city }}</a>,
<a href="{{ pl.get_permanent_url }}">{{ pl.adress }}</a>
<a href="/places/country/{{ pl.country.url }}/">{{ pl.country }}</a>, <a href="/places/city/{{ pl.city.url }}/">{{ pl.city }}</a>,
{{ pl.adress }}
</div>
</div>
</div>
@ -238,4 +238,4 @@
}
});
</script>
{% endblock %}
{% endblock %}

Loading…
Cancel
Save