merge conflict

remotes/origin/stage5
ya_dim4ik 10 years ago
commit 51831d453b
  1. 7
      accounts/forms.py
  2. 35
      accounts/views.py
  3. 561
      conference/migrations/0004_auto__add_field_conference_members_choice.py
  4. 10
      conference/models.py
  5. 5
      conference/search_indexes.py
  6. 102
      conference/urls.py
  7. 48
      events/common.py
  8. 537
      events/forms.py
  9. 0
      events/management/__init__.py
  10. 0
      events/management/commands/__init__.py
  11. 71
      events/management/commands/update_events_filter_fields.py
  12. 620
      exposition/migrations/0003_auto__add_field_exposition_members_choice.py
  13. 11
      exposition/models.py
  14. 5
      exposition/search_indexes.py
  15. 100
      exposition/urls.py
  16. 1
      functions/model_utils.py
  17. 8
      functions/search_mixin.py
  18. 14
      meta/models.py
  19. 4
      place_conference/search_indexes.py
  20. 4
      place_exposition/urls.py
  21. 65
      proj/middleware.py
  22. 206
      schema_new.xml
  23. 3
      settings/old_urls.py
  24. 33
      settings/redirect_views.py
  25. 17
      static/client/css/main.css
  26. 2
      static/client/css_min/main.min.css
  27. 2
      support/dev/settings.py
  28. 9
      support/prod/settings.py
  29. 2
      templates/c_admin/newsletters/popup_count.html
  30. 2
      templates/client/article/news.html
  31. 4
      templates/client/includes/booking_block.html
  32. 16
      templates/client/includes/conference/conference_object.html
  33. 16
      templates/client/includes/conference/conference_paid.html
  34. 2
      templates/client/includes/events/filter_form.html
  35. 16
      templates/client/includes/exposition/expo_paid.html
  36. 16
      templates/client/includes/exposition/exposition_object.html
  37. 2
      templates/client/includes/header.html
  38. 4
      templates/client/includes/place/place_object.html
  39. 2
      templates/client/popups/advertise_member.html
  40. 1
      templates/client/search/indexes/place_conference/placeconference_text.txt

@ -249,10 +249,11 @@ class RegistrationCompleteForm(forms.ModelForm):
try: try:
User.objects.get(url=url) User.objects.get(url=url)
User.objects.get(id=int(url)) User.objects.get(id=int(url))
except (User.DoesNotExist, ValueError, ): except (User.DoesNotExist,):
return url return url
else: except (ValueError, ):
raise forms.ValidationError(_(u'Пользователь с таким url уже существует')) pass
raise forms.ValidationError(_(u'Пользователь с таким url уже существует'))
class SocialRegistrationCompleteForm(RegistrationCompleteForm): class SocialRegistrationCompleteForm(RegistrationCompleteForm):

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

