Exemplo n.º 1
0
 def save(self, *args, **kwargs):
     self.SEOTitle = self.normalize_SEO(
         'Продажа в новострое по {0} район {1} ценна {2} в {3}'.format(
             self.address or '', self.district or '', self.price or '',
             SettingsAddress.get_solo().city_plural or ''))
     self.SEODescription = self.normalize_SEO(
         'Продажа в новострое по {0} район {1} в {2}'.format(
             self.address or '', self.district or '',
             SettingsAddress.get_solo().city_plural or ''))
     self.SEOKeywords = self.SEODescription
     super(NewBuilding, self).save(*args, **kwargs)
Exemplo n.º 2
0
 def save(self, *args, **kwargs):
     self.SEOTitle = self.normalize_SEO(
         'Аренда {0} комнаты по {1} ценна {2} в {3}'.format(
             self.rooms or '', self.address or '', self.price or '',
             SettingsAddress.get_solo().city_plural or ''))
     self.SEODescription = self.normalize_SEO(
         'Аренда {0} комнаты по {1} район {2} в {3}'.format(
             self.rooms or '', self.address or '', self.district or '',
             SettingsAddress.get_solo().city_plural or ''))
     self.SEOKeywords = self.SEODescription
     super(Daily, self).save(*args, **kwargs)
Exemplo n.º 3
0
 def save(self, *args, **kwargs):
     self.SEOTitle = self.normalize_SEO(
         'Участок {0} по {1} район {2} ценна {3} в {4}'.format(
             self.get_type_area_display() or '', self.address or '',
             self.district or '', self.price or '',
             SettingsAddress.get_solo().city_plural or ''))
     self.SEODescription = self.normalize_SEO(
         'Участок {0}  в новострое по {1} район {2} в {3}'.format(
             self.get_type_area_display() or '', self.address or '',
             self.district or '',
             SettingsAddress.get_solo().city_plural or ''))
     self.SEOKeywords = self.SEODescription
     super(Earth, self).save(*args, **kwargs)
Exemplo n.º 4
0
Arquivo: views.py Projeto: varunok/gek
 def get_context_data(self, **kwargs):
     context = super(Superlending, self).get_context_data(**kwargs)
     self.queryFilter = queryFilter = HelperFilter(self.request).qd
     context['indexpagemodel'] = IndexPageModel.get_solo()
     context['service_rieltor'] = ServicesRieltor.get_solo()
     context['trust'] = TrustPageModel.get_solo()
     context['city_plural'] = SettingsAddress.get_solo().city_plural
     context['BASE_URL'] = '/search'
     if queryFilter:
         buildings = list(
             FilterBuilding(queryFilter,
                            queryset=Building.objects.all()).qs)
         offices = list(
             FilterOfise(queryFilter, queryset=Ofice.objects.all()).qs)
         daily = list(
             FilterDaily(queryFilter, queryset=Daily.objects.all()).qs)
         context['filter_results'] = buildings + daily + offices
         context['filtering'] = True
         context['form'] = LandingForms(queryFilter)
     else:
         context['results'] = self.get_queryset()
         context['form'] = LandingForms()
     try:
         context['faqs'] = ServicesRieltor.get_solo().f*g.all().order_by(
             'id')
     except AttributeError:
         pass
     return context
Exemplo n.º 5
0
 def save(self, *args, **kwargs):
     self.SEOTitle = self.normalize_SEO(
         '{0} {1} по {2} ценна {3} в {4}'.format(
             self.get_type_deal_display() or '',
             self.get_appointment_display() or '', self.address or '',
             self.price or '',
             SettingsAddress.get_solo().city_plural or ''))
     self.SEODescription = self.normalize_SEO(
         '{0} {1} {2} по {3} район {4}'.format(
             self.title or '',
             self.get_type_deal_display() or '',
             self.get_appointment_display() or '', self.address or '',
             self.district or ''))
     self.SEOKeywords = self.SEODescription
     super(Ofice, self).save(*args, **kwargs)
Exemplo n.º 6
0
def email():
    return SettingsAddress.get_solo().email or ''
Exemplo n.º 7
0
def address():
    return SettingsAddress.get_solo().address or ''
Exemplo n.º 8
0
def city():
    return SettingsAddress.get_solo().city or ''
Exemplo n.º 9
0
def phone():
    return SettingsAddress.get_solo().phone or ''
Exemplo n.º 10
0
 def get_city(self):
     if SettingsAddress.get_solo().city:
         return SettingsAddress.get_solo().city.strip('.г')
     return ''
Exemplo n.º 11
0
 def get_object(self, queryset=None):
     return SettingsAddress.get_solo()