@ -0,0 +1,561 @@
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Conference.members_choice'
db.add_column(u'conference_conference', 'members_choice',
self.gf('django.db.models.fields.PositiveSmallIntegerField')(null=True, blank=True),
keep_default=False)
# Adding field 'Conference.visitors_choice'
db.add_column(u'conference_conference', 'visitors_choice',
self.gf('django.db.models.fields.PositiveSmallIntegerField')(null=True, blank=True),
keep_default=False)
# Adding field 'Conference.price_choice'
db.add_column(u'conference_conference', 'price_choice',
self.gf('django.db.models.fields.PositiveSmallIntegerField')(null=True, blank=True),
keep_default=False)
def backwards(self, orm):
# Deleting field 'Conference.members_choice'
db.delete_column(u'conference_conference', 'members_choice')
# Deleting field 'Conference.visitors_choice'
db.delete_column(u'conference_conference', 'visitors_choice')
# Deleting field 'Conference.price_choice'
db.delete_column(u'conference_conference', 'price_choice')
models = {
u'accounts.user': {
'Meta': {'ordering': "['-rating']", 'object_name': 'User'},
'blocked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'company': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'users'", 'null': 'True', 'to': u"orm['company.Company']"}),
'date_joined': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'date_registered': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'db_index': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_admin': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'organiser': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['organiser.Organiser']", 'unique': 'True', 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'position': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'rating': ('django.db.models.fields.IntegerField', [], {'default': '100'}),
'translator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': u"orm['translator.Translator']", 'blank': 'True', 'unique': 'True'}),
'url': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'blank': 'True'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'})
},
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'city.city': {
'Meta': {'unique_together': '()', 'object_name': 'City', 'index_together': '()'},
'code_IATA': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['directories.Iata']", 'null': 'True', 'blank': 'True'}),
'country': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'cities'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': u"orm['country.Country']"}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'inflect': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'old_url': ('django.db.models.fields.CharField', [], {'max_length': '55'}),
'phone_code': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'population': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'services': ('django.db.models.fields.BigIntegerField', [], {'default': 'None'}),
'url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'})
},
u'company.company': {
'Meta': {'ordering': "['-rating', 'id']", 'unique_together': '()', 'object_name': 'Company', 'index_together': '()'},
'address': ('functions.custom_fields.LocationField', [], {'blank': 'True'}),
'blocked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'city': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'companies'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': u"orm['city.City']"}),
'country': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'companies'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': u"orm['country.Country']"}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created_company'", 'null': 'True', 'to': u"orm['accounts.User']"}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'facebook': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'fax': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
'foundation': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'linkedin': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'phone': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
'rating': ('django.db.models.fields.IntegerField', [], {'default': '100'}),
'staff_number': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'tag': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'companies'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['theme.Tag']"}),
'theme': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'companies'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['theme.Theme']"}),
'twitter': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'url': ('django.db.models.fields.SlugField', [], {'max_length': '255'}),
'vk': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'web_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
},
u'conference.conference': {
'Meta': {'unique_together': '()', 'object_name': 'Conference', 'index_together': '()'},
'audience': ('django.db.models.fields.BigIntegerField', [], {'default': 'None'}),
'bad_url': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'canceled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'canceled_by_administrator': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'city': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'conference_city'", 'on_delete': 'models.PROTECT', 'to': u"orm['city.City']"}),
'company': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'conference_companies'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['company.Company']"}),
'country': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'conference_country'", 'on_delete': 'models.PROTECT', 'to': u"orm['country.Country']"}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'currency': ('functions.custom_fields.EnumField', [], {'default': "'RUB'", 'values': "('RUB', 'USD', 'EUR', 'RMB', 'GBP', 'AED', 'SGD', 'TRY', 'CZK', 'CHF', 'SEK', 'LKR', 'UAH', 'IDR', 'PLN', 'JPY')"}),
'data_begin': ('django.db.models.fields.DateField', [], {}),
'data_end': ('django.db.models.fields.DateField', [], {}),
'discount': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'expohit': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'foundation_year': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_published': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'link': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'blank': 'True'}),
'main': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['expobanner.MainPage']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'main_page': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
'max_price': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'members': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'members_choice': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'min_price': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'moved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'old_url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
'org': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'organiser': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'conference_organisers'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['organiser.Organiser']"}),
'paid_new': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['expobanner.Paid']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'periodic': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
'photogallery': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['photologue.Gallery']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'place': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'conference_place'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': u"orm['place_conference.PlaceConference']"}),
'place_alt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'price_choice': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'quality_label': ('django.db.models.fields.BigIntegerField', [], {'default': 'None'}),
'rating': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
'services': ('django.db.models.fields.BigIntegerField', [], {'default': 'None'}),
'tag': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'conference_tags'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['theme.Tag']"}),
'tax': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'theme': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'conference_themes'", 'symmetrical': 'False', 'to': u"orm['theme.Theme']"}),
'url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
'users': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'conference_users'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['accounts.User']"}),
'views': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'visitors': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'visitors_choice': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'web_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
},
u'conference.conferencetranslation': {
'Meta': {'unique_together': "[('language_code', 'master')]", 'object_name': 'ConferenceTranslation', 'db_table': "u'conference_conference_translation'", 'index_together': '()'},
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'descriptions': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
'discount_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'keywords': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
'language_code': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'main_themes': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'main_title': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'master': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'translations'", 'null': 'True', 'to': u"orm['conference.Conference']"}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'time': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '250'})
},
u'conference.statistic': {
'Meta': {'unique_together': '()', 'object_name': 'Statistic', 'index_together': '()'},
'area': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'conference': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statistic'", 'to': u"orm['conference.Conference']"}),
'countries_number': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'members': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'visitors': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'year': ('django.db.models.fields.PositiveIntegerField', [], {})
},
u'conference.statistictranslation': {
'Meta': {'unique_together': "[('language_code', 'master')]", 'object_name': 'StatisticTranslation', 'db_table': "u'conference_statistic_translation'", 'index_together': '()'},
'countries': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language_code': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'master': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'translations'", 'null': 'True', 'to': u"orm['conference.Statistic']"})
},
u'conference.timetable': {
'Meta': {'unique_together': '()', 'object_name': 'TimeTable', 'index_together': '()'},
'begin': ('django.db.models.fields.DateTimeField', [], {}),
'conference': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'business_program'", 'to': u"orm['conference.Conference']"}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'end': ('django.db.models.fields.DateTimeField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'timetable_organiser': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'conf_timetable'", 'null': 'True', 'to': u"orm['organiser.Organiser']"})
},
u'conference.timetabletranslation': {
'Meta': {'unique_together': "[('language_code', 'master')]", 'object_name': 'TimeTableTranslation', 'db_table': "u'conference_timetable_translation'", 'index_together': '()'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language_code': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'master': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'translations'", 'null': 'True', 'to': u"orm['conference.TimeTable']"}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'place': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'programe': ('django.db.models.fields.TextField', [], {}),
'speaker': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
},
u'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
u'country.area': {
'Meta': {'ordering': "['translations__name']", 'unique_together': '()', 'object_name': 'Area', 'index_together': '()'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
},
u'country.country': {
'Meta': {'ordering': "['translations__name']", 'unique_together': '()', 'object_name': 'Country', 'index_together': '()'},
'area': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['country.Area']"}),
'big_cities': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'cities'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['city.City']"}),
'capital': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'capital'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': u"orm['city.City']"}),
'country_code': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'currency': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['directories.Currency']", 'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'inflect': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'language': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['directories.Language']", 'null': 'True', 'blank': 'True'}),
'latitude': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'blank': 'True'}),
'longitude': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'old_url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '55'}),
'phone_code': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'population': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'services': ('django.db.models.fields.BigIntegerField', [], {'default': 'None'}),
'teritory': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'time_delivery': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'timezone': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
'url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'})
},
u'directories.currency': {
'Meta': {'unique_together': '()', 'object_name': 'Currency', 'index_together': '()'},
'code': ('django.db.models.fields.CharField', [], {'max_length': '3'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
},
u'directories.iata': {
'Meta': {'object_name': 'Iata'},
'airport': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'code': ('django.db.models.fields.CharField', [], {'max_length': '4'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
},
u'directories.language': {
'Meta': {'unique_together': '()', 'object_name': 'Language', 'index_together': '()'},
'code': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'expobanner.banner': {
'Meta': {'ordering': "['sort']", 'object_name': 'Banner'},
'alt': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'cookie': ('django.db.models.fields.CharField', [], {'default': "'expo_b_default_popup'", 'max_length': '30', 'null': 'True', 'blank': 'True'}),
'country': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['country.Country']", 'null': 'True', 'blank': 'True'}),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'customer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['expobanner.Customer']", 'null': 'True', 'blank': 'True'}),
'flash': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'fr': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2016, 8, 4, 0, 0)'}),
'group': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'banners'", 'null': 'True', 'to': u"orm['expobanner.BannerGroup']"}),
'html': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'img': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
'link': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'often': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '1'}),
'paid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'popup': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'sort': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '500'}),
'stat_pswd': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'text': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'theme': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['theme.Theme']", 'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'to': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'url': ('django.db.models.fields.CharField', [], {'max_length': '1024'}),
'urls': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'url_banners'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['expobanner.URL']"})
},
u'expobanner.bannergroup': {
'Meta': {'ordering': "['name']", 'object_name': 'BannerGroup'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'height': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '0'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
'speed': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '2000'}),
'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '0'})
},
u'expobanner.customer': {
'Meta': {'ordering': "['name']", 'object_name': 'Customer'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
u'expobanner.mainpage': {
'Meta': {'ordering': "['-public']", 'object_name': 'MainPage'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['expobanner.Banner']"}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'position': ('django.db.models.fields.PositiveIntegerField', [], {'default': '2', 'null': 'True', 'blank': 'True'}),
'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'stat_pswd': ('django.db.models.fields.CharField', [], {'max_length': '16'})
},
u'expobanner.paid': {
'Meta': {'ordering': "['-public']", 'object_name': 'Paid'},
'catalog': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'paid_catalog'", 'to': u"orm['expobanner.Banner']"}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'kind': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '1', 'db_index': 'True'}),
'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'official': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'paid_official'", 'to': u"orm['expobanner.Banner']"}),
'organiser': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
'participation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'paid_participation'", 'null': 'True', 'to': u"orm['expobanner.Banner']"}),
'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'stat_pswd': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'tickets': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'paid_tickets'", 'to': u"orm['expobanner.Banner']"})
},
u'expobanner.url': {
'Meta': {'ordering': "['-created_at']", 'object_name': 'URL'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'regex': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'sites': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'site_urls'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['sites.Site']"}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'url': ('django.db.models.fields.CharField', [], {'max_length': '2048'})
},
u'file.filemodel': {
'Meta': {'unique_together': '()', 'object_name': 'FileModel', 'index_together': '()'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']", 'null': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'file_path': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
'file_type': ('functions.custom_fields.EnumField', [], {'default': "'PDF'", 'values': "('PDF', 'DOC', 'TXT', 'OTHER', 'JPG', 'BMP', 'PNG', 'GIF')", 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'img_height': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'img_width': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'purpose': ('functions.custom_fields.EnumField', [], {'default': "'photo'", 'values': "['photo', 'flat', 'logo', 'map', 'scheme teritory', 'diplom', 'preview', 'preview2']"})
},
u'note.note': {
'Meta': {'object_name': 'Note'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']", 'null': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
'text': ('django.db.models.fields.TextField', [], {}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['accounts.User']"})
},
u'organiser.organiser': {
'Meta': {'unique_together': '()', 'object_name': 'Organiser', 'index_together': '()'},
'active': ('django.db.models.fields.NullBooleanField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
'address': ('functions.custom_fields.LocationField', [], {'null': 'True', 'blank': 'True'}),
'city': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['city.City']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
'country': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['country.Country']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'events_number': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'facebook': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'fax': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
'foundation': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'linkedin': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'phone': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
'place_conference': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'organiser_place_conference'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['place_conference.PlaceConference']"}),
'place_exposition': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'organiser_place_exposition'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['place_exposition.PlaceExposition']"}),
'rating': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'staff_number': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'tag': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['theme.Tag']", 'null': 'True', 'blank': 'True'}),
'theme': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['theme.Theme']", 'null': 'True', 'blank': 'True'}),
'twitter': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'url': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'blank': 'True'}),
'vk': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'web_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
},
u'photologue.gallery': {
'Meta': {'ordering': "['-date_added']", 'unique_together': '()', 'object_name': 'Gallery', 'index_together': '()'},
'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'photos': ('sortedm2m.fields.SortedManyToManyField', [], {'blank': 'True', 'related_name': "'galleries'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['photologue.Photo']"}),
'sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['sites.Site']", 'null': 'True', 'blank': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '200'}),
'tags': ('photologue.models.TagField', [], {'max_length': '255', 'blank': 'True'})
},
u'photologue.photo': {
'Meta': {'ordering': "['sort']", 'unique_together': '()', 'object_name': 'Photo', 'index_together': '()'},
'crop_from': ('django.db.models.fields.CharField', [], {'default': "'center'", 'max_length': '10', 'blank': 'True'}),
'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'date_taken': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'effect': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'photo_related'", 'null': 'True', 'to': u"orm['photologue.PhotoEffect']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['sites.Site']", 'null': 'True', 'blank': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '200'}),
'sort': ('django.db.models.fields.PositiveIntegerField', [], {'default': '10', 'null': 'True', 'db_index': 'True'}),
'tags': ('photologue.models.TagField', [], {'max_length': '255', 'blank': 'True'}),
'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['photologue.UserMark']", 'null': 'True', 'symmetrical': 'False'}),
'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})
},
u'photologue.photoeffect': {
'Meta': {'object_name': 'PhotoEffect'},
'background_color': ('django.db.models.fields.CharField', [], {'default': "'#FFFFFF'", 'max_length': '7'}),
'brightness': ('django.db.models.fields.FloatField', [], {'default': '1.0'}),
'color': ('django.db.models.fields.FloatField', [], {'default': '1.0'}),
'contrast': ('django.db.models.fields.FloatField', [], {'default': '1.0'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'filters': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
'reflection_size': ('django.db.models.fields.FloatField', [], {'default': '0'}),
'reflection_strength': ('django.db.models.fields.FloatField', [], {'default': '0.6'}),
'sharpness': ('django.db.models.fields.FloatField', [], {'default': '1.0'}),
'transpose_method': ('django.db.models.fields.CharField', [], {'max_length': '15', 'blank': 'True'})
},
u'photologue.usermark': {
'Meta': {'object_name': 'UserMark'},
'height': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'left': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
'top': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'marks'", 'to': u"orm['accounts.User']"}),
'width': ('django.db.models.fields.PositiveSmallIntegerField', [], {})
},
u'place_conference.placeconference': {
'Meta': {'unique_together': '()', 'object_name': 'PlaceConference', 'index_together': '()'},
'address': ('functions.custom_fields.LocationField', [], {}),
'amount_halls': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'banquet_hall': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'catering': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'city': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'place_conferences'", 'on_delete': 'models.PROTECT', 'to': u"orm['city.City']"}),
'conference_call': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'country': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['country.Country']", 'on_delete': 'models.PROTECT'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'exp_hall_area': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'exposition_hall': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'fax': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
'foundation_year': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'hotel': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'multimedia_equipment': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'phone': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
'total_capacity': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'translate_equipment': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'type': ('functions.custom_fields.EnumField', [], {'default': "'Convention centre'", 'values': "['Convention centre', 'Exposition centre']"}),
'url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
'video_link': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'views': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'virtual_tour': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'web_page': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'wifi': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'})
},
u'place_exposition.placeexposition': {
'Meta': {'ordering': "['-rating', 'id']", 'unique_together': '()', 'object_name': 'PlaceExposition', 'index_together': '()'},
'address': ('functions.custom_fields.LocationField', [], {}),
'bank': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'business_centre': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'cafe': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'children_room': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'city': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'place_expositions'", 'on_delete': 'models.PROTECT', 'to': u"orm['city.City']"}),
'closed_area': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'conference_centre': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'country': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['country.Country']", 'on_delete': 'models.PROTECT'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'disabled_service': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'event_in_year': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'fax': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
'foundation_year': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_published': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'blank': 'True'}),
'mobile_application': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'online_registration': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'open_area': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'parking': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'partner': ('django.db.models.fields.NullBooleanField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
'phone': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
'photogallery': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['photologue.Gallery']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'press_centre': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'rating': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'terminals': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'total_area': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'total_halls': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'total_pavilions': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'type': ('functions.custom_fields.EnumField', [], {'default': "'Exposition complex'", 'values': "['Exposition complex', 'Convention centre', 'Exposition centre']"}),
'url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
'views': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'virtual_tour': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'web_page': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'wifi': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'})
},
u'sites.site': {
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'theme.tag': {
'Meta': {'unique_together': '()', 'object_name': 'Tag', 'index_together': '()'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'inflect': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'old_url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
'theme': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tags'", 'on_delete': 'models.PROTECT', 'to': u"orm['theme.Theme']"}),
'url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'})
},
u'theme.theme': {
'Meta': {'unique_together': '()', 'object_name': 'Theme', 'index_together': '()'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'inflect': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'main_page_conf': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
'main_page_expo': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
'old_url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
'types': ('django.db.models.fields.BigIntegerField', [], {'default': 'None'}),
'url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'})
},
u'translator.translator': {
'Meta': {'unique_together': '()', 'object_name': 'Translator', 'index_together': '()'},
'birth': ('django.db.models.fields.DateField', [], {}),
'car': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'gender': ('functions.custom_fields.EnumField', [], {'default': "'male'", 'values': "('male', 'female')"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
}
}
complete_apps = ['conference']

@ -22,6 +22,8 @@ from functions.translate import fill_with_signal
from hvad.models import TranslatableModel, TranslatedFields, TranslationManager from hvad.models import TranslatableModel, TranslatedFields, TranslationManager
from photologue.models import Gallery from photologue.models import Gallery
from service.models import Service from service.models import Service
from events.common import MEMBERS, VISITORS, PRICE
# check if table exist and create flags if true # check if table exist and create flags if true
#flags = [item.url for item in Service.objects.all()] if db_table_exists('service_service') else [] #flags = [item.url for item in Service.objects.all()] if db_table_exists('service_service') else []
@ -125,6 +127,14 @@ class Conference(TranslatableModel, EventMixin, ExpoMixin):
views = models.PositiveIntegerField(default=0) views = models.PositiveIntegerField(default=0)
# fields for filter easy
members_choice = models.PositiveSmallIntegerField(
_(u'Участники'), choices=MEMBERS, blank=True, null=True)
visitors_choice = models.PositiveSmallIntegerField(
_(u'Посетители'), choices=VISITORS, blank=True, null=True)
price_choice = models.PositiveSmallIntegerField(
_(u'Минимальная цена'), choices=PRICE, blank=True, null=True)
def __unicode__(self): def __unicode__(self):
return self.lazy_translation_getter('name', unicode(self.pk)) return self.lazy_translation_getter('name', unicode(self.pk))

@ -23,6 +23,11 @@ class ConferenceIndex(indexes.SearchIndex, indexes.Indexable, ExpoSearchMixin):
catalog_name_en = indexes.CharField() catalog_name_en = indexes.CharField()
catalog_name_ru = indexes.CharField() catalog_name_ru = indexes.CharField()
# fields for filter easy
members_choice = indexes.IntegerField()
visitors_choice = indexes.IntegerField()
price_choice = indexes.IntegerField()
def prepare_form_name(self, obj): def prepare_form_name(self, obj):
return None return None

@ -23,81 +23,81 @@ from .views import (
urlpatterns = patterns('', 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-add-calendar/(?P<id>\d+)/$', 'conference.views.conference_add_calendar'),
url(r'^conference-visit/(?P<id>\d+)/$', 'conference.views.conference_visit'), url(r'^conference-visit/(?P<id>\d+)/$', 'conference.views.conference_visit'),
# search # search
url(r'^conference/search/', ExpositionSearchView.as_view()), url(r'^conference/search/', ExpositionSearchView.as_view()),
# country catalog # country catalog
url(r'^conference/country/$', ConferenceByCountry.as_view(), {'meta_id':51}), 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+)/(?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>[^/]*)/(?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>[^/]*)/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+)/(?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>[^/]*)/(?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>[^/]*)/$', ConferenceCountryCatalog.as_view(), {'meta_id':23}, name='conf_country'),
# city catalog # city catalog
url(r'^conference/city/$', ConferenceByCity.as_view(), {'meta_id':52}), 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+)/(?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>[^/]*)/(?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>[^/]*)/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+)/(?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>[^/]*)/(?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>[^/]*)/$', ConferenceCityCatalog.as_view(), {'meta_id':26}, name='conf_city'),
# theme catalog # theme catalog
url(r'^conference/theme/$', ConferenceByTheme.as_view(), {'meta_id':50}), 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+)/(?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+)/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>[^/]*)/(?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>[^/]*)/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>[^/]*)/(?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>[^/]*)/$', 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>[^/]*)/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+)/(?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+)/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>[^/]*)/(?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>.*)/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>[^/]*)/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+)/(?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>[^/]*)/(?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>[^/]*)/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+)/(?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>[^/]*)/(?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>[^/]*)/$', ConferenceThemeCatalog.as_view(), {'meta_id':29}),
# tag catalog # tag catalog
url(r'^conference/tag/$', ConferenceByTag.as_view(), {'meta_id':50}), 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+)/(?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>[^/]*)/(?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>[^/]*)/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+)/(?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>[^/]*)/(?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>[^/]*)/$', ConferenceTagCatalog.as_view(), {'meta_id':32}),
# conf additional pages # conf additional pages
url(r'^conference/(?P<slug>.*)/send_to_organiser/$', 'conference.views.send_to_organiser'), 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/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>[^/]*)/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/page/(?P<page>\d+)/$', ConferenceVisitors.as_view()),
url(r'^conference/(?P<slug>.*)/visitors/$', 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/page/(?P<page>\d+)/$', ConferenceMembers.as_view()),
url(r'^conference/(?P<slug>.*)/members/$', 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/thanks/', ConferenceThankView.as_view()),
url(r'^conference/(?P<slug>.*)/service/visit/', 'conference.views.visit_redirect'), 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 # 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+)/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/(?P<year>\d+)/$', ConferenceList.as_view(), {'meta_id':21}),
url(r'^conference/page/(?P<page>\d+)/$', ConferenceList.as_view(), {'meta_id':20}), url(r'^conference/page/(?P<page>\d+)/$', ConferenceList.as_view(), {'meta_id':20}),
# conf page # 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}), url(r'^conference/$', ConferenceList.as_view(), {'meta_id':20}),
) )

@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
from collections import OrderedDict
from django.utils.translation import ugettext as _
from functions.model_utils import EnumChoices
members_mapping = OrderedDict(
N200={'min': None, 'max': 200, 'value': 1, 'label': _(u'до 200')},
N200500={'min': 201, 'max': 500, 'value': 2, 'label': _(u'201-500')},
N5001000={'min': 501, 'max': 1000, 'value': 3, 'label': _(u'501-1000')},
N10002000={'min': 1001, 'max': 2000, 'value': 4, 'label': _(u'1001-2000')},
N2000={'min': 2001, 'max': None, 'value': 5, 'label': _(u'более 2000')},
)
visitors_mapping = OrderedDict(
N5={'min': None, 'max': 5000, 'value': 1, 'label': _(u'до 5 000')},
N510={'min': 5001, 'max': 10000, 'value': 2, 'label': _(u'5 001 - 10 000')},
N1030={'min': 10001, 'max': 30000, 'value': 3, 'label': _(u'10 001 - 30 000')},
N3050={'min': 30001, 'max': 50000, 'value': 4, 'label': _(u'30 001 - 50 000')},
N50100={'min': 50001, 'max': 100000, 'value': 5, 'label': _(u'50 001 - 100 000')},
N100={'min': 100001, 'max': None, 'value': 6, 'label': _(u'более 100 000')},
)
price_mapping = OrderedDict(
N1={'min': None, 'max': 100, 'value': 1, 'label': _(u'до 100 евро')},
N12={'min': 101, 'max': 200, 'value': 2, 'label': _(u'100-200 евро')},
N24={'min': 201, 'max': 400, 'value': 3, 'label': _(u'200-400 евро')},
N4={'min': 401, 'max': None, 'value': 4, 'label': _(u'более 400 евро')},
)
def get_choices_kwargs(mapping):
kwargs = {}
for key, val in mapping.iteritems():
kwargs[key] = (val.get('value'), val.get('label'))
return kwargs
MEMBERS = EnumChoices(**get_choices_kwargs(members_mapping))
VISITORS = EnumChoices(**get_choices_kwargs(visitors_mapping))
PRICE = EnumChoices(**get_choices_kwargs(price_mapping))
# N200=(1, _(u'до 200')),
# N200500=(2, _(u'200-500')),
# N5001000=(3, _(u'500-1000')),
# N10002000=(4, _(u'1000-2000')),
# N2000=(5, _(u'более 2000')),
# )

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from itertools import chain from itertools import chain
from collections import namedtuple
try: try:
from collections import ChainMap from collections import ChainMap
except ImportError: except ImportError:
@ -11,10 +12,10 @@ from django.utils.translation import get_language, ugettext as _
from django.utils.encoding import smart_text, force_text from django.utils.encoding import smart_text, force_text
from django.utils.html import format_html from django.utils.html import format_html
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe
from django.db.models import Count, Sum, Q from django.db.models import Count, Sum, Q, ForeignKey, ManyToManyField
from django.db import connection
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
from haystack.query import SearchQuerySet, RelatedSearchQuerySet, SQ
from haystack.query import SearchQuerySet, RelatedSearchQuerySet
from functions.model_utils import EnumChoices from functions.model_utils import EnumChoices
from exposition.models import Exposition from exposition.models import Exposition
@ -22,18 +23,8 @@ from conference.models import Conference
from theme.models import Theme, Tag from theme.models import Theme, Tag
from country.models import Country from country.models import Country
from city.models import City from city.models import City
from events.common import MEMBERS, VISITORS, PRICE
from events.common import members_mapping, visitors_mapping, price_mapping
# class CountModelChoiceField(forms.ModelChoiceField):
# def prepare_value(self, value):
# if hasattr(value, '_meta'):
# if self.to_field_name:
# return value.serializable_value(self.to_field_name)
# else:
# return value.pk
# elif isinstance(value, dict):
# return value.get('pk')
# return super(CountModelChoiceField, self).prepare_value(value)
class CountModelMultipleChoiceField(forms.ModelMultipleChoiceField): class CountModelMultipleChoiceField(forms.ModelMultipleChoiceField):
@ -72,69 +63,31 @@ class CountModelMultipleChoiceField(forms.ModelMultipleChoiceField):
return pks return pks
### Делаем выборку по темам, сразу заполняя перевод и кол-во событиый fields_mapping = {
## 1-й рабочий способ (без заполнения перевода) 'members': 'members_choice',
# """ 'visitors': 'visitors_choice',
# SELECT 'price': 'price_choice',
# `theme_theme`.`id`, }
# (
# SELECT COUNT(`exposition_exposition_theme`.`exposition_id`)
# FROM `exposition_exposition_theme`
# WHERE (`theme_theme`.`id` = `exposition_exposition_theme`.`theme_id`)
# ) AS `e_count`,
# (
# SELECT COUNT(`conference_conference_theme`.`conference_id`)
# FROM `conference_conference_theme`
# WHERE (`theme_theme`.`id` = `conference_conference_theme`.`theme_id`)
# ) AS `c_count`,
# `theme_theme_translation`.`name` as `name`
# FROM
# `theme_theme`
# GROUP BY `theme_theme`.`id`
# ORDER BY NULL
# """
## 2-й рабочий способ (с заполнением перевода) values_mapping = {
## аттрибут перевода 'name' присвоен на 'name_t', чтобы не ругалось на неправильно заполненый перевод 'members_choice': members_mapping,
# theme_sql = \ 'visitors_choice': visitors_mapping,
# """ 'price_choice': price_mapping,
# SELECT
# `theme_theme_translation`.`name` AS `name_t`, }
# `theme_theme_translation`.`master_id` AS `id`,
# (
# SELECT COUNT(`exposition_exposition_theme`.`exposition_id`)
# FROM `exposition_exposition_theme`
# WHERE (`theme_theme_translation`.`master_id` = `exposition_exposition_theme`.`theme_id`)
# ) AS `e_count`,
# (
# SELECT COUNT(`conference_conference_theme`.`conference_id`)
# FROM `conference_conference_theme`
# WHERE (`theme_theme_translation`.`master_id` = `conference_conference_theme`.`theme_id`)
# ) AS `c_count`
# FROM
# `theme_theme_translation`
# WHERE (`theme_theme_translation`.`language_code` = 'ru')
# GROUP BY `theme_theme_translation`.`name`
# ORDER BY NULL
# """
# qs = Theme.objects.raw(theme_sql)
_theme_expo_count = '''SELECT COUNT(`exposition_exposition_theme`.`exposition_id`) FROM `exposition_exposition_theme` '''
theme_expo_count = _theme_expo_count + ''' WHERE (`theme_theme`.`id` = `exposition_exposition_theme`.`theme_id`) '''
theme_expo_count_selected = theme_expo_count + ''' WHERE (`theme_theme`.`id` = `exposition_exposition_theme`.`theme_id` AND `exposition_exposition_theme`.`exposition_id` in {ids})'''
_theme_conf_count = '''SELECT COUNT(`conference_conference_theme`.`conference_id`) FROM `conference_conference_theme` '''
theme_conf_count = _theme_conf_count + ''' WHERE (`theme_theme`.`id` = `conference_conference_theme`.`theme_id`) '''
theme_conf_count_selected = _theme_conf_count + ''' WHERE (`theme_theme`.`id` = `conference_conference_theme`.`theme_id` AND `conference_conference_theme`.`conference_id` in {ids})'''
tag_expo_count = '''SELECT COUNT(`exposition_exposition_tag`.`exposition_id`) FROM `exposition_exposition_tag` WHERE (`theme_tag`.`id` = `exposition_exposition_tag`.`tag_id`) '''
tag_conf_count = '''SELECT COUNT(`conference_conference_tag`.`conference_id`) FROM `conference_conference_tag` WHERE (`theme_tag`.`id` = `conference_conference_tag`.`tag_id`) '''
class FilterForm(forms.Form): class FilterForm(forms.Form):
TYPES = EnumChoices( TYPES = EnumChoices(
EXPO=(1, _(u'Выставки')), EXPO=(1, _(u'Выставки')),
CONF=(2, _(_(u'Конференции'))), CONF=(2, _(_(u'Конференции'))),
) )
# MEMBERS = MEMBERS
model = forms.TypedMultipleChoiceField(label=_(u'Тип события'), coerce=int, choices=TYPES, required=False, widget=forms.CheckboxSelectMultiple()) # VISITORS = VISITORS
# PRICE = PRICE
model = forms.TypedMultipleChoiceField(
label=_(u'Тип события'), coerce=int,
choices=TYPES, required=False, widget=forms.CheckboxSelectMultiple())
theme = CountModelMultipleChoiceField( theme = CountModelMultipleChoiceField(
label=_(u'Тематики'), required=False, label=_(u'Тематики'), required=False,
queryset=Theme.objects.language().values('pk', 'name')) queryset=Theme.objects.language().values('pk', 'name'))
@ -147,12 +100,28 @@ class FilterForm(forms.Form):
city = CountModelMultipleChoiceField( city = CountModelMultipleChoiceField(
label=_(u'Города'), required=False, label=_(u'Города'), required=False,
queryset=City.objects.language().values('pk', 'name')) queryset=City.objects.language().values('pk', 'name'))
price = forms.TypedMultipleChoiceField(
label=_(u'Стоимость'), coerce=int,
choices=PRICE,
required=False, widget=forms.CheckboxSelectMultiple(),
help_text=_(u'За 1 м<sub>2</sub> необорудованной площади'))
members = forms.TypedMultipleChoiceField(
label=_(u'Участники'), coerce=int,
choices=MEMBERS,
required=False, widget=forms.CheckboxSelectMultiple())
visitors = forms.TypedMultipleChoiceField(
label=_(u'Посетители'), coerce=int,
choices=VISITORS,
required=False, widget=forms.CheckboxSelectMultiple())
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super(FilterForm, self).__init__(*args, **kwargs) super(FilterForm, self).__init__(*args, **kwargs)
self._is_valid = False self._is_valid = False
self._models = None self._models = None
self._lookup_kwargs = None self._lookup_kwargs = None
self._lookup_args = None
self.lang = get_language()
# self.db_cursor = connection.cursor()
# self.selected_filter_data = {} # self.selected_filter_data = {}
# self.fields['theme'].queryset = self.get_theme_choices() # self.fields['theme'].queryset = self.get_theme_choices()
# self.fields['tag'].queryset = self.get_tag_choices() # self.fields['tag'].queryset = self.get_tag_choices()
@ -163,7 +132,7 @@ class FilterForm(forms.Form):
# if getattr(self, '_is_valid', None) is None: # if getattr(self, '_is_valid', None) is None:
self._is_valid = super(FilterForm, self).is_valid() self._is_valid = super(FilterForm, self).is_valid()
# нам нужно сбрасывать сохраненные модели, # нам нужно сбрасывать сохраненный выбор моделей,
# т.к. после валидации нужно вернуть только выбранные # т.к. после валидации нужно вернуть только выбранные
self._models = None self._models = None
return self._is_valid return self._is_valid
@ -179,82 +148,49 @@ class FilterForm(forms.Form):
self._models.append(Conference) self._models.append(Conference)
return self._models or [Exposition, Conference] return self._models or [Exposition, Conference]
def get_theme_choices(self, ids):
# 3-й рабочий способ (с родным заполением перевода)
# в ходе поиска решения, был найден и 4-й рабочий способ используя RawSQL, но он для Django >= 1.8
# https://docs.djangoproject.com/en/1.9/ref/models/expressions/#raw-sql-expressions
# from django.db.models.expressions import RawSQL
conf = []
expo = []
for _type, pk in ids:
if _type == 'conference':
conf.append(pk)
else:
expo.append(int(pk))
if getattr(self, '_theme_choices', None) is None:
if Exposition in self.models and Conference in self.models:
count_query = '({q1}) + ({q2})'.format(
q1=theme_expo_count if not expo else theme_expo_count_selected.format(ids=tuple(expo)),
q2=theme_conf_count if not conf else theme_conf_count_selected.format(ids=tuple(conf)),
)
filter_types = Q(types=Theme.types.conference) | Q(types=Theme.types.exposition)
elif Exposition in self.models:
count_query = theme_expo_count
filter_types = Q(types=Theme.types.exposition)
elif Conference in self.models:
count_query = theme_conf_count
filter_types = Q(types=Theme.types.conference)
self._theme_choices = Theme.objects.language()\
.filter(filter_types)\
.extra(select={'count': count_query})\
# .order_by('-count', '-name')
return self._theme_choices
def get_tag_choices(self):
tag_select = {}
if getattr(self, '_tag_choices', None) is None:
if Exposition in self.models and Conference in self.models:
count_query = '({q1}) + ({q2})'.format(
q1=tag_expo_count,
q2=tag_conf_count)
elif Exposition in self.models:
count_query = tag_expo_count
elif Conference in self.models:
count_query = tag_conf_count
self._tag_choices = Tag.objects.language()\
.extra(select={'count': count_query})\
# .order_by('-count', '-name')
return self._tag_choices
@property @property
def lookup_kwargs(self): def lookup_kwargs(self):
if self._lookup_kwargs is None: if self._lookup_kwargs is None:
d = self.cleaned_data d = self.cleaned_data
self._lookup_kwargs = {} self._lookup_kwargs = {}
self._related_fields = []
self._local_fields = []
if d.get('theme'): if d.get('theme'):
self._lookup_kwargs['theme'] = { self._related_fields.append('theme')
'theme__in': d.get('theme') self._lookup_kwargs['theme__in'] = d.get('theme')
}
if d.get('tag'): if d.get('tag'):
self._lookup_kwargs['tag'] = { self._related_fields.append('tag')
'tag__in': d.get('tag'), self._lookup_kwargs['tag__in'] = d.get('tag')
}
if d.get('country'): if d.get('country'):
self._lookup_kwargs['country'] = { self._lookup_kwargs['country_id__in'] = d.get('country')
'country_id__in': d.get('country'),
}
if d.get('city'): if d.get('city'):
self._lookup_kwargs['country'] = { self._related_fields.append('city')
'city_id__in': d.get('city'), self._lookup_kwargs['city_id__in'] = d.get('city')
} if d.get('members'):
self._local_fields.append('members')
self._lookup_kwargs['members_choice__in'] = d.get('members')
if d.get('visitors'):
self._local_fields.append('visitors')
self._lookup_kwargs['visitors_choice__in'] = d.get('visitors')
if d.get('price'):
self._local_fields.append('price')
self._lookup_kwargs['price_choice__in'] = d.get('price')
return self._lookup_kwargs return self._lookup_kwargs
def filter(self, lookup_kwargs=None, qs=None): # @property
# def lookup_args(self):
# if self._lookup_args is None:
# d = self.cleaned_data
# self._lookup_args = {}
# self._local_fields = []
# if d.get('members'):
# self._local_fields.append('city')
# return self._lookup_args
def filter(self, qs=None):
qs = qs or self.default_filter() qs = qs or self.default_filter()
lookup_kwargs = dict(ChainMap({}, *(lookup_kwargs or self.lookup_kwargs).values())) # lookup_kwargs = dict(ChainMap({}, *(lookup_kwargs or self.lookup_kwargs).values()))
return qs.filter(**lookup_kwargs) return qs.filter(**self.lookup_kwargs)
def default_filter(self, load_all=True): def default_filter(self, load_all=True):
qs = RelatedSearchQuerySet().models(*self.models) qs = RelatedSearchQuerySet().models(*self.models)
@ -266,33 +202,163 @@ class FilterForm(forms.Form):
def recalculate_choices(self): def recalculate_choices(self):
print(self._is_valid) print(self._is_valid)
if self._is_valid: if self._is_valid and self.lookup_kwargs:
for field, val in self.lookup_kwargs.iteritems(): for field in ['theme', 'tag', 'city', 'country']:
field_qs = self.default_filter(load_all=False) # field_qs = self.default_filter(load_all=False)
field_lookup_kwargs = self.lookup_kwargs.copy()
del field_lookup_kwargs[field]
# if not field_lookup_kwargs: # if not field_lookup_kwargs:
# continue # continue
# field_qs = (x.id.split('.')[1:] for x in self.filter(qs=field_qs, lookup_kwargs=field_lookup_kwargs) if x.id) # field_qs = (x.id.split('.')[1:] for x in self.filter(qs=field_qs, lookup_kwargs=field_lookup_kwargs) if x.id)
# if field == 'theme': # if field == 'theme':
# self.fields[field].queryset = self.get_theme_choices(field_qs) # self.fields[field].queryset = self.get_theme_choices(field_qs)
self.fields[field].queryset = self.fields[field].queryset.extra( values = ['pk', 'name']
select=self.make_count_select(field, field_lookup_kwargs)).values('pk', 'name', 'count') order_by = []
select = self.make_count_select(field)
qs = self.fields[field].queryset
for key in select.iterkeys():
values.append(key)
if key == 'selected':
order_by.insert(0, '-' + key)
else:
order_by.append('-' + key)
qs = qs.extra(select=select)
self.fields[field].queryset = qs\
.values(*values)\
.order_by(*order_by)
print(self.fields[field].queryset.query) print(self.fields[field].queryset.query)
# self.make_count_select(field, field_lookup_kwargs)
# print(field_qs) for field in ['members', 'visitors', 'price']:
self.fields[field].choices = self.make_local_field_count(field) or self.fields[field].choices
for field in self.fields: for field in self.fields:
field = self.fields[field] field = self.fields[field]
if hasattr(field, 'queryset'): if hasattr(field, 'queryset'):
field.queryset = field.queryset[:15] field.queryset = field.queryset[:15]
def make_count_select(self, field, lookup_kwargs): def make_ids_in_sql_format(self, values):
return tuple(values) if len(values) > 1 else '({})'.format(*values)
def make_joins_from_selected(self, field, model):
joins = []
where = []
# joins and where lookups in relations
for l_field in self._related_fields:
if l_field == field:
continue
_l_field, l_model, _direct, _m2m = model._meta.get_field_by_name(l_field)
values = self.cleaned_data[l_field]
if _m2m and _direct and isinstance(_l_field, ManyToManyField):
_format_kwargs = {
'm2m_db_table': _l_field.m2m_db_table(),
'm2m_column_name': _l_field.m2m_column_name(),
'db_table': model._meta.db_table,
'm2m_reverse_name': _l_field.m2m_reverse_name(),
'ids': self.make_ids_in_sql_format(values),
}
joins.append(
''' INNER JOIN `{m2m_db_table}` ON (`{db_table}`.`id` = `{m2m_db_table}`.`{m2m_column_name}`)'''\
.format(**_format_kwargs))
where.append(
'''`{m2m_db_table}`.`{m2m_reverse_name}` IN {ids}'''\
.format(**_format_kwargs))
elif not _m2m and _direct and isinstance(_l_field, ForeignKey):
_format_kwargs = {
'db_table': model._meta.db_table,
'attname': _l_field.column,
'ids': self.make_ids_in_sql_format(values),
}
where.append(
'''`{db_table}`.`{attname}` IN {ids}'''\
.format(**_format_kwargs))
# joins and where lookups in local fields
for l_field in self._local_fields:
if l_field == field:
continue
val = self.cleaned_data[l_field]
_format_kwargs = {
'db_table': model._meta.db_table,
'attname': l_field,
'val': self.make_ids_in_sql_format(val),
}
where.append(
'''`{db_table}`.`{attname}` IN {val}'''\
.format(**_format_kwargs))
return joins, where
def make_local_field_count(self, field):
# if 'members' not in self.lookup_kwargs:
sql = ''
selects = []
l_field = fields_mapping.get(field, field)
_values_mapping = values_mapping.get(l_field).items()
for model in self.models:
joins = []
where = []
group_by = ''
format_kwargs = {
'db_table': model._meta.db_table,
'l_field': l_field,
'lang': self.lang,
}
cases = []
for key, val in _values_mapping:
cases.append(
''' sum(case when (`{db_table}`.`{l_field}` = {val}) then 1 else 0 end) as '{key}' '''\
.format(key=key, val=val.get('value'), **format_kwargs)
)
select = \
''' SELECT {cases} FROM `{db_table}_translation` INNER JOIN `{db_table}` ON (`{db_table}_translation`.`master_id` = `{db_table}`.`id`) '''\
.format(cases=', '.join(cases), **format_kwargs)
where.append(
''' `{db_table}_translation`.`language_code` = '{lang}' '''\
.format(**format_kwargs)
)
_joins, _where = self.make_joins_from_selected(field, model)
joins.extend(_joins)
where.extend(_where)
where.append(self.make_default_where(db_table=model._meta.db_table))
selects.append(select + ''.join(joins) + ' where ' + ' and '.join(where) + group_by)
sql = ' union '.join(selects)
choices = []
if sql:
with connection.cursor() as c:
c.execute(sql)
mapper = namedtuple('Result', [col[0] for col in c.description])
data = [mapper(*raw) for raw in c.fetchall()]
for key, val in _values_mapping:
count = sum([getattr(x, key, 0) or 0 for x in data])
choices.append((val.get('value'), val.get('label') + ' ({count})'.format(count=count)))
return choices
# cursor.execute()
#""" SELECT sum(case when (`exposition_exposition`.`members` < 200) then 1 else 0 end) as 'N200', sum(case when (`exposition_exposition`.`members` >= 200 AND `exposition_exposition`.`members` <= 500) then 2 else 0 end) as 'N200500', sum(case when (`exposition_exposition`.`members` >= 500 AND `exposition_exposition`.`members` <= 1000) then 3 else 0 end) as 'N5001000', sum(case when (`exposition_exposition`.`members` >= 1000 AND `exposition_exposition`.`members` <= 2000) then 4 else 0 end) as 'N10002000', sum(case when (`exposition_exposition`.`members` >= 2000) then 5 else 0 end) as 'N2000'FROM `exposition_exposition_translation` INNER JOIN `exposition_exposition` ON (`exposition_exposition_translation`.`master_id` = `exposition_exposition`.`id`) WHERE `exposition_exposition_translation`.`language_code` = 'ru'union SELECT sum(case when (`conference_conference`.`members` < 200) then 1 else 0 end) as 'N200', sum(case when (`conference_conference`.`members` >= 200 AND `conference_conference`.`members` <= 500) then 1 else 0 end) as 'N200500', sum(case when (`conference_conference`.`members` >= 500 AND `conference_conference`.`members` <= 1000) then 1 else 0 end) as 'N5001000', sum(case when (`conference_conference`.`members` >= 1000 AND `conference_conference`.`members` <= 2000) then 1 else 0 end) as 'N10002000', sum(case when (`conference_conference`.`members` >= 2000) then 1 else 0 end) as 'N2000'FROM `conference_conference_translation` INNER JOIN `conference_conference` ON (`conference_conference_translation`.`master_id` = `conference_conference`.`id`) WHERE `conference_conference_translation`.`language_code` = 'ru' """
def make_default_where(self, **kwargs):
return ''' `{db_table}`.`is_published` = True '''.format(**kwargs)
def make_count_select(self, field):
count_selects = [] count_selects = []
print('looking {} {}'.format(field, lookup_kwargs)) case = None
count = None
print('looking {} {}'.format(field, self.lookup_kwargs))
for model in self.models: for model in self.models:
_field, _model, direct, m2m = model._meta.get_field_by_name(field) _field, _model, direct, m2m = model._meta.get_field_by_name(field)
if m2m: joins = []
where = []
group_by = ''
# ManyToManyField
if m2m and direct and isinstance(_field, ManyToManyField):
_field _field
format_kwargs = { format_kwargs = {
'm2m_db_table': _field.m2m_db_table(), 'm2m_db_table': _field.m2m_db_table(),
@ -300,41 +366,163 @@ class FilterForm(forms.Form):
'db_table': model._meta.db_table, 'db_table': model._meta.db_table,
'm2m_reverse_name': _field.m2m_reverse_name(), 'm2m_reverse_name': _field.m2m_reverse_name(),
'm2m_rel_to_table': _field.rel.to._meta.db_table, 'm2m_rel_to_table': _field.rel.to._meta.db_table,
'lang': self.lang,
} }
select = \ select = \
'''SELECT COUNT(`{m2m_db_table}`.`{m2m_column_name}`) FROM `{m2m_db_table}` INNER JOIN `{db_table}` ON (`{m2m_db_table}`.`{m2m_column_name}` = `{db_table}`.`id`) '''\ '''SELECT COUNT(`{m2m_db_table}`.`{m2m_column_name}`) FROM `{m2m_db_table}` INNER JOIN `{db_table}` ON (`{m2m_db_table}`.`{m2m_column_name}` = `{db_table}`.`id`) '''\
.format(**format_kwargs) .format(**format_kwargs)
joins = [] where.append(
where = [ ''' (`{m2m_rel_to_table}_translation`.`master_id` = `{m2m_db_table}`.`{m2m_reverse_name}`) AND `{m2m_rel_to_table}_translation`.`language_code` = '{lang}' '''.format(**format_kwargs)
''' (`{m2m_rel_to_table}_translation`.`master_id` = `{m2m_db_table}`.`{m2m_reverse_name}`) '''.format(**format_kwargs) )
]
# ForeignKey
for l_field, lookups in lookup_kwargs.iteritems(): elif not m2m and direct and isinstance(_field, ForeignKey):
_l_field, l_model, _direct, _m2m = model._meta.get_field_by_name(l_field) _format_kwargs = {
values = lookups.values()[0] 'attname': _field.column,
_format_kwargs = { 'db_table': model._meta.db_table,
'm2m_db_table': _l_field.m2m_db_table(), 'rel_db_table': _field.rel.to._meta.db_table,
'm2m_column_name': _l_field.m2m_column_name(), 'lang': self.lang,
'db_table': model._meta.db_table, # 'attname': _field.related.field.get_attname(),
'm2m_reverse_name': _l_field.m2m_reverse_name(), }
'ids': tuple(values) if len(values) > 1 else '({})'.format(*values), select = \
} '''SELECT COUNT(`{db_table}`.`{attname}`) FROM `{db_table}`'''\
joins.append( .format(**_format_kwargs)
''' INNER JOIN `{m2m_db_table}` ON (`{db_table}`.`id` = `{m2m_db_table}`.`{m2m_column_name}`)'''\ # '''SELECT COUNT(`{db_table}`.`id`) FROM `{rel_db_table}` LEFT OUTER JOIN `{db_table}` ON (`{rel_db_table}`.`id` = `{db_table}`.`{attname}`)'''\
.format(**_format_kwargs)) where.append(
where.append( ''' `{db_table}`.`{attname}` = `{rel_db_table}_translation`.`master_id` AND `{rel_db_table}_translation`.`language_code` = '{lang}' '''\
'''`{m2m_db_table}`.`{m2m_reverse_name}` IN {ids}'''\ .format(**_format_kwargs))
.format(**_format_kwargs)) group_by = ''' GROUP BY `{rel_db_table}_translation`.`master_id` '''.format(**_format_kwargs)
count_selects.append(select + ''.join(joins) + ' where ' + ' and '.join(where))
# mark selected items (for ordering)
# case selected # only for M2M and ForeignKey
# todo if case is None and field in self._related_fields and direct\
and (isinstance(_field, ForeignKey) or isinstance(_field, ManyToManyField)):
values = self.cleaned_data[field]
case = \
''' CASE WHEN `{table}`.`master_id` in {ids} THEN 1 ELSE 0 END '''.format(
table=self.fields[field].queryset.model._meta.db_table,
ids=self.make_ids_in_sql_format(values))
# FILTER current by other values
_joins, _where = self.make_joins_from_selected(field, model)
joins.extend(_joins)
where.extend(_where)
where.append(self.make_default_where(db_table=model._meta.db_table))
count_selects.append(select + ''.join(joins) + ' where ' + ' and '.join(where) + group_by)
if len(count_selects) == 2: if len(count_selects) == 2:
count = '({}) + ({})'.format(*count_selects) count = '({}) + ({})'.format(*count_selects)
elif len(count_selects) == 1: elif len(count_selects) == 1:
count = count_selects[0] count = count_selects[0]
return {'count': count} d = {}
if case is not None:
d['selected'] = case
if count:
d['count'] = count
return d
### Делаем выборку по темам, сразу заполняя перевод и кол-во событиый
## 1-й рабочий способ (без заполнения перевода)
# """
# SELECT
# `theme_theme`.`id`,
# (
# SELECT COUNT(`exposition_exposition_theme`.`exposition_id`)
# FROM `exposition_exposition_theme`
# WHERE (`theme_theme`.`id` = `exposition_exposition_theme`.`theme_id`)
# ) AS `e_count`,
# (
# SELECT COUNT(`conference_conference_theme`.`conference_id`)
# FROM `conference_conference_theme`
# WHERE (`theme_theme`.`id` = `conference_conference_theme`.`theme_id`)
# ) AS `c_count`,
# `theme_theme_translation`.`name` as `name`
# FROM
# `theme_theme`
# GROUP BY `theme_theme`.`id`
# ORDER BY NULL
# """
## 2-й рабочий способ (с заполнением перевода)
## аттрибут перевода 'name' присвоен на 'name_t', чтобы не ругалось на неправильно заполненый перевод
# theme_sql = \
# """
# SELECT
# `theme_theme_translation`.`name` AS `name_t`,
# `theme_theme_translation`.`master_id` AS `id`,
# (
# SELECT COUNT(`exposition_exposition_theme`.`exposition_id`)
# FROM `exposition_exposition_theme`
# WHERE (`theme_theme_translation`.`master_id` = `exposition_exposition_theme`.`theme_id`)
# ) AS `e_count`,
# (
# SELECT COUNT(`conference_conference_theme`.`conference_id`)
# FROM `conference_conference_theme`
# WHERE (`theme_theme_translation`.`master_id` = `conference_conference_theme`.`theme_id`)
# ) AS `c_count`
# FROM
# `theme_theme_translation`
# WHERE (`theme_theme_translation`.`language_code` = 'ru')
# GROUP BY `theme_theme_translation`.`name`
# ORDER BY NULL
# """
# qs = Theme.objects.raw(theme_sql)
# _theme_expo_count = '''SELECT COUNT(`exposition_exposition_theme`.`exposition_id`) FROM `exposition_exposition_theme` '''
# theme_expo_count = _theme_expo_count + ''' WHERE (`theme_theme`.`id` = `exposition_exposition_theme`.`theme_id`) '''
# theme_expo_count_selected = theme_expo_count + ''' WHERE (`theme_theme`.`id` = `exposition_exposition_theme`.`theme_id` AND `exposition_exposition_theme`.`exposition_id` in {ids})'''
# _theme_conf_count = '''SELECT COUNT(`conference_conference_theme`.`conference_id`) FROM `conference_conference_theme` '''
# theme_conf_count = _theme_conf_count + ''' WHERE (`theme_theme`.`id` = `conference_conference_theme`.`theme_id`) '''
# theme_conf_count_selected = _theme_conf_count + ''' WHERE (`theme_theme`.`id` = `conference_conference_theme`.`theme_id` AND `conference_conference_theme`.`conference_id` in {ids})'''
# tag_expo_count = '''SELECT COUNT(`exposition_exposition_tag`.`exposition_id`) FROM `exposition_exposition_tag` WHERE (`theme_tag`.`id` = `exposition_exposition_tag`.`tag_id`) '''
# tag_conf_count = '''SELECT COUNT(`conference_conference_tag`.`conference_id`) FROM `conference_conference_tag` WHERE (`theme_tag`.`id` = `conference_conference_tag`.`tag_id`) '''
# 3-й рабочий способ (с родным заполением перевода)
# в ходе поиска решения, был найден и 4-й рабочий способ используя RawSQL, но он для Django >= 1.8
# https://docs.djangoproject.com/en/1.9/ref/models/expressions/#raw-sql-expressions
# from django.db.models.expressions import RawSQL
'''
SELECT
`city_city_translation`.`master_id`,
`<city_city_translation></city_city_translation>`.`name`,
COUNT(`conference_conference`.`id`) AS `count`
FROM
`city_city_translation`
LEFT OUTER JOIN
`city_city` ON (`city_city_translation`.`master_id` = `city_city`.`id`)
LEFT OUTER JOIN
`conference_conference` ON (`city_city`.`id` = `conference_conference`.`city_id`)
LEFT OUTER JOIN
`conference_conference_tag` ON (`conference_conference`.`id` = `conference_conference_tag`.`conference_id`)
WHERE
`conference_conference_tag`.`tag_id` IN (469 , 832, 366, 922)
GROUP BY `city_city_translation`.`language_code` , `city_city_translation`.`master_id`
ORDER BY NULL
'''
'''
SELECT
(SELECT
COUNT(`exposition_exposition`.`country_id`)
FROM
`exposition_exposition`
INNER JOIN
`exposition_exposition_theme` ON (`exposition_exposition`.`id` = `exposition_exposition_theme`.`exposition_id`)
where
`exposition_exposition_theme`.`theme_id` IN (1, 2, 3)
and `exposition_exposition`.`country_id` = `country_country_translation`.`master_id`
GROUP BY `country_country_translation`.`master_id`) AS `count`,
`country_country_translation`.`master_id`,
`country_country_translation`.`name`
FROM
`country_country_translation`
'''
''' '''
SELECT SELECT
@ -366,5 +554,4 @@ WHERE
OR `theme_theme`.`types` = (`theme_theme`.`types` | 2)) OR `theme_theme`.`types` = (`theme_theme`.`types` | 2))
AND (`theme_theme_translation`.`language_code` = 'ru') AND (`theme_theme_translation`.`language_code` = 'ru')
order BY `selected` DESC , `count` DESC order BY `selected` DESC , `count` DESC
''' '''

@ -0,0 +1,71 @@
# -*- coding: utf-8 -*-
from django.core.management.base import NoArgsCommand
from django.db.models import Q
from exposition.models import Exposition
from conference.models import Conference
from events.common import members_mapping, visitors_mapping, price_mapping
class Command(NoArgsCommand):
def handle_noargs(self, **options):
fields_updater_mapping = {
Exposition: [
{
'from': 'members',
'to': 'members_choice',
'mapping': members_mapping
},
{
'from': 'visitors',
'to': 'visitors_choice',
'mapping': visitors_mapping
},
{
'from': 'min_closed_area',
'to': 'price_choice',
'mapping': price_mapping
},
],
Conference: [
{
'from': 'members',
'to': 'members_choice',
'mapping': members_mapping
},
{
'from': 'visitors',
'to': 'visitors_choice',
'mapping': visitors_mapping
},
{
'from': 'min_price',
'to': 'price_choice',
'mapping': price_mapping
},
]
}
# loop over models
for model, fields in fields_updater_mapping.iteritems():
# loop over fields
for field in fields:
from_field = field.get('from')
to_field = field.get('to')
field_mapping = field.get('mapping')
# loop over every choice in field
for choice in field_mapping.itervalues():
_min = choice.get('min')
_max = choice.get('max')
value = choice.get('value')
exclude_kwargs = {to_field: value}
update_kwargs = {to_field: value}
q = Q()
if _min:
q &= Q(**{from_field + '__gte': _min})
if _max:
q &= Q(**{from_field + '__lte': _max})
model.objects.filter(q).exclude(**exclude_kwargs).update(**update_kwargs)

@ -0,0 +1,620 @@
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Exposition.members_choice'
db.add_column(u'exposition_exposition', 'members_choice',
self.gf('django.db.models.fields.PositiveSmallIntegerField')(null=True, blank=True),
keep_default=False)
# Adding field 'Exposition.visitors_choice'
db.add_column(u'exposition_exposition', 'visitors_choice',
self.gf('django.db.models.fields.PositiveSmallIntegerField')(null=True, blank=True),
keep_default=False)
# Adding field 'Exposition.price_choice'
db.add_column(u'exposition_exposition', 'price_choice',
self.gf('django.db.models.fields.PositiveSmallIntegerField')(null=True, blank=True),
keep_default=False)
def backwards(self, orm):
# Deleting field 'Exposition.members_choice'
db.delete_column(u'exposition_exposition', 'members_choice')
# Deleting field 'Exposition.visitors_choice'
db.delete_column(u'exposition_exposition', 'visitors_choice')
# Deleting field 'Exposition.price_choice'
db.delete_column(u'exposition_exposition', 'price_choice')
models = {
u'accounts.user': {
'Meta': {'ordering': "['-rating']", 'object_name': 'User'},
'blocked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'company': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'users'", 'null': 'True', 'to': u"orm['company.Company']"}),
'date_joined': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'date_modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'date_registered': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '255', 'db_index': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_admin': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'organiser': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['organiser.Organiser']", 'unique': 'True', 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'position': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'rating': ('django.db.models.fields.IntegerField', [], {'default': '100'}),
'translator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': u"orm['translator.Translator']", 'blank': 'True', 'unique': 'True'}),
'url': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'blank': 'True'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'})
},
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'city.city': {
'Meta': {'unique_together': '()', 'object_name': 'City', 'index_together': '()'},
'code_IATA': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['directories.Iata']", 'null': 'True', 'blank': 'True'}),
'country': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'cities'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': u"orm['country.Country']"}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'inflect': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'old_url': ('django.db.models.fields.CharField', [], {'max_length': '55'}),
'phone_code': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'population': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'services': ('django.db.models.fields.BigIntegerField', [], {'default': 'None'}),
'url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'})
},
u'company.company': {
'Meta': {'ordering': "['-rating', 'id']", 'unique_together': '()', 'object_name': 'Company', 'index_together': '()'},
'address': ('functions.custom_fields.LocationField', [], {'blank': 'True'}),
'blocked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'city': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'companies'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': u"orm['city.City']"}),
'country': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'companies'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': u"orm['country.Country']"}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'created_company'", 'null': 'True', 'to': u"orm['accounts.User']"}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'facebook': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'fax': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
'foundation': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'linkedin': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'phone': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
'rating': ('django.db.models.fields.IntegerField', [], {'default': '100'}),
'staff_number': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'tag': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'companies'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['theme.Tag']"}),
'theme': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'companies'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['theme.Theme']"}),
'twitter': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'url': ('django.db.models.fields.SlugField', [], {'max_length': '255'}),
'vk': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'web_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
},
u'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
u'country.area': {
'Meta': {'ordering': "['translations__name']", 'unique_together': '()', 'object_name': 'Area', 'index_together': '()'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
},
u'country.country': {
'Meta': {'ordering': "['translations__name']", 'unique_together': '()', 'object_name': 'Country', 'index_together': '()'},
'area': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['country.Area']"}),
'big_cities': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'cities'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['city.City']"}),
'capital': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'capital'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': u"orm['city.City']"}),
'country_code': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'currency': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['directories.Currency']", 'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'inflect': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'language': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['directories.Language']", 'null': 'True', 'blank': 'True'}),
'latitude': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'blank': 'True'}),
'longitude': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'old_url': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '55'}),
'phone_code': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'population': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'services': ('django.db.models.fields.BigIntegerField', [], {'default': 'None'}),
'teritory': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'time_delivery': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'timezone': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
'url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'})
},
u'directories.currency': {
'Meta': {'unique_together': '()', 'object_name': 'Currency', 'index_together': '()'},
'code': ('django.db.models.fields.CharField', [], {'max_length': '3'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
},
u'directories.iata': {
'Meta': {'object_name': 'Iata'},
'airport': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'code': ('django.db.models.fields.CharField', [], {'max_length': '4'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
},
u'directories.language': {
'Meta': {'unique_together': '()', 'object_name': 'Language', 'index_together': '()'},
'code': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'expobanner.banner': {
'Meta': {'ordering': "['sort']", 'object_name': 'Banner'},
'alt': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'cookie': ('django.db.models.fields.CharField', [], {'default': "'expo_b_default_popup'", 'max_length': '30', 'null': 'True', 'blank': 'True'}),
'country': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['country.Country']", 'null': 'True', 'blank': 'True'}),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'customer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['expobanner.Customer']", 'null': 'True', 'blank': 'True'}),
'flash': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'fr': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2016, 8, 4, 0, 0)'}),
'group': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'banners'", 'null': 'True', 'to': u"orm['expobanner.BannerGroup']"}),
'html': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'img': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
'link': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'often': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '1'}),
'paid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'popup': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'sort': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '500'}),
'stat_pswd': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'text': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'theme': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['theme.Theme']", 'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'to': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'url': ('django.db.models.fields.CharField', [], {'max_length': '1024'}),
'urls': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'url_banners'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['expobanner.URL']"})
},
u'expobanner.bannergroup': {
'Meta': {'ordering': "['name']", 'object_name': 'BannerGroup'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'height': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '0'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
'speed': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '2000'}),
'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '0'})
},
u'expobanner.customer': {
'Meta': {'ordering': "['name']", 'object_name': 'Customer'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
u'expobanner.mainpage': {
'Meta': {'ordering': "['-public']", 'object_name': 'MainPage'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['expobanner.Banner']"}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'position': ('django.db.models.fields.PositiveIntegerField', [], {'default': '2', 'null': 'True', 'blank': 'True'}),
'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'stat_pswd': ('django.db.models.fields.CharField', [], {'max_length': '16'})
},
u'expobanner.paid': {
'Meta': {'ordering': "['-public']", 'object_name': 'Paid'},
'catalog': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'paid_catalog'", 'to': u"orm['expobanner.Banner']"}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'kind': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '1', 'db_index': 'True'}),
'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'official': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'paid_official'", 'to': u"orm['expobanner.Banner']"}),
'organiser': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
'participation': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'paid_participation'", 'null': 'True', 'to': u"orm['expobanner.Banner']"}),
'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'stat_pswd': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'tickets': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'paid_tickets'", 'to': u"orm['expobanner.Banner']"})
},
u'expobanner.top': {
'Meta': {'ordering': "['position']", 'object_name': 'Top'},
'catalog': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'cities': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'top_in_set'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['city.City']"}),
'country': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['country.Country']", 'null': 'True', 'blank': 'True'}),
'excluded_cities': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['city.City']", 'null': 'True', 'blank': 'True'}),
'excluded_tags': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['theme.Tag']", 'null': 'True', 'blank': 'True'}),
'fr': ('django.db.models.fields.DateField', [], {'default': 'datetime.datetime(2016, 8, 4, 0, 0)'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['expobanner.Banner']"}),
'months': ('functions.custom_fields.MonthMultiSelectField', [], {'default': 'None', 'max_length': '255', 'null': 'True', 'blank': 'True'}),
'position': ('django.db.models.fields.PositiveIntegerField', [], {'default': '2', 'null': 'True', 'blank': 'True'}),
'stat_pswd': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'theme': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['theme.Theme']", 'null': 'True', 'blank': 'True'}),
'to': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
'years': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'})
},
u'expobanner.url': {
'Meta': {'ordering': "['-created_at']", 'object_name': 'URL'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'regex': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'sites': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'site_urls'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['sites.Site']"}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'url': ('django.db.models.fields.CharField', [], {'max_length': '2048'})
},
u'exposition.exposition': {
'Meta': {'unique_together': '()', 'object_name': 'Exposition', 'index_together': '()'},
'application_deadline': ('django.db.models.fields.DateField', [], {'null': 'True'}),
'area': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'audience': ('django.db.models.fields.BigIntegerField', [], {'default': 'None'}),
'bad_url': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'canceled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'canceled_by_administrator': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'city': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'exposition_city'", 'on_delete': 'models.PROTECT', 'to': u"orm['city.City']"}),
'company': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'exposition_companies'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['company.Company']"}),
'country': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'exposition_country'", 'on_delete': 'models.PROTECT', 'to': u"orm['country.Country']"}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'exposition_creator'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['accounts.User']"}),
'currency': ('functions.custom_fields.EnumField', [], {'default': "'RUB'", 'values': "('RUB', 'USD', 'EUR', 'RMB', 'GBP', 'AED', 'SGD', 'TRY', 'CZK', 'CHF', 'SEK', 'LKR', 'UAH', 'IDR', 'PLN', 'JPY')"}),
'data_begin': ('django.db.models.fields.DateField', [], {}),
'data_end': ('django.db.models.fields.DateField', [], {}),
'discount': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'expohit': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'foundation_year': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_published': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'blank': 'True'}),
'main': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['expobanner.MainPage']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'main_page': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
'max_closed_area': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'max_closed_equipped_area': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'max_open_area': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'members': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'members_choice': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'min_area': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'min_closed_area': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'min_closed_equipped_area': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'min_open_area': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'min_stand_size': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'moved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'old_url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
'org': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'organiser': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'exposition_organisers'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['organiser.Organiser']"}),
'paid_new': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['expobanner.Paid']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'periodic': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
'photogallery': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['photologue.Gallery']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'place': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'exposition_place'", 'null': 'True', 'on_delete': 'models.PROTECT', 'to': u"orm['place_exposition.PlaceExposition']"}),
'place_alt': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'price_catalog': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'price_choice': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'quality_label': ('django.db.models.fields.BigIntegerField', [], {'default': 'None'}),
'rating': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'registration_link': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}),
'registration_payment': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'services': ('django.db.models.fields.BigIntegerField', [], {'default': 'None'}),
'tag': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'exposition_tags'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['theme.Tag']"}),
'tax': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'theme': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'exposition_themes'", 'symmetrical': 'False', 'to': u"orm['theme.Theme']"}),
'top': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['expobanner.Top']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
'users': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'exposition_users'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['accounts.User']"}),
'views': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'visitors': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'visitors_choice': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'web_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
},
u'exposition.expositiontranslation': {
'Meta': {'unique_together': "[('language_code', 'master')]", 'object_name': 'ExpositionTranslation', 'db_table': "u'exposition_exposition_translation'", 'index_together': '()'},
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'descriptions': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
'discount_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'keywords': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
'language_code': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'main_title': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'master': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'translations'", 'null': 'True', 'to': u"orm['exposition.Exposition']"}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'participation_note': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'pre_condition': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'price_all': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'price_all_bar': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'price_day': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'price_day_bar': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'products': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'stand_condition': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'stat_countries': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'time': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
'visit_note': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
},
u'exposition.statistic': {
'Meta': {'unique_together': '()', 'object_name': 'Statistic', 'index_together': '()'},
'area': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'countries_number': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'exposition': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statistic'", 'to': u"orm['exposition.Exposition']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'members': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'visitors': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'year': ('django.db.models.fields.PositiveIntegerField', [], {})
},
u'exposition.statistictranslation': {
'Meta': {'unique_together': "[('language_code', 'master')]", 'object_name': 'StatisticTranslation', 'db_table': "u'exposition_statistic_translation'", 'index_together': '()'},
'countries': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language_code': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'master': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'translations'", 'null': 'True', 'to': u"orm['exposition.Statistic']"})
},
u'exposition.timetable': {
'Meta': {'unique_together': '()', 'object_name': 'TimeTable', 'index_together': '()'},
'begin': ('django.db.models.fields.DateTimeField', [], {}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'end': ('django.db.models.fields.DateTimeField', [], {}),
'exposition': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'business_program'", 'to': u"orm['exposition.Exposition']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'timetable_organiser': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['organiser.Organiser']", 'null': 'True', 'blank': 'True'})
},
u'exposition.timetabletranslation': {
'Meta': {'unique_together': "[('language_code', 'master')]", 'object_name': 'TimeTableTranslation', 'db_table': "u'exposition_timetable_translation'", 'index_together': '()'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language_code': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'master': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'translations'", 'null': 'True', 'to': u"orm['exposition.TimeTable']"}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'place': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'programe': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'speaker': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
},
u'exposition.tmptimetable': {
'Meta': {'unique_together': '()', 'object_name': 'TmpTimeTable', 'index_together': '()'},
'begin': ('django.db.models.fields.DateTimeField', [], {}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'end': ('django.db.models.fields.DateTimeField', [], {}),
'exposition': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['exposition.Exposition']", 'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'timetable_organiser': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['organiser.Organiser']", 'null': 'True', 'blank': 'True'})
},
u'exposition.tmptimetabletranslation': {
'Meta': {'unique_together': "[('language_code', 'master')]", 'object_name': 'TmpTimeTableTranslation', 'db_table': "u'exposition_tmptimetable_translation'", 'index_together': '()'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language_code': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'master': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'translations'", 'null': 'True', 'to': u"orm['exposition.TmpTimeTable']"}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'place': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'programe': ('django.db.models.fields.TextField', [], {}),
'speaker': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
},
u'file.filemodel': {
'Meta': {'unique_together': '()', 'object_name': 'FileModel', 'index_together': '()'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']", 'null': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'file_path': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
'file_type': ('functions.custom_fields.EnumField', [], {'default': "'PDF'", 'values': "('PDF', 'DOC', 'TXT', 'OTHER', 'JPG', 'BMP', 'PNG', 'GIF')", 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'img_height': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'img_width': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'purpose': ('functions.custom_fields.EnumField', [], {'default': "'photo'", 'values': "['photo', 'flat', 'logo', 'map', 'scheme teritory', 'diplom', 'preview', 'preview2']"})
},
u'note.note': {
'Meta': {'object_name': 'Note'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']", 'null': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
'text': ('django.db.models.fields.TextField', [], {}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['accounts.User']"})
},
u'organiser.organiser': {
'Meta': {'unique_together': '()', 'object_name': 'Organiser', 'index_together': '()'},
'active': ('django.db.models.fields.NullBooleanField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
'address': ('functions.custom_fields.LocationField', [], {'null': 'True', 'blank': 'True'}),
'city': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['city.City']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
'country': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['country.Country']", 'null': 'True', 'on_delete': 'models.PROTECT', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'events_number': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'facebook': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'fax': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
'foundation': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'linkedin': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'phone': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
'place_conference': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'organiser_place_conference'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['place_conference.PlaceConference']"}),
'place_exposition': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'organiser_place_exposition'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['place_exposition.PlaceExposition']"}),
'rating': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'staff_number': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'tag': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['theme.Tag']", 'null': 'True', 'blank': 'True'}),
'theme': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['theme.Theme']", 'null': 'True', 'blank': 'True'}),
'twitter': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'url': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'blank': 'True'}),
'vk': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'web_page': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
},
u'photologue.gallery': {
'Meta': {'ordering': "['-date_added']", 'unique_together': '()', 'object_name': 'Gallery', 'index_together': '()'},
'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'photos': ('sortedm2m.fields.SortedManyToManyField', [], {'blank': 'True', 'related_name': "'galleries'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['photologue.Photo']"}),
'sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['sites.Site']", 'null': 'True', 'blank': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '200'}),
'tags': ('photologue.models.TagField', [], {'max_length': '255', 'blank': 'True'})
},
u'photologue.photo': {
'Meta': {'ordering': "['sort']", 'unique_together': '()', 'object_name': 'Photo', 'index_together': '()'},
'crop_from': ('django.db.models.fields.CharField', [], {'default': "'center'", 'max_length': '10', 'blank': 'True'}),
'date_added': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'date_taken': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'effect': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'photo_related'", 'null': 'True', 'to': u"orm['photologue.PhotoEffect']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['sites.Site']", 'null': 'True', 'blank': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '200'}),
'sort': ('django.db.models.fields.PositiveIntegerField', [], {'default': '10', 'null': 'True', 'db_index': 'True'}),
'tags': ('photologue.models.TagField', [], {'max_length': '255', 'blank': 'True'}),
'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['photologue.UserMark']", 'null': 'True', 'symmetrical': 'False'}),
'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})
},
u'photologue.photoeffect': {
'Meta': {'object_name': 'PhotoEffect'},
'background_color': ('django.db.models.fields.CharField', [], {'default': "'#FFFFFF'", 'max_length': '7'}),
'brightness': ('django.db.models.fields.FloatField', [], {'default': '1.0'}),
'color': ('django.db.models.fields.FloatField', [], {'default': '1.0'}),
'contrast': ('django.db.models.fields.FloatField', [], {'default': '1.0'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'filters': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
'reflection_size': ('django.db.models.fields.FloatField', [], {'default': '0'}),
'reflection_strength': ('django.db.models.fields.FloatField', [], {'default': '0.6'}),
'sharpness': ('django.db.models.fields.FloatField', [], {'default': '1.0'}),
'transpose_method': ('django.db.models.fields.CharField', [], {'max_length': '15', 'blank': 'True'})
},
u'photologue.usermark': {
'Meta': {'object_name': 'UserMark'},
'height': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'left': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
'top': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'marks'", 'to': u"orm['accounts.User']"}),
'width': ('django.db.models.fields.PositiveSmallIntegerField', [], {})
},
u'place_conference.placeconference': {
'Meta': {'unique_together': '()', 'object_name': 'PlaceConference', 'index_together': '()'},
'address': ('functions.custom_fields.LocationField', [], {}),
'amount_halls': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'banquet_hall': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'catering': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'city': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'place_conferences'", 'on_delete': 'models.PROTECT', 'to': u"orm['city.City']"}),
'conference_call': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'country': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['country.Country']", 'on_delete': 'models.PROTECT'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'exp_hall_area': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'exposition_hall': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'fax': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
'foundation_year': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'hotel': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'multimedia_equipment': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'phone': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
'total_capacity': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'translate_equipment': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'type': ('functions.custom_fields.EnumField', [], {'default': "'Convention centre'", 'values': "['Convention centre', 'Exposition centre']"}),
'url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
'video_link': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'views': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'virtual_tour': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'web_page': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'wifi': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'})
},
u'place_exposition.placeexposition': {
'Meta': {'ordering': "['-rating', 'id']", 'unique_together': '()', 'object_name': 'PlaceExposition', 'index_together': '()'},
'address': ('functions.custom_fields.LocationField', [], {}),
'bank': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'business_centre': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'cafe': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'children_room': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'city': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'place_expositions'", 'on_delete': 'models.PROTECT', 'to': u"orm['city.City']"}),
'closed_area': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'conference_centre': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'country': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['country.Country']", 'on_delete': 'models.PROTECT'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'disabled_service': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'event_in_year': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'fax': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
'foundation_year': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_published': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '255', 'blank': 'True'}),
'mobile_application': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'online_registration': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'open_area': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'parking': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'partner': ('django.db.models.fields.NullBooleanField', [], {'default': '0', 'null': 'True', 'blank': 'True'}),
'phone': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
'photogallery': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['photologue.Gallery']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'press_centre': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'rating': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'terminals': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
'total_area': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'total_halls': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'total_pavilions': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'type': ('functions.custom_fields.EnumField', [], {'default': "'Exposition complex'", 'values': "['Exposition complex', 'Convention centre', 'Exposition centre']"}),
'url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
'views': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'virtual_tour': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'web_page': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'wifi': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'})
},
u'sites.site': {
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'theme.tag': {
'Meta': {'unique_together': '()', 'object_name': 'Tag', 'index_together': '()'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'inflect': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'old_url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
'theme': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tags'", 'on_delete': 'models.PROTECT', 'to': u"orm['theme.Theme']"}),
'url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'})
},
u'theme.theme': {
'Meta': {'unique_together': '()', 'object_name': 'Theme', 'index_together': '()'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'inflect': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
'main_page_conf': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
'main_page_expo': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'db_index': 'True'}),
'old_url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}),
'types': ('django.db.models.fields.BigIntegerField', [], {'default': 'None'}),
'url': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'})
},
u'translator.translator': {
'Meta': {'unique_together': '()', 'object_name': 'Translator', 'index_together': '()'},
'birth': ('django.db.models.fields.DateField', [], {}),
'car': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'gender': ('functions.custom_fields.EnumField', [], {'default': "'male'", 'values': "('male', 'female')"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
}
}
complete_apps = ['exposition']

@ -21,6 +21,8 @@ from import_xls.model_utils import ExpoImportManager
from manager import ClientManager from manager import ClientManager
from organiser.models import Organiser from organiser.models import Organiser
from service.models import Service from service.models import Service
from events.common import MEMBERS, VISITORS, PRICE
AUDIENCE1 = ((None,_(u'Не выбрано')), AUDIENCE1 = ((None,_(u'Не выбрано')),
('experts', _(u'Специалисты')), ('experts', _(u'Специалисты')),
@ -162,6 +164,15 @@ class Exposition(TranslatableModel, EventMixin, ExpoMixin):
paid_new = models.ForeignKey('expobanner.Paid', blank=True, null=True, on_delete=models.SET_NULL) paid_new = models.ForeignKey('expobanner.Paid', blank=True, null=True, on_delete=models.SET_NULL)
top = models.ForeignKey('expobanner.Top', blank=True, null=True, on_delete=models.SET_NULL) top = models.ForeignKey('expobanner.Top', blank=True, null=True, on_delete=models.SET_NULL)
main = models.ForeignKey('expobanner.MainPage', blank=True, null=True, on_delete=models.SET_NULL) main = models.ForeignKey('expobanner.MainPage', blank=True, null=True, on_delete=models.SET_NULL)
# fields for filter easy
members_choice = models.PositiveSmallIntegerField(
_(u'Участники'), choices=MEMBERS, blank=True, null=True)
visitors_choice = models.PositiveSmallIntegerField(
_(u'Посетители'), choices=VISITORS, blank=True, null=True)
price_choice = models.PositiveSmallIntegerField(
_(u'Минимальная цена'), choices=PRICE, blank=True, null=True)
#set manager of this model(fisrt manager is default) #set manager of this model(fisrt manager is default)
objects = ExpoManager() objects = ExpoManager()
enable = ClientManager() enable = ClientManager()

@ -24,6 +24,11 @@ class ExpositionIndex(indexes.SearchIndex, indexes.Indexable, ExpoSearchMixin):
catalog_name_en = indexes.CharField() catalog_name_en = indexes.CharField()
catalog_name_ru = indexes.CharField() catalog_name_ru = indexes.CharField()
# fields for filter easy
members_choice = indexes.IntegerField()
visitors_choice = indexes.IntegerField()
price_choice = indexes.IntegerField()
def prepare_form_name(self, obj): def prepare_form_name(self, obj):
return None return None

@ -32,65 +32,65 @@ urlpatterns = patterns('',
# country catalog # country catalog
url(r'^expo/country/$', ExpositionByCountry.as_view(), {'meta_id':54}), 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+)/(?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>[^/]*)/(?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>[^/]*)/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+)/(?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>[^/]*)/(?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>[^/]*)/$', ExpoCountryCatalog.as_view(), {'meta_id':5}, name='expo_country'),
# city catalog # city catalog
url(r'^expo/city/$', ExpositionByCity.as_view(), {'meta_id':53}), 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+)/(?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>[^/]*)/(?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>[^/]*)/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+)/(?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>[^/]*)/(?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>[^/]*)/$', ExpoCityCatalog.as_view(), {'meta_id':8}, name='expo_city'),
# theme catalog # theme catalog
url(r'^expo/theme/$', ExpositionByTheme.as_view(), {'meta_id':55}), 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+)/(?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+)/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>[^/]*)/(?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>[^/]*)/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>[^/]*)/(?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>[^/]*)/$', 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>[^/]*)/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+)/(?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+)/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+)/$', 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>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':13}),
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+)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':12}),
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>[^/]*)/page/(?P<page>\d+)/$', ExpoThemeCatalog.as_view(), {'meta_id':11}),
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>[^/]*)/(?P<year>\d+)/(?P<month>[^/]*)/$', ExpoThemeCatalog.as_view(), {'meta_id':13}),
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+)/$', ExpoThemeCatalog.as_view(), {'meta_id':12}),
url(r'^expo/theme/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ExpoThemeCatalog.as_view(), {'meta_id':13}), url(r'^expo/theme/(?P<slug>[^/]*)/$', ExpoThemeCatalog.as_view(), {'meta_id':11}),
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 # 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+)/(?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>[^/]*)/(?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>[^/]*)/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+)/(?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>[^/]*)/(?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>[^/]*)/$', ExpoTagCatalog.as_view(), {'meta_id':14}),
# expo additional pages # expo additional pages
url(r'^expo/(?P<slug>.*)/send_to_organiser/$', 'exposition.views.send_to_organiser'), 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>[^/]*)/statistic/$', ExpositionStatistic.as_view(), {'meta_id':60}),
url(r'^expo/(?P<slug>.*)/price/$', ExpositionPrice.as_view(), {'meta_id':61}), 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>[^/]*)/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/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>[^/]*)/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/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>[^/]*)/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/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>[^/]*)/members/$', ExpoMembers.as_view(), {'meta_id':63}),
url(r'^expo/(?P<slug>.*)/service/thanks/', ExpositionThankView.as_view()), 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/visit/', 'exposition.views.visit_redirect'),
url(r'^expo/(?P<slug>.*)/service/(?P<service_url>.*)/', ExpositionServiceView.as_view()), url(r'^expo/(?P<slug>[^/]*)/service/(?P<service_url>[^/]*)/', ExpositionServiceView.as_view()),
# expo list # 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+)/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+)/(?P<month>.*)/$', ExpoList.as_view(), {'meta_id':4}),
url(r'^expo/(?P<year>\d+)/$', ExpoList.as_view(), {'meta_id':3}), url(r'^expo/(?P<year>\d+)/$', ExpoList.as_view(), {'meta_id':3}),

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from operator import itemgetter from operator import itemgetter
from django.utils.translation import ugettext as _
def base_concrete_model(abstract, instance): def base_concrete_model(abstract, instance):

@ -62,4 +62,12 @@ class ExpoSearchMixin(object):
except: except:
return '' return ''
def prepare_members_choice(self, obj):
return obj.members_choice or 0
def prepare_visitors_choice(self, obj):
return obj.visitors_choice or 0
def prepare_price_choice(self, obj):
return obj.price_choice or 0

@ -63,7 +63,7 @@ class MetaSetting(TranslatableModel):
object_params = { object_params = {
'object_name': 'name', 'object_name': 'name',
'object_title': 'main_title', 'object_title': 'main_title',
'object_title_l': lambda obj: obj.main_title[:1].lower() + obj.main_title[1:] if obj.main_title else '', 'object_title_l': lambda obj: getattr(obj, 'main_title', '')[:1].lower() + getattr(obj, 'main_title', '')[1:] if getattr(obj, 'main_title', None) else '',
'city': 'city', 'city': 'city',
'country': 'country', 'country': 'country',
@ -150,14 +150,12 @@ class SeoTextManager(TranslationManager):
url = kwargs.get('url') url = kwargs.get('url')
lang = kwargs.get('lang')[:2] or translation.get_language()[:2] lang = kwargs.get('lang')[:2] or translation.get_language()[:2]
key = 'seo_text_cache' key = 'seo_text_cache'
if key in cache: result = cache.get(key)
result = cache.get(key) if result is None:
return result.get("%s_%s" % (lang, url))
else:
qs = list(SeoText.objects.language('all')) qs = list(SeoText.objects.language('all'))
value_dict = {obj.language_code+'_'+obj.url: obj for obj in qs} result = {obj.language_code+'_'+obj.url: obj for obj in qs}
cache.set(key, value_dict, self.cache_time) cache.set(key, result, self.cache_time)
return value_dict.get("%s_%s" % (lang, url)) return result.get("%s_%s" % (lang, url), None)
class SeoText(TranslatableModel): class SeoText(TranslatableModel):

@ -11,12 +11,12 @@ class PlaceExpositionIndex(indexes.SearchIndex, indexes.Indexable):
def prepare_country(self, obj): def prepare_country(self, obj):
if obj.country: if obj.country:
return '%s'%obj.country.id return '%s'%obj.country_id
return '' return ''
def prepare_city(self, obj): def prepare_city(self, obj):
if obj.city: if obj.city:
return '%s'%obj.country.city return '%s'%obj.city_id
return '' return ''
def prepare_where(self, obj): def prepare_where(self, obj):

@ -15,11 +15,11 @@ urlpatterns = patterns('',
url(r'^country/$', PlaceByCountry.as_view(), {'meta_id': 49}), url(r'^country/$', PlaceByCountry.as_view(), {'meta_id': 49}),
url(r'^country/(?P<slug>.*)/page/(?P<page>\d+)/$', PlaceCountryCatalog.as_view(), {'meta_id': 49}), url(r'^country/(?P<slug>.*)/page/(?P<page>\d+)/$', PlaceCountryCatalog.as_view(), {'meta_id': 49}),
url(r'^country/(?P<slug>.*)/$', PlaceCountryCatalog.as_view(), {'meta_id': 49}), url(r'^country/(?P<slug>.*)/$', PlaceCountryCatalog.as_view(), {'meta_id': 49}, name='place_country'),
url(r'^city/$', PlaceByCity.as_view(), {'meta_id': 48}), url(r'^city/$', PlaceByCity.as_view(), {'meta_id': 48}),
url(r'^city/(?P<slug>.*)/page/(?P<page>\d+)/$', PlaceCityCatalog.as_view(), {'meta_id': 48}), url(r'^city/(?P<slug>.*)/page/(?P<page>\d+)/$', PlaceCityCatalog.as_view(), {'meta_id': 48}),
url(r'^city/(?P<slug>.*)/$', PlaceCityCatalog.as_view(), {'meta_id': 48}), url(r'^city/(?P<slug>.*)/$', PlaceCityCatalog.as_view(), {'meta_id': 48}, name='place_city'),
url(r'^(?P<slug>.*)/photo/page/(?P<page>\d+)/$', PlacePhoto.as_view(), {'meta_id': 91}), url(r'^(?P<slug>.*)/photo/page/(?P<page>\d+)/$', PlacePhoto.as_view(), {'meta_id': 91}),
url(r'^(?P<slug>.*)/photo/$', PlacePhoto.as_view(), {'meta_id': 91}), url(r'^(?P<slug>.*)/photo/$', PlacePhoto.as_view(), {'meta_id': 91}),

@ -0,0 +1,65 @@
# -*- coding: utf-8 -*-
# from django.contrib.redirects.middleware import RedirectFallbackMiddleware
import re
from django.http import HttpResponsePermanentRedirect
from django.core.urlresolvers import reverse
from exposition.models import Exposition
from country.models import Country
from city.models import City
class RedirectFallbackMiddleware(object):
def process_response(self, request, response):
if response.status_code != 404:
return response # No need to check for a redirect for non-404 responses.
full_path = request.get_full_path()
redirects = [
(r'^/(?P<event_type>expo|conference)/(?P<slug>[^/]*)/$', check_events),
(r'^/places/(?P<slug>[^/]*)/$', check_places),
]
for regex, handler in redirects:
check = re.compile(regex)
match = check.match(full_path)
if match:
response = handler(**match.groupdict())
if response is not None:
return response
return response
def check_events(event_type, slug):
'''
Event redirects (ticket 1498: Внепланово со скайпа - редиректы 301)
https://expomap.ru/expo/dusseldorf/ -> https://expomap.ru/expo/city/dusseldorf/
https://expomap.ru/expo/moscow/ -> https://expomap.ru/expo/country/moscow/
https://expomap.ru/conference/berlin/ -> https://expomap.ru/conference/city/berlin/
https://expomap.ru/conference/moscow/ -> https://expomap.ru/conference/country/moscow/
'''
types = {
'expo': 'expo',
'conference': 'conf'
}
if City.objects.filter(url=slug).exists():
return HttpResponsePermanentRedirect(reverse(types.get(event_type) + '_city', kwargs={'slug': slug}))
if Country.objects.filter(url=slug).exists():
return HttpResponsePermanentRedirect(reverse(types.get(event_type) + '_country', kwargs={'slug': slug}))
return None
def check_places(slug):
"""
Правила для старых ошибок (ticket 1498: Внепланово со скайпа - редиректы 301)
https://expomap.ru/places/russia/ -> https://expomap.ru/places/country/russia/
https://expomap.ru/places/moscow/ -> https://expomap.ru/places/city/moscow/
- где пропущен параметр city и country - тоже автоматической склейки по 301
"""
if City.objects.filter(url=slug).exists():
return HttpResponsePermanentRedirect(reverse('place_city', kwargs={'slug': slug}))
if Country.objects.filter(url=slug).exists():
return HttpResponsePermanentRedirect(reverse('place_country', kwargs={'slug': slug}))
return None

@ -0,0 +1,206 @@
<?xml version="1.0" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<schema name="default" version="1.4">
<types>
<fieldtype name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
<fieldtype name="binary" class="solr.BinaryField"/>
<!-- Numeric field types that manipulate the value into
a string value that isn't human-readable in its internal form,
but with a lexicographic ordering the same as the numeric ordering,
so that range queries work correctly. -->
<fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/>
<fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/>
<fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/>
<fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" sortMissingLast="true" positionIncrementGap="0"/>
<fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
<fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/>
<!-- A Trie based date field for faster date range queries and date faceting. -->
<fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>
<fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
<fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
<fieldtype name="geohash" class="solr.GeoHashField"/>
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
<!-- in this example, we will only use synonyms at query time
<filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
-->
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="stopwords_en.txt"
enablePositionIncrements="true"
/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPossessiveFilterFactory"/>
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
<!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
<filter class="solr.EnglishMinimalStemFilterFactory"/>
-->
<filter class="solr.PorterStemFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="stopwords_en.txt"
enablePositionIncrements="true"
/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPossessiveFilterFactory"/>
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
<!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
<filter class="solr.EnglishMinimalStemFilterFactory"/>
-->
<filter class="solr.PorterStemFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
</analyzer>
</fieldType>
<fieldType name="ngram" class="solr.TextField" >
<analyzer type="index">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.NGramFilterFactory" minGramSize="3" maxGramSize="15" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="edge_ngram" class="solr.TextField" positionIncrementGap="1">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
<filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="15" side="front" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
</analyzer>
</fieldType>
</types>
<fields>
<!-- general -->
<field name="id" type="string" indexed="true" stored="true" multiValued="false" required="true"/>
<field name="django_ct" type="string" indexed="true" stored="true" multiValued="false"/>
<field name="django_id" type="string" indexed="true" stored="true" multiValued="false"/>
<field name="_version_" type="long" indexed="true" stored="true"/>
<dynamicField name="*_i" type="int" indexed="true" stored="true"/>
<dynamicField name="*_s" type="string" indexed="true" stored="true"/>
<dynamicField name="*_l" type="long" indexed="true" stored="true"/>
<dynamicField name="*_t" type="text_en" indexed="true" stored="true"/>
<dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>
<dynamicField name="*_f" type="float" indexed="true" stored="true"/>
<dynamicField name="*_d" type="double" indexed="true" stored="true"/>
<dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
<dynamicField name="*_p" type="location" indexed="true" stored="true"/>
<dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false"/>
<field name="name_ru" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="url" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="text" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="catalog_name_ru" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="catalog_name_en" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="content_auto" type="edge_ngram" indexed="true" stored="true" multiValued="false" />
<field name="form_name" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="name_en" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="area_id" type="long" indexed="true" stored="true" multiValued="false" />
<field name="city_id" type="long" indexed="true" stored="true" multiValued="false" />
<field name="country_id" type="long" indexed="true" stored="true" multiValued="false" />
<field name="theme" type="text_en" indexed="true" stored="true" multiValued="true" />
<field name="tag" type="text_en" indexed="true" stored="true" multiValued="true" />
<field name="where" type="text_en" indexed="true" stored="true" multiValued="true" />
<field name="data_end" type="date" indexed="true" stored="true" multiValued="false" />
<field name="members_choice" type="long" indexed="true" stored="true" multiValued="false" />
<field name="data_begin" type="date" indexed="true" stored="true" multiValued="false" />
<field name="visitors_choice" type="long" indexed="true" stored="true" multiValued="false" />
<field name="price_choice" type="long" indexed="true" stored="true" multiValued="false" />
<field name="city" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="country" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="parent_en" type="text_en" indexed="true" stored="true" multiValued="false" />
<field name="parent_ru" type="text_en" indexed="true" stored="true" multiValued="false" />
</fields>
<!-- field to use to determine and enforce document uniqueness. -->
<uniqueKey>id</uniqueKey>
<!-- field for the QueryParser to use when an explicit fieldname is absent -->
<defaultSearchField>text</defaultSearchField>
<!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
<solrQueryParser defaultOperator="AND"/>
</schema>

@ -38,7 +38,8 @@ urlpatterns = patterns('',
url(r'^news.php/news_id/(?P<article>\d+)/(?P<some>.*)$', old_redirect, {'redirect_url': '/news/{article}/'}), url(r'^news.php/news_id/(?P<article>\d+)/(?P<some>.*)$', old_redirect, {'redirect_url': '/news/{article}/'}),
url(r'^newsp.php/news_id/(?P<news_p>\d+)/(?P<some>.*)$', old_redirect, {'redirect_url': '/news/{news_p}/'}), url(r'^newsp.php/news_id/(?P<news_p>\d+)/(?P<some>.*)$', old_redirect, {'redirect_url': '/news/{news_p}/'}),
# users # users
url(r'^users/(?P<user>.*)$', old_redirect, {'redirect_url': '/{user}/'}), url(r'^users/(?P<user>.*)/$', old_redirect, {'redirect_url': '/{user}/'}),
url(r'^user/(?P<user>.*)/$', old_redirect, {'redirect_url': '/{user}/'}),
url(r'^account_edit.php$', old_profile), url(r'^account_edit.php$', old_profile),
url(r'^myexpo.php$', old_redirect, {'redirect_url': '/profile/calendar/'}), url(r'^myexpo.php$', old_redirect, {'redirect_url': '/profile/calendar/'}),
url(r'^newsletter2.php?email=(?P<some>.*)$', old_redirect, {'redirect_url': '/profile/settings/'}), url(r'^newsletter2.php?email=(?P<some>.*)$', old_redirect, {'redirect_url': '/profile/settings/'}),

@ -38,32 +38,35 @@ class TagRedirect(RedirectMixin):
model = Tag model = Tag
def get_object_url(self, key, value): def get_object_url(self, key, value):
Model = self.model obj = self._get_object(value)
try: if not obj:
obj = Model.objects.get(old_url=value) if value.endswith('-expo'):
except Model.DoesNotExist: value = value.replace('-expo', '')
try: elif value.endswith('-conf'):
obj = Model.objects.get(url=value) value = value.replace('-conf', '')
except Model.DoesNotExist: obj = self._get_object(value)
if value.endwith('-expo'):
value = value.replace('-expo', '')
elif value.endwith('-conf'):
value = value.replace('-conf', '')
obj = get_object_or_404(old_url=value)
if obj: if obj:
return {key: obj.url} return {key: obj.url}
else: else:
raise Http404 raise Http404
def _get_object(self, value):
obj = None
try:
if self.model.objects.filter(old_url__icontains=value).exists():
obj = self.model.objects.filter(old_url__icontains=value)[0]
except self.model.DoesNotExist:
try:
obj = self.model.objects.get(url=value)
except self.model.DoesNotExist:
pass
return obj
class CompanyRedirect(RedirectMixin): class CompanyRedirect(RedirectMixin):
model = Company model = Company
class EventRedirect(object): class EventRedirect(object):
def get_object_url(self,key, value): def get_object_url(self,key, value):

@ -5114,8 +5114,10 @@ dl.add-info dd ul li {
.m-article .sect-title { .m-article .sect-title {
font-family: dindisplay_pro, sans-serif; font-family: dindisplay_pro, sans-serif;
font-size: 23px; font-size: 23px;
font-weight: bold;
line-height: 24px; line-height: 24px;
margin-bottom: 15px margin-top: 19px;
margin-bottom: 15px;
} }
.e-details .sect-title { .e-details .sect-title {
font-family: dindisplay_pro, sans-serif; font-family: dindisplay_pro, sans-serif;
@ -5538,8 +5540,9 @@ dl.add-info dd ul li {
display: inline-block; display: inline-block;
font-family: dindisplay_pro, sans-serif; font-family: dindisplay_pro, sans-serif;
font-size: 23px; font-size: 23px;
font-weight: bold;
line-height: 24px; line-height: 24px;
margin: 0 0 12px margin: 0 0 12px;
} }
.i-members .im-title:before { .i-members .im-title:before {
content: ' '; content: ' ';
@ -5773,9 +5776,11 @@ dl.add-info dd ul li {
display: inline-block; display: inline-block;
font-family: dindisplay_pro, sans-serif; font-family: dindisplay_pro, sans-serif;
font-size: 23px; font-size: 23px;
font-weight: bold;
line-height: 24px; line-height: 24px;
color: #40bbea; color: #40bbea;
width: 581px width: 581px;
margin: 19px 0px;
} }
.h-booking .sect-title a { .h-booking .sect-title a {
color: #40bbea; color: #40bbea;
@ -5843,7 +5848,8 @@ dl.add-info dd ul li {
.i-events-list .sect-title { .i-events-list .sect-title {
font-size: 23px; font-size: 23px;
line-height: 24px; line-height: 24px;
font-family: dindisplay_pro, sans-serif font-family: dindisplay_pro, sans-serif;
font-weight: bold;
} }
.e-cat { .e-cat {
margin-bottom: 40px margin-bottom: 40px
@ -12710,7 +12716,8 @@ button.gray:hover {
width: 310px!important width: 310px!important
} }
.advertise-window header .pw-title { .advertise-window header .pw-title {
font-weight: 400 font-weight: 400;
margin: 19px 0px;
} }
.advertise-window header { .advertise-window header {
padding-bottom: 0 padding-bottom: 0

File diff suppressed because one or more lines are too long

@ -153,6 +153,7 @@ MIDDLEWARE_CLASSES = (
# Uncomment the next line for simple clickjacking protection: # Uncomment the next line for simple clickjacking protection:
'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.contrib.redirects.middleware.RedirectFallbackMiddleware', 'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
'proj.middleware.RedirectFallbackMiddleware',
) )
@ -351,6 +352,7 @@ INSTALLED_APPS = (
'translator', 'translator',
'webinar', 'webinar',
'meta', 'meta',
'events',
#django modules #django modules
'django_crontab', 'django_crontab',
'sorl.thumbnail', # for logos 'sorl.thumbnail', # for logos

@ -153,7 +153,7 @@ MIDDLEWARE_CLASSES = (
# Uncomment the next line for simple clickjacking protection: # Uncomment the next line for simple clickjacking protection:
'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.contrib.redirects.middleware.RedirectFallbackMiddleware', 'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
'proj.middleware.RedirectFallbackMiddleware',
) )
@ -352,6 +352,7 @@ INSTALLED_APPS = (
'translator', 'translator',
'webinar', 'webinar',
'meta', 'meta',
'events',
#django modules #django modules
'django_crontab', 'django_crontab',
'sorl.thumbnail', # for logos 'sorl.thumbnail', # for logos
@ -552,7 +553,7 @@ if DEBUG:
# logging # logging
U_LOGFILE_SIZE = 1 * 1024 * 1024 U_LOGFILE_SIZE = 1 * 1024 * 1024
U_LOGFILE_COUNT = 2 U_LOGFILE_COUNT = 2
DEFAULT_LOGGER_NAME = 'mail' DEFAULT_LOGGER_NAME = 'django'
LOGGING = { LOGGING = {
'version': 1, 'version': 1,
'disable_existing_loggers': False, 'disable_existing_loggers': False,
@ -575,12 +576,10 @@ LOGGING = {
}, },
}, },
'loggers': { 'loggers': {
'mail': { 'django': {
'handlers': ['file'], 'handlers': ['file'],
'propagate': True, 'propagate': True,
'level': 'DEBUG', 'level': 'DEBUG',
}, },
} }
} }

@ -10,7 +10,7 @@
{% block body %} {% block body %}
<div class="box span10"> <div class="box span9">
<div class="box-header well"> <div class="box-header well">
<h2><i class="icon-arrow-down"></i>Статистика показов попапов</h2> <h2><i class="icon-arrow-down"></i>Статистика показов попапов</h2>
</div> </div>

@ -55,7 +55,7 @@
</div> </div>
<div class="rq-to-hide"> <div class="rq-to-hide">
<div class="s-comments"> <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"> <div class="cat-list sc-comments">
{% for news in object.similar %} {% for news in object.similar %}
<div class="cl-item"> <div class="cl-item">

@ -7,9 +7,9 @@
<div class="h-booking"> <div class="h-booking">
<header class="clearfix"> <header class="clearfix">
<h2 class="sect-title"> <div class="sect-title">
<a target="_blank" href="http://www.booking.com/searchresults.html?aid={{ book_aid }}&city={{ city.id }}{% if event %}&checkin_monthday={{ event.data_begin|date:'j' }}&checkin_year_month={{ event.data_begin|date:'Y' }}-{{ event.data_begin|date:'n' }}&checkout_monthday={{ event.data_end|date:'j' }}&checkout_year_month={{ event.data_end|date:'Y' }}-{{ event.data_end|date:'n' }}{% endif %}">{% trans 'Отели рядом с выставкой от' %} <b>Booking</b>.com</a> <a target="_blank" href="http://www.booking.com/searchresults.html?aid={{ book_aid }}&city={{ city.id }}{% if event %}&checkin_monthday={{ event.data_begin|date:'j' }}&checkin_year_month={{ event.data_begin|date:'Y' }}-{{ event.data_begin|date:'n' }}&checkout_monthday={{ event.data_end|date:'j' }}&checkout_year_month={{ event.data_end|date:'Y' }}-{{ event.data_end|date:'n' }}{% endif %}">{% trans 'Отели рядом с выставкой от' %} <b>Booking</b>.com</a>
</h2> </div>
<a class="more blue2" target="_blank" href="http://www.booking.com/searchresults.html?aid={{ book_aid }}&city={{ city.id }}{% if event %}&checkin_monthday={{ event.data_begin|date:'j' }}&checkin_year_month={{ event.data_begin|date:'Y' }}-{{ event.data_begin|date:'n' }}&checkout_monthday={{ event.data_end|date:'j' }}&checkout_year_month={{ event.data_end|date:'Y' }}-{{ event.data_end|date:'n' }}{% endif %}">{% trans 'Все отели поблизости' %}</a> <a class="more blue2" target="_blank" href="http://www.booking.com/searchresults.html?aid={{ book_aid }}&city={{ city.id }}{% if event %}&checkin_monthday={{ event.data_begin|date:'j' }}&checkin_year_month={{ event.data_begin|date:'Y' }}-{{ event.data_begin|date:'n' }}&checkout_monthday={{ event.data_end|date:'j' }}&checkout_year_month={{ event.data_end|date:'Y' }}-{{ event.data_end|date:'n' }}{% endif %}">{% trans 'Все отели поблизости' %}</a>
</header> </header>
<ul> <ul>

@ -36,7 +36,7 @@
<header> <header>
<h1 class="i-title"> <h1 class="i-title">
{% if event.main_title %} {% if event.main_title %}
{{ event.name|safe }} - {{ event.main_title|safe|lowfirst }} {{ event.name|safe }} - {{ event.main_title|lowfirst|safe }}
{% else %} {% else %}
{{ event.name|safe }} {{ event.name|safe }}
{% endif %} {% endif %}
@ -126,7 +126,7 @@
{% with photos=event.get_photos|slice:"5" %} {% with photos=event.get_photos|slice:"5" %}
<hr /> <hr />
<div class="i-photo-slides"> <div class="i-photo-slides">
<h2 class="sect-title"><a href="#">{% trans 'Фотографии с прошлой конференции' %}</a></h2> <div class="sect-title"><a href="#">{% trans 'Фотографии с прошлой конференции' %}</a></div>
<div id="ps-photo-gallery" class="ps-photo-gallery swiper-container"> <div id="ps-photo-gallery" class="ps-photo-gallery swiper-container">
<ul class="swiper-wrapper"> <ul class="swiper-wrapper">
{% for photo in photos %} {% for photo in photos %}
@ -153,7 +153,7 @@
</div> </div>
<hr /> <hr />
<div class="i-event-additional clearfix"> <div class="i-event-additional clearfix">
<h2 class="sect-title">{% trans 'Дополнительная информация' %}</h2> <div class="sect-title">{% trans 'Дополнительная информация' %}</div>
<ul class="e-docs"> <ul class="e-docs">
{% if event.business_program.exists %} {% if event.business_program.exists %}
<li><a href="{{ event.get_permanent_url }}program/">{% trans 'Деловая программа' %}</a></li> <li><a href="{{ event.get_permanent_url }}program/">{% trans 'Деловая программа' %}</a></li>
@ -221,7 +221,7 @@
{% if companies %} {% if companies %}
{# есть участники #} {# есть участники #}
<header> <header>
<h2 class="im-title">{% trans 'Спикеры' %}</h2> <div class="im-title">{% trans 'Спикеры' %}</div>
<a class="more" href="{{ event.get_permanent_url }}members/">{% trans 'Все спикеры' %}</a> <a class="more" href="{{ event.get_permanent_url }}members/">{% trans 'Все спикеры' %}</a>
</header> </header>
<ul> <ul>
@ -242,7 +242,7 @@
{% else %} {% else %}
{# нет участников #} {# нет участников #}
<header> <header>
<h2 class="im-title">{% trans 'Спикеры' %}</h2> <div class="im-title">{% trans 'Спикеры' %}</div>
<p>{% trans 'Разместите информацию о ключевых спикерах' %}</p> <p>{% trans 'Разместите информацию о ключевых спикерах' %}</p>
<p><a href="#pw-advertise" class="button icon-up pw-open" >{% trans 'Рекламировать спикера' %}</a></p> <p><a href="#pw-advertise" class="button icon-up pw-open" >{% trans 'Рекламировать спикера' %}</a></p>
</header> </header>
@ -253,7 +253,7 @@
<div class="im-visitors"> <div class="im-visitors">
{% with visitors=event.users.all|slice:":17" %} {% with visitors=event.users.all|slice:":17" %}
<header> <header>
<h2 class="im-title">{% trans 'Посетители' %}</h2> <div class="im-title">{% trans 'Посетители' %}</div>
</header> </header>
<ul id="visitors-list"> <ul id="visitors-list">
{% if visitors %} {% if visitors %}
@ -296,7 +296,7 @@
<hr /> <hr />
{% if event.get_nearest_events|slice:":6" %} {% if event.get_nearest_events|slice:":6" %}
<div class="e-cat"> <div class="e-cat">
<h2 class="sect-title">{% trans 'Ближайшие конференции по тематике' %} <a href="{{ expo_catalog }}theme/{{ event.theme.all.0.url }}">«{{ event.theme.all.0 }}»</a></h2> <div class="sect-title">{% trans 'Ближайшие конференции по тематике' %} <a href="{{ expo_catalog }}theme/{{ event.theme.all.0.url }}">«{{ event.theme.all.0 }}»</a></div>
<ul class="cat-list cl-exhibitions"> <ul class="cat-list cl-exhibitions">
{% for exp in event.get_nearest_events %} {% for exp in event.get_nearest_events %}
<li class="cl-item"> <li class="cl-item">
@ -357,7 +357,7 @@
{% include 'client/includes/banners/detail_inner_3.html' %} {% include 'client/includes/banners/detail_inner_3.html' %}
<div class="e-cat look-also"> <div class="e-cat look-also">
<h2 class="sect-title">{% trans 'Смотрите также:' %}</h2> <div class="sect-title">{% trans 'Смотрите также:' %}</div>
<a href="{{ event.catalog }}city/{{ event.city.url }}/">{% trans "Конференции" %} {% if request.LANGUAGE_CODE == 'ru' and event.city.inflect %}{{ event.city.inflect }}{% else %}{% trans 'in' %} {{ event.city.name }}{% endif %}</a> <a href="{{ event.catalog }}city/{{ event.city.url }}/">{% trans "Конференции" %} {% if request.LANGUAGE_CODE == 'ru' and event.city.inflect %}{{ event.city.inflect }}{% else %}{% trans 'in' %} {{ event.city.name }}{% endif %}</a>
<a href="{{ event.catalog }}country/{{ event.country.url }}/">{% trans "Конференции" %} {% if request.LANGUAGE_CODE == 'ru' and event.country.inflect %}{{ event.country.inflect }}{% else %}{% trans 'in' %} {{ event.country.name }}{% endif %}</a> <a href="{{ event.catalog }}country/{{ event.country.url }}/">{% trans "Конференции" %} {% if request.LANGUAGE_CODE == 'ru' and event.country.inflect %}{{ event.country.inflect }}{% else %}{% trans 'in' %} {{ event.country.name }}{% endif %}</a>
{% if event.theme.all %} {% if event.theme.all %}

@ -44,7 +44,7 @@
<header> <header>
<h1 class="i-title"> <h1 class="i-title">
{% if event.main_title %} {% if event.main_title %}
{{ event.name|safe }} - {{ event.main_title|safe|lowfirst }} {{ event.name|safe }} - {{ event.main_title|lowfirst|safe }}
{% else %} {% else %}
{{ event.name|safe }} {{ event.name|safe }}
{% endif %} {% endif %}
@ -166,7 +166,7 @@
{% with photos=event.get_photos|slice:"5" %} {% with photos=event.get_photos|slice:"5" %}
<hr /> <hr />
<div class="i-photo-slides"> <div class="i-photo-slides">
<h2 class="sect-title"><a href="#">{% trans 'Фотографии с прошлой конференции' %}</a></h2> <div class="sect-title"><a href="#">{% trans 'Фотографии с прошлой конференции' %}</a></div>
<div id="ps-photo-gallery" class="ps-photo-gallery swiper-container"> <div id="ps-photo-gallery" class="ps-photo-gallery swiper-container">
<ul class="swiper-wrapper"> <ul class="swiper-wrapper">
{% for photo in photos %} {% for photo in photos %}
@ -195,7 +195,7 @@
<hr /> <hr />
<div class="i-event-additional clearfix"> <div class="i-event-additional clearfix">
<h2 class="sect-title">{% trans 'Дополнительная информация' %}</h2> <div class="sect-title">{% trans 'Дополнительная информация' %}</div>
<ul class="e-docs"> <ul class="e-docs">
{% if event.business_program.exists %} {% if event.business_program.exists %}
<li><a href="{{ event.get_permanent_url }}program/">{% trans 'Деловая программа' %}</a></li> <li><a href="{{ event.get_permanent_url }}program/">{% trans 'Деловая программа' %}</a></li>
@ -254,7 +254,7 @@
{% if companies %} {% if companies %}
{# есть участники #} {# есть участники #}
<header> <header>
<h2 class="im-title">{% trans 'Спикеры' %}</h2> <div class="im-title">{% trans 'Спикеры' %}</div>
<a class="more" href="{{ event.get_permanent_url }}members/">{% trans 'Все спикеры' %}</a> <a class="more" href="{{ event.get_permanent_url }}members/">{% trans 'Все спикеры' %}</a>
</header> </header>
<ul> <ul>
@ -275,7 +275,7 @@
{% else %} {% else %}
{# нет участников #} {# нет участников #}
<header> <header>
<h2 class="im-title">{% trans 'Спикеры' %}</h2> <div class="im-title">{% trans 'Спикеры' %}</div>
<p>{% trans 'Разместите информацию о ключевых спикерах' %}</p> <p>{% trans 'Разместите информацию о ключевых спикерах' %}</p>
<p><a href="#pw-advertise" class="button icon-up pw-open" >{% trans 'Рекламировать спикера' %}</a></p> <p><a href="#pw-advertise" class="button icon-up pw-open" >{% trans 'Рекламировать спикера' %}</a></p>
</header> </header>
@ -286,7 +286,7 @@
<div class="im-visitors"> <div class="im-visitors">
{% with visitors=event.users.all|slice:":17" %} {% with visitors=event.users.all|slice:":17" %}
<header> <header>
<h2 class="im-title">{% trans 'Посетители' %}</h2> <div class="im-title">{% trans 'Посетители' %}</div>
</header> </header>
<ul id="visitors-list"> <ul id="visitors-list">
{% if visitors %} {% if visitors %}
@ -331,7 +331,7 @@
{% if event.get_nearest_events|slice:":6" %} {% if event.get_nearest_events|slice:":6" %}
<div class="e-cat"> <div class="e-cat">
<h2 class="sect-title">{% trans 'Ближайшие конференции по тематике' %} <a href="{{ expo_catalog }}theme/{{ event.theme.all.0.url }}">«{{ event.theme.all.0 }}»</a></h2> <div class="sect-title">{% trans 'Ближайшие конференции по тематике' %} <a href="{{ expo_catalog }}theme/{{ event.theme.all.0.url }}">«{{ event.theme.all.0 }}»</a></div>
<ul class="cat-list cl-exhibitions"> <ul class="cat-list cl-exhibitions">
{% for exp in event.get_nearest_events %} {% for exp in event.get_nearest_events %}
<li class="cl-item"> <li class="cl-item">
@ -392,7 +392,7 @@
{% include 'client/includes/banners/detail_inner_3.html' %} {% include 'client/includes/banners/detail_inner_3.html' %}
<div class="e-cat look-also"> <div class="e-cat look-also">
<h2 class="sect-title">{% trans 'Смотрите также:' %}</h2> <div class="sect-title">{% trans 'Смотрите также:' %}</div>
<a href="{{ event.catalog }}city/{{ event.city.url }}/">{% trans "Конференции" %} {% if request.LANGUAGE_CODE == 'ru' and event.city.inflect %}{{ event.city.inflect }}{% else %}{% trans 'in' %} {{ event.city.name }}{% endif %}</a> <a href="{{ event.catalog }}city/{{ event.city.url }}/">{% trans "Конференции" %} {% if request.LANGUAGE_CODE == 'ru' and event.city.inflect %}{{ event.city.inflect }}{% else %}{% trans 'in' %} {{ event.city.name }}{% endif %}</a>
<a href="{{ event.catalog }}country/{{ event.country.url }}/">{% trans "Конференции" %} {% if request.LANGUAGE_CODE == 'ru' and event.country.inflect %}{{ event.country.inflect }}{% else %}{% trans 'in' %} {{ event.country.name }}{% endif %}</a> <a href="{{ event.catalog }}country/{{ event.country.url }}/">{% trans "Конференции" %} {% if request.LANGUAGE_CODE == 'ru' and event.country.inflect %}{{ event.country.inflect }}{% else %}{% trans 'in' %} {{ event.country.name }}{% endif %}</a>
{% if event.theme.all %} {% if event.theme.all %}

@ -10,7 +10,7 @@
</div> </div>
<div class="filters"> <div class="filters">
{% csrf_token %} {# {% csrf_token %} #}
{% for field in form %} {% for field in form %}
{% if field.errors %}error{% endif %} {% if field.errors %}error{% endif %}

@ -42,7 +42,7 @@
<header> <header>
<h1 class="i-title"> <h1 class="i-title">
{% if exposition.main_title %} {% if exposition.main_title %}
{{ exposition.name|safe }} - {{ exposition.main_title|safe|lowfirst }} {{ exposition.name|safe }} - {{ exposition.main_title|lowfirst|safe }}
{% else %} {% else %}
{{ exposition.name|safe }} {{ exposition.name|safe }}
{% endif %} {% endif %}
@ -151,7 +151,7 @@
{% with photos=exposition.get_photos|slice:"5" %} {% with photos=exposition.get_photos|slice:"5" %}
<hr /> <hr />
<div class="i-photo-slides"> <div class="i-photo-slides">
<h2 class="sect-title"><a href="#">{% trans 'Фотографии с прошлой выставки' %}</a></h2> <div class="sect-title"><a href="#">{% trans 'Фотографии с прошлой выставки' %}</a></div>
<div id="ps-photo-gallery" class="ps-photo-gallery swiper-container"> <div id="ps-photo-gallery" class="ps-photo-gallery swiper-container">
<ul class="swiper-wrapper"> <ul class="swiper-wrapper">
{% for photo in photos %} {% for photo in photos %}
@ -178,7 +178,7 @@
{% endif %} {% endif %}
<div class="i-event-additional clearfix"> <div class="i-event-additional clearfix">
<h2 class="sect-title">{% trans 'Дополнительная информация' %}</h2> <div class="sect-title">{% trans 'Дополнительная информация' %}</div>
<ul class="e-docs"> <ul class="e-docs">
{% if exposition.business_program.exists %} {% if exposition.business_program.exists %}
<li><a href="{{ exposition.get_permanent_url }}program/">{% trans 'Деловая программа' %}</a></li> <li><a href="{{ exposition.get_permanent_url }}program/">{% trans 'Деловая программа' %}</a></li>
@ -236,7 +236,7 @@
{% if companies %} {% if companies %}
{# есть участники #} {# есть участники #}
<header> <header>
<h2 class="im-title">{% trans 'Участники' %}</h2> <div class="im-title">{% trans 'Участники' %}</div>
<a class="more" href="{{ exposition.get_permanent_url }}members/">{% trans 'Все участники' %}</a> <a class="more" href="{{ exposition.get_permanent_url }}members/">{% trans 'Все участники' %}</a>
</header> </header>
@ -258,7 +258,7 @@
{% else %} {% else %}
{# нет участников #} {# нет участников #}
<header> <header>
<h2 class="im-title">{% trans 'Участники' %}</h2> <div class="im-title">{% trans 'Участники' %}</div>
<p>{% trans 'Привлекайте целевых посетителей на стенд' %}</p> <p>{% trans 'Привлекайте целевых посетителей на стенд' %}</p>
<p><a href="#pw-advertise" class="button icon-up pw-open" >{% trans "Рекламировать участника" %}</a></p> <p><a href="#pw-advertise" class="button icon-up pw-open" >{% trans "Рекламировать участника" %}</a></p>
</header> </header>
@ -268,7 +268,7 @@
<div class="im-visitors"> <div class="im-visitors">
{% with visitors=exposition.users.all|slice:":17" %} {% with visitors=exposition.users.all|slice:":17" %}
<header> <header>
<h2 class="im-title">{% trans 'Посетители' %}</h2> <div class="im-title">{% trans 'Посетители' %}</div>
</header> </header>
<ul id="visitors-list"> <ul id="visitors-list">
{% if visitors %} {% if visitors %}
@ -328,7 +328,7 @@
{% if exposition.get_nearest_events|slice:":6" %} {% if exposition.get_nearest_events|slice:":6" %}
<div class="e-cat"> <div class="e-cat">
<h2 class="sect-title">{% trans 'Ближайшие выставки по тематике' %} <a href="{{ expo_catalog }}theme/{{ exposition.theme.all.0.url }}">«{{ exposition.theme.all.0 }}»</a></h2> <div class="sect-title">{% trans 'Ближайшие выставки по тематике' %} <a href="{{ expo_catalog }}theme/{{ exposition.theme.all.0.url }}">«{{ exposition.theme.all.0 }}»</a></div>
<ul class="cat-list cl-exhibitions"> <ul class="cat-list cl-exhibitions">
{% for exp in exposition.get_nearest_events %} {% for exp in exposition.get_nearest_events %}
<li class="cl-item"> <li class="cl-item">
@ -376,7 +376,7 @@
{% endif %} {% endif %}
<div class="e-cat look-also"> <div class="e-cat look-also">
<h2 class="sect-title">{% trans 'Смотрите также:' %}</h2> <div class="sect-title">{% trans 'Смотрите также:' %}</div>
<a href="{{ exposition.catalog }}city/{{ exposition.city.url }}/">{% trans "Выставки" %} {% if request.LANGUAGE_CODE == 'ru' and exposition.city.inflect %}{{ exposition.city.inflect }}{% else %}{% trans 'in' %} {{ exposition.city.name }}{% endif %}</a> <a href="{{ exposition.catalog }}city/{{ exposition.city.url }}/">{% trans "Выставки" %} {% if request.LANGUAGE_CODE == 'ru' and exposition.city.inflect %}{{ exposition.city.inflect }}{% else %}{% trans 'in' %} {{ exposition.city.name }}{% endif %}</a>
<a href="{{ exposition.catalog }}country/{{ exposition.country.url }}/">{% trans "Выставки" %} {% if request.LANGUAGE_CODE == 'ru' and exposition.country.inflect %}{{ exposition.country.inflect }}{% else %}{% trans 'in' %} {{ exposition.country.name }}{% endif %}</a> <a href="{{ exposition.catalog }}country/{{ exposition.country.url }}/">{% trans "Выставки" %} {% if request.LANGUAGE_CODE == 'ru' and exposition.country.inflect %}{{ exposition.country.inflect }}{% else %}{% trans 'in' %} {{ exposition.country.name }}{% endif %}</a>
{% if exposition.theme.all %} {% if exposition.theme.all %}

@ -39,7 +39,7 @@
<header> <header>
<h1 class="i-title"> <h1 class="i-title">
{% if exposition.main_title %} {% if exposition.main_title %}
{{ exposition.name|safe }} - {{ exposition.main_title|safe|lowfirst }} {{ exposition.name|safe }} - {{ exposition.main_title|lowfirst|safe }}
{% else %} {% else %}
{{ exposition.name|safe }} {{ exposition.name|safe }}
{% endif %} {% endif %}
@ -130,7 +130,7 @@
{% with photos=exposition.get_photos|slice:"5" %} {% with photos=exposition.get_photos|slice:"5" %}
<hr /> <hr />
<div class="i-photo-slides"> <div class="i-photo-slides">
<h2 class="sect-title"><a href="#">{% trans 'Фотографии с прошлой выставки' %}</a></h2> <div class="sect-title"><a href="#">{% trans 'Фотографии с прошлой выставки' %}</a></div>
<div id="ps-photo-gallery" class="ps-photo-gallery swiper-container"> <div id="ps-photo-gallery" class="ps-photo-gallery swiper-container">
<ul class="swiper-wrapper"> <ul class="swiper-wrapper">
{% for photo in photos %} {% for photo in photos %}
@ -159,7 +159,7 @@
<hr /> <hr />
{% include 'client/includes/banners/expo_detail.html' %} {% include 'client/includes/banners/expo_detail.html' %}
<div id="additional" class="i-event-additional clearfix"> <div id="additional" class="i-event-additional clearfix">
<h2 class="sect-title">{% trans 'Дополнительная информация' %}</h2> <div class="sect-title">{% trans 'Дополнительная информация' %}</div>
<ul class="e-docs"> <ul class="e-docs">
{% if exposition.business_program.exists %} {% if exposition.business_program.exists %}
<li><a href="{{ exposition.get_permanent_url }}program/">{% trans 'Деловая программа' %}</a></li> <li><a href="{{ exposition.get_permanent_url }}program/">{% trans 'Деловая программа' %}</a></li>
@ -234,7 +234,7 @@
{% if companies %} {% if companies %}
{# есть участники #} {# есть участники #}
<header> <header>
<h2 class="im-title">{% trans 'Участники' %}</h2> <div class="im-title">{% trans 'Участники' %}</div>
<a class="more" href="{{ exposition.get_permanent_url }}members/">{% trans 'Все участники' %}</a> <a class="more" href="{{ exposition.get_permanent_url }}members/">{% trans 'Все участники' %}</a>
</header> </header>
@ -256,7 +256,7 @@
{% else %} {% else %}
{# нет участников #} {# нет участников #}
<header> <header>
<h2 class="im-title">{% trans 'Участники' %}</h2> <div class="im-title">{% trans 'Участники' %}</div>
<p>{% trans 'Привлекайте целевых посетителей на стенд' %}</p> <p>{% trans 'Привлекайте целевых посетителей на стенд' %}</p>
<p><a href="#pw-advertise" class="button icon-up pw-open" >{% trans 'Рекламировать участника' %}</a></p> <p><a href="#pw-advertise" class="button icon-up pw-open" >{% trans 'Рекламировать участника' %}</a></p>
</header> </header>
@ -266,7 +266,7 @@
<div class="im-visitors"> <div class="im-visitors">
{% with visitors=exposition.users.all|slice:":17" %} {% with visitors=exposition.users.all|slice:":17" %}
<header> <header>
<h2 class="im-title">{% trans 'Посетители' %}</h2> <div class="im-title">{% trans 'Посетители' %}</div>
</header> </header>
<ul id="visitors-list"> <ul id="visitors-list">
{% if visitors %} {% if visitors %}
@ -323,7 +323,7 @@
<hr /> <hr />
{% if exposition.get_nearest_events|slice:":6" %} {% if exposition.get_nearest_events|slice:":6" %}
<div class="e-cat"> <div class="e-cat">
<h2 class="sect-title">{% trans 'Ближайшие выставки по тематике' %} <a href="{{ expo_catalog }}theme/{{ exposition.theme.all.0.url }}">«{{ exposition.theme.all.0 }}»</a></h2> <div class="sect-title">{% trans 'Ближайшие выставки по тематике' %} <a href="{{ expo_catalog }}theme/{{ exposition.theme.all.0.url }}">«{{ exposition.theme.all.0 }}»</a></div>
<ul class="cat-list cl-exhibitions"> <ul class="cat-list cl-exhibitions">
{% for exp in exposition.get_nearest_events %} {% for exp in exposition.get_nearest_events %}
<li class="cl-item"> <li class="cl-item">
@ -381,7 +381,7 @@
{% include 'client/includes/banners/detail_inner_3.html' %} {% include 'client/includes/banners/detail_inner_3.html' %}
{% endif %} {% endif %}
<div class="e-cat look-also"> <div class="e-cat look-also">
<h2 class="sect-title">{% trans 'Смотрите также:' %}</h2> <div class="sect-title">{% trans 'Смотрите также:' %}</div>
<a href="{{ exposition.catalog }}city/{{ exposition.city.url }}/">{% trans "Выставки" %} {% if request.LANGUAGE_CODE == 'ru' and exposition.city.inflect %}{{ exposition.city.inflect }}{% else %}{% trans 'in' %} {{ exposition.city.name }}{% endif %}</a> <a href="{{ exposition.catalog }}city/{{ exposition.city.url }}/">{% trans "Выставки" %} {% if request.LANGUAGE_CODE == 'ru' and exposition.city.inflect %}{{ exposition.city.inflect }}{% else %}{% trans 'in' %} {{ exposition.city.name }}{% endif %}</a>
<a href="{{ exposition.catalog }}country/{{ exposition.country.url }}/">{% trans "Выставки" %} {% if request.LANGUAGE_CODE == 'ru' and exposition.country.inflect %}{{ exposition.country.inflect }}{% else %}{% trans 'in' %} {{ exposition.country.name }}{% endif %}</a> <a href="{{ exposition.catalog }}country/{{ exposition.country.url }}/">{% trans "Выставки" %} {% if request.LANGUAGE_CODE == 'ru' and exposition.country.inflect %}{{ exposition.country.inflect }}{% else %}{% trans 'in' %} {{ exposition.country.name }}{% endif %}</a>
{% if exposition.theme.all %} {% if exposition.theme.all %}

@ -5,7 +5,7 @@
<header class="layout"> <header class="layout">
<div class="header-wrap layout-wrap"> <div class="header-wrap layout-wrap">
<div class="logo beta"> <div class="logo beta">
<h2><a href="/"><strong style="padding-top: 89px; width: 235px;">Expomap</strong> </a></h2> <a href="/"><strong style="padding-top: 89px; width: 235px;">Expomap</strong> </a>
</div> </div>
<div class="header-body mcl"> <div class="header-body mcl">

@ -206,8 +206,8 @@
<div class="cli-dim">{{ pl.total_area }}</div> <div class="cli-dim">{{ pl.total_area }}</div>
{% endif %} {% endif %}
<div class="cli-place"> <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="/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> {{ pl.adress }}
</div> </div>
</div> </div>
</div> </div>

@ -5,7 +5,7 @@
<section> <section>
<header class="clearfix"> <header class="clearfix">
<h2 class="pw-title">{% trans 'Рекламировать спикера' %}</h2> <div class="pw-title">{% trans 'Рекламировать спикера' %}</div>
<p><strong>{% trans "Вы хотите мотивировать участников прийти на конференцию?" %}</strong> {% trans "Дайте визуальную информацию о спикерах на странице конференции на" %} <span class="bd-dashed">Expomap!</span> {% trans "Это отличная возможность показать масштаб и качество Вашего мероприятия!" %}</p> <p><strong>{% trans "Вы хотите мотивировать участников прийти на конференцию?" %}</strong> {% trans "Дайте визуальную информацию о спикерах на странице конференции на" %} <span class="bd-dashed">Expomap!</span> {% trans "Это отличная возможность показать масштаб и качество Вашего мероприятия!" %}</p>
<p>{% trans "Оставьте свои контакты, и мы вышлем Вам информацию о вариантах и ценах!" %}</p> <p>{% trans "Оставьте свои контакты, и мы вышлем Вам информацию о вариантах и ценах!" %}</p>
</header> </header>

Loading…
Cancel
Save