Merge branch 'develop' of gitlab.com:OldminTeam/expomap into develop

remotes/origin/tests
ya_dim4ik 9 years ago
commit 7a4a9fc6e6
  1. 5
      .gitignore
  2. 3
      Makefile
  3. 49
      README.md
  4. 8
      accounts/forms.py
  5. BIN
      docs/documentation.docx
  6. 32
      emencia/django/newsletter/admin_forms.py
  7. 2
      emencia/django/newsletter/mailer.py
  8. 272
      emencia/django/newsletter/south_migrations_old(27.06.16)/0001_initial.py
  9. 130
      emencia/django/newsletter/south_migrations_old(27.06.16)/0002_auto__add_attachment.py
  10. 123
      emencia/django/newsletter/south_migrations_old(27.06.16)/0003_auto__add_unique_newsletter_slug.py
  11. 0
      emencia/django/newsletter/south_migrations_old(27.06.16)/__init__.py
  12. 23
      emencia/django/newsletter/views/admin_views.py
  13. 380
      fabfile.py
  14. BIN
      jpegsrc.v8c.tar.gz
  15. 7
      package.json
  16. 2
      place_exposition/models.py
  17. 16
      proj/production.py
  18. 124
      proj/settings.py
  19. 3
      proj/urls.py
  20. 38
      registration/backends/default/views.py
  21. 3
      requirements.txt
  22. 0
      schema.xml
  23. 2
      service/order_forms.py
  24. 5
      static/client/css/main.css
  25. 2
      static/client/css_min/main.min.css
  26. 1
      support/4885b11a73674eb6d54593c1d7efd758821e5ee79b8132feecaba10560f0123a.html
  27. 2
      support/apache.conf
  28. 629
      support/d_dev/settings.py
  29. 1
      support/dev/.htpasswd
  30. 201
      support/dev/schema.xml
  31. 89
      support/dev/tech_work_hit.expomap.ru
  32. 25
      support/dev_work.html
  33. 23
      support/nginx.conf
  34. 84
      support/prod/hit.expomap.ru
  35. 31
      support/prod/proj.com
  36. 201
      support/prod/schema.xml
  37. 627
      support/prod/settings.py
  38. 97
      support/prod/tech_work_hit.expomap.ru
  39. 1
      templates/c_admin/exposition/exposition_list.html
  40. 20
      templates/c_admin/newsletters/newsletter_list_daily.html
  41. 145
      templates/client/accounts/settings.html
  42. 6
      templates/client/exposition/exposition_detail.html
  43. 173
      templates/client/includes/exposition/expo_paid.html
  44. 263
      templates/client/includes/exposition/exposition_object.html
  45. 10
      templates/client/includes/exposition/services.html
  46. 2
      templates/client/includes/header.html
  47. 6
      templates/client/includes/reverseorder_warning.html
  48. 102
      templates/client/popups/register.html
  49. 3
      templates/client/service/tickets.html
  50. 2
      templates/client/simple_pages/participation_landing.html

5
.gitignore vendored

@ -10,10 +10,9 @@ media/
media
logs/
Thumbs.db
/proj/local.py
proj/local.py
.DS_Store
locale
proj/settings.py
locale/
collected_static
# gulp

@ -20,7 +20,6 @@ syncdb:
@PYTHONPATH=$(PYTHONPATH):. DJANGO_SETTINGS_MODULE=$(project_name).settings ipython manage.py migrate
run:
-/opt/solr/bin/solr start -p 8983
@PYTHONPATH=$(PYTHONPATH):. DJANGO_SETTINGS_MODULE=$(project_name).settings ipython manage.py runserver
run-public:
@ -42,7 +41,7 @@ compilemessages:
-@ipython manage.py compilemessages
collectstatic:
@ipython manage.py collectstatic
@ipython manage.py collectstatic --noinput
user:
-@ipython manage.py createsuperuser

@ -12,33 +12,58 @@ pip install south -U
### proj/local.py EXAMPLE
```python
# -*- coding: utf-8 -*-
from proj.settings import *
from settings import *
DEBUG = True
DEFAULT_HTTP_SCHEME = 'http'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'expomap',
'USER': 'root',
'PASSWORD': '***',
'PASSWORD': '1',
'HOST': '',
'PORT': '',
}
}
CACHES = {
"default": {
"BACKEND": "redis_cache.cache.RedisCache",
"LOCATION": "/var/run/redis/redis.sock",
"OPTIONS": {
"CLIENT_CLASS": "redis_cache.client.DefaultClient",
},
}
}
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
INSTALLED_APPS += ('south',)
# debug_toolbar settings
DEBUG_TOOLBAR_PATCH_SETTINGS = False
INTERNAL_IPS = ('127.0.0.1',)
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
INSTALLED_APPS += (
'debug_toolbar',
)
JQUERY_URL = os.path.join(SITE_ROOT, 'static/client/js/jquery-ui-1.10.4.custom.min.js'),
DEBUG_TOOLBAR_PANELS = [
#'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.staticfiles.StaticFilesPanel',
'debug_toolbar.panels.templates.TemplatesPanel',
'debug_toolbar.panels.cache.CachePanel',
'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar.panels.redirects.RedirectsPanel',
]
```
#
@ -77,3 +102,5 @@ bin/solr start -p 8983
python manage.py migrate expobanner 0001 --fake
python manage.py migrate expobanner
```
Каталог support хранит конфиги для продакшн сервера

@ -7,7 +7,7 @@ from random import choice
from django import forms
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.forms.util import ErrorList
from django.utils.translation import ugettext as _
from django.utils.translation import ugettext as _, ugettext_lazy
from django.conf import settings
from models import User
from django.db.models import Q
@ -161,14 +161,14 @@ class ChangePasswordForm(forms.Form):
"""
old_password = forms.CharField(label=_(u'Old password'), required=True,
widget=forms.PasswordInput(render_value=False,
attrs={'placeholder': _(u'Введите старый пароль')}))
attrs={'placeholder': ugettext_lazy(u'Введите старый пароль')}))
new_password = forms.CharField(label=_(u'New password'), required=True,
widget=forms.PasswordInput(render_value=False,
attrs={'placeholder': _(u'Придумайте новый пароль')}))
attrs={'placeholder': ugettext_lazy(u'Придумайте новый пароль')}))
new_password_confirm = forms.CharField(label=_(u'Confirm password'), required=True,
widget=forms.PasswordInput(render_value=False,
attrs={
'placeholder': _(u'Повторите новый пароль')}))
'placeholder': ugettext_lazy(u'Повторите новый пароль')}))
def clean(self):
data = super(ChangePasswordForm, self).clean()

Binary file not shown.

@ -302,4 +302,34 @@ class NewsletterRecommendForm(forms.ModelForm):
if not obj.pk:
obj.save()
obj.theme = self.cleaned_data['theme']
return obj
return obj
class NewsletterFilterForm(forms.Form):
"""
Форма для фильтра рассылок по дате
"""
model = Newsletter
start_date = forms.DateField(
label=_(u'Начальная дата отправки'),
required=False
)
end_date = forms.DateField(
label=_(u'Конечная дата отправки'),
required=False
)
def filter(self):
"""
Фильтр данных
"""
qs = self.model.objects.all()
if self.cleaned_data.get('start_date'):
qs = qs.filter(sending_date__gte=self.cleaned_data['start_date'])
if self.cleaned_data.get('end_date'):
qs = qs.filter(sending_date__lte=self.cleaned_data['end_date'])
return qs

@ -577,7 +577,7 @@ class NewsLetterSender(object):
def test():
from django.utils.translation import activate
activate('ru')
n = Newsletter.objects.get(pk=119)
n = Newsletter.objects.get(pk=214)
m = Mailer(n, test=True)
m.smtp_connect()
m.attachments = m.build_daily_attachments()

@ -1,272 +0,0 @@
from south.db import db
from django.db import models
from emencia.django.newsletter.models import *
class Migration:
def forwards(self, orm):
# Adding model 'MailingList'
db.create_table('newsletter_mailinglist', (
('id', orm['newsletter.MailingList:id']),
('name', orm['newsletter.MailingList:name']),
('description', orm['newsletter.MailingList:description']),
('creation_date', orm['newsletter.MailingList:creation_date']),
('modification_date', orm['newsletter.MailingList:modification_date']),
))
db.send_create_signal('newsletter', ['MailingList'])
# Adding model 'ContactMailingStatus'
db.create_table('newsletter_contactmailingstatus', (
('id', orm['newsletter.ContactMailingStatus:id']),
('newsletter', orm['newsletter.ContactMailingStatus:newsletter']),
('contact', orm['newsletter.ContactMailingStatus:contact']),
('status', orm['newsletter.ContactMailingStatus:status']),
('link', orm['newsletter.ContactMailingStatus:link']),
('creation_date', orm['newsletter.ContactMailingStatus:creation_date']),
))
db.send_create_signal('newsletter', ['ContactMailingStatus'])
# Adding model 'WorkGroup'
db.create_table('newsletter_workgroup', (
('id', orm['newsletter.WorkGroup:id']),
('name', orm['newsletter.WorkGroup:name']),
('group', orm['newsletter.WorkGroup:group']),
))
db.send_create_signal('newsletter', ['WorkGroup'])
# Adding model 'Link'
db.create_table('newsletter_link', (
('id', orm['newsletter.Link:id']),
('title', orm['newsletter.Link:title']),
('url', orm['newsletter.Link:url']),
('creation_date', orm['newsletter.Link:creation_date']),
))
db.send_create_signal('newsletter', ['Link'])
# Adding model 'Newsletter'
db.create_table('newsletter_newsletter', (
('id', orm['newsletter.Newsletter:id']),
('title', orm['newsletter.Newsletter:title']),
('content', orm['newsletter.Newsletter:content']),
('mailing_list', orm['newsletter.Newsletter:mailing_list']),
('server', orm['newsletter.Newsletter:server']),
('header_sender', orm['newsletter.Newsletter:header_sender']),
('header_reply', orm['newsletter.Newsletter:header_reply']),
('status', orm['newsletter.Newsletter:status']),
('sending_date', orm['newsletter.Newsletter:sending_date']),
('slug', orm['newsletter.Newsletter:slug']),
('creation_date', orm['newsletter.Newsletter:creation_date']),
('modification_date', orm['newsletter.Newsletter:modification_date']),
))
db.send_create_signal('newsletter', ['Newsletter'])
# Adding model 'SMTPServer'
db.create_table('newsletter_smtpserver', (
('id', orm['newsletter.SMTPServer:id']),
('name', orm['newsletter.SMTPServer:name']),
('host', orm['newsletter.SMTPServer:host']),
('user', orm['newsletter.SMTPServer:user']),
('password', orm['newsletter.SMTPServer:password']),
('port', orm['newsletter.SMTPServer:port']),
('tls', orm['newsletter.SMTPServer:tls']),
('headers', orm['newsletter.SMTPServer:headers']),
('mails_hour', orm['newsletter.SMTPServer:mails_hour']),
))
db.send_create_signal('newsletter', ['SMTPServer'])
# Adding model 'Contact'
db.create_table('newsletter_contact', (
('id', orm['newsletter.Contact:id']),
('email', orm['newsletter.Contact:email']),
('first_name', orm['newsletter.Contact:first_name']),
('last_name', orm['newsletter.Contact:last_name']),
('subscriber', orm['newsletter.Contact:subscriber']),
('valid', orm['newsletter.Contact:valid']),
('tester', orm['newsletter.Contact:tester']),
('tags', orm['newsletter.Contact:tags']),
('content_type', orm['newsletter.Contact:content_type']),
('object_id', orm['newsletter.Contact:object_id']),
('creation_date', orm['newsletter.Contact:creation_date']),
('modification_date', orm['newsletter.Contact:modification_date']),
))
db.send_create_signal('newsletter', ['Contact'])
# Adding ManyToManyField 'WorkGroup.mailinglists'
db.create_table('newsletter_workgroup_mailinglists', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('workgroup', models.ForeignKey(orm.WorkGroup, null=False)),
('mailinglist', models.ForeignKey(orm.MailingList, null=False))
))
# Adding ManyToManyField 'MailingList.subscribers'
db.create_table('newsletter_mailinglist_subscribers', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('mailinglist', models.ForeignKey(orm.MailingList, null=False)),
('contact', models.ForeignKey(orm.Contact, null=False))
))
# Adding ManyToManyField 'WorkGroup.contacts'
db.create_table('newsletter_workgroup_contacts', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('workgroup', models.ForeignKey(orm.WorkGroup, null=False)),
('contact', models.ForeignKey(orm.Contact, null=False))
))
# Adding ManyToManyField 'WorkGroup.newsletters'
db.create_table('newsletter_workgroup_newsletters', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('workgroup', models.ForeignKey(orm.WorkGroup, null=False)),
('newsletter', models.ForeignKey(orm.Newsletter, null=False))
))
# Adding ManyToManyField 'MailingList.unsubscribers'
db.create_table('newsletter_mailinglist_unsubscribers', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('mailinglist', models.ForeignKey(orm.MailingList, null=False)),
('contact', models.ForeignKey(orm.Contact, null=False))
))
# Adding ManyToManyField 'Newsletter.test_contacts'
db.create_table('newsletter_newsletter_test_contacts', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('newsletter', models.ForeignKey(orm.Newsletter, null=False)),
('contact', models.ForeignKey(orm.Contact, null=False))
))
def backwards(self, orm):
# Deleting model 'MailingList'
db.delete_table('newsletter_mailinglist')
# Deleting model 'ContactMailingStatus'
db.delete_table('newsletter_contactmailingstatus')
# Deleting model 'WorkGroup'
db.delete_table('newsletter_workgroup')
# Deleting model 'Link'
db.delete_table('newsletter_link')
# Deleting model 'Newsletter'
db.delete_table('newsletter_newsletter')
# Deleting model 'SMTPServer'
db.delete_table('newsletter_smtpserver')
# Deleting model 'Contact'
db.delete_table('newsletter_contact')
# Dropping ManyToManyField 'WorkGroup.mailinglists'
db.delete_table('newsletter_workgroup_mailinglists')
# Dropping ManyToManyField 'MailingList.subscribers'
db.delete_table('newsletter_mailinglist_subscribers')
# Dropping ManyToManyField 'WorkGroup.contacts'
db.delete_table('newsletter_workgroup_contacts')
# Dropping ManyToManyField 'WorkGroup.newsletters'
db.delete_table('newsletter_workgroup_newsletters')
# Dropping ManyToManyField 'MailingList.unsubscribers'
db.delete_table('newsletter_mailinglist_unsubscribers')
# Dropping ManyToManyField 'Newsletter.test_contacts'
db.delete_table('newsletter_newsletter_test_contacts')
models = {
'auth.group': {
'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': "orm['auth.Permission']", 'blank': 'True'})
},
'auth.permission': {
'Meta': {'unique_together': "(('content_type', 'codename'),)"},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'contenttypes.contenttype': {
'Meta': {'unique_together': "(('app_label', 'model'),)", 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'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'})
},
'newsletter.contact': {
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'modification_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'subscriber': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
'tags': ('tagging.fields.TagField', [], {'default': "''"}),
'tester': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'valid': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'})
},
'newsletter.contactmailingstatus': {
'contact': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['newsletter.Contact']"}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['newsletter.Link']", 'null': 'True', 'blank': 'True'}),
'newsletter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['newsletter.Newsletter']"}),
'status': ('django.db.models.fields.IntegerField', [], {})
},
'newsletter.link': {
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'url': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
'newsletter.mailinglist': {
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modification_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'subscribers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['newsletter.Contact']"}),
'unsubscribers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['newsletter.Contact']", 'null': 'True', 'blank': 'True'})
},
'newsletter.newsletter': {
'content': ('django.db.models.fields.TextField', [], {'default': "u'<body>\\n<!-- Edit your newsletter here -->\\n</body>'"}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'header_reply': ('django.db.models.fields.CharField', [], {'default': "'Emencia Newsletter<noreply@emencia.com>'", 'max_length': '255'}),
'header_sender': ('django.db.models.fields.CharField', [], {'default': "'Emencia Newsletter<noreply@emencia.com>'", 'max_length': '255'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'mailing_list': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['newsletter.MailingList']"}),
'modification_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'sending_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'server': ('django.db.models.fields.related.ForeignKey', [], {'default': '1', 'to': "orm['newsletter.SMTPServer']"}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}),
'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'test_contacts': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['newsletter.Contact']", 'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
'newsletter.smtpserver': {
'headers': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'host': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'mails_hour': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
'port': ('django.db.models.fields.IntegerField', [], {'default': '25'}),
'tls': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'user': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'})
},
'newsletter.workgroup': {
'contacts': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['newsletter.Contact']", 'null': 'True', 'blank': 'True'}),
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'mailinglists': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['newsletter.MailingList']", 'null': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'newsletters': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['newsletter.Newsletter']", 'null': 'True', 'blank': 'True'})
}
}
complete_apps = ['newsletter']

@ -1,130 +0,0 @@
from south.db import db
from south.v2 import SchemaMigration
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Attachment'
db.create_table('newsletter_attachment', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('newsletter', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['newsletter.Newsletter'])),
('title', self.gf('django.db.models.fields.CharField')(max_length=255)),
('file_attachment', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
))
db.send_create_signal('newsletter', ['Attachment'])
def backwards(self, orm):
# Deleting model 'Attachment'
db.delete_table('newsletter_attachment')
models = {
'auth.group': {
'Meta': {'object_name': 'Group'},
'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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
'auth.permission': {
'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'contenttypes.contenttype': {
'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'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'})
},
'newsletter.attachment': {
'Meta': {'object_name': 'Attachment'},
'file_attachment': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'newsletter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['newsletter.Newsletter']"}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
'newsletter.contact': {
'Meta': {'object_name': 'Contact'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'modification_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'subscriber': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
'tags': ('tagging.fields.TagField', [], {'default': "''"}),
'tester': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'valid': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'})
},
'newsletter.contactmailingstatus': {
'Meta': {'object_name': 'ContactMailingStatus'},
'contact': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['newsletter.Contact']"}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['newsletter.Link']", 'null': 'True', 'blank': 'True'}),
'newsletter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['newsletter.Newsletter']"}),
'status': ('django.db.models.fields.IntegerField', [], {})
},
'newsletter.link': {
'Meta': {'object_name': 'Link'},
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'url': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
'newsletter.mailinglist': {
'Meta': {'object_name': 'MailingList'},
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modification_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'subscribers': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'mailinglist_subscriber'", 'symmetrical': 'False', 'to': "orm['newsletter.Contact']"}),
'unsubscribers': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'mailinglist_unsubscriber'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['newsletter.Contact']"})
},
'newsletter.newsletter': {
'Meta': {'object_name': 'Newsletter'},
'content': ('django.db.models.fields.TextField', [], {'default': "u'<body>\\n<!-- Edit your newsletter here -->\\n</body>'"}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'header_reply': ('django.db.models.fields.CharField', [], {'default': "'Giorgio Barbarotta Newsletter<noreply@giorgiobarbarotta.it>'", 'max_length': '255'}),
'header_sender': ('django.db.models.fields.CharField', [], {'default': "'Giorgio Barbarotta Newsletter<noreply@giorgiobarbarotta.it>'", 'max_length': '255'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'mailing_list': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['newsletter.MailingList']"}),
'modification_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'sending_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'server': ('django.db.models.fields.related.ForeignKey', [], {'default': '1', 'to': "orm['newsletter.SMTPServer']"}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}),
'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'test_contacts': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['newsletter.Contact']", 'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
'newsletter.smtpserver': {
'Meta': {'object_name': 'SMTPServer'},
'headers': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'host': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'mails_hour': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
'port': ('django.db.models.fields.IntegerField', [], {'default': '25'}),
'tls': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'user': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'})
},
'newsletter.workgroup': {
'Meta': {'object_name': 'WorkGroup'},
'contacts': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['newsletter.Contact']", 'null': 'True', 'blank': 'True'}),
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'mailinglists': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['newsletter.MailingList']", 'null': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'newsletters': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['newsletter.Newsletter']", 'null': 'True', 'blank': 'True'})
}
}
complete_apps = ['newsletter']

@ -1,123 +0,0 @@
from south.db import db
from south.v2 import SchemaMigration
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding unique constraint on 'Newsletter', fields ['slug']
db.create_unique('newsletter_newsletter', ['slug'])
def backwards(self, orm):
# Removing unique constraint on 'Newsletter', fields ['slug']
db.delete_unique('newsletter_newsletter', ['slug'])
models = {
'auth.group': {
'Meta': {'object_name': 'Group'},
'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': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
'auth.permission': {
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'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'}),
'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'})
},
'newsletter.attachment': {
'Meta': {'object_name': 'Attachment'},
'file_attachment': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'newsletter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['newsletter.Newsletter']"}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
'newsletter.contact': {
'Meta': {'ordering': "('creation_date',)", 'object_name': 'Contact'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'modification_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'subscriber': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'tags': ('tagging.fields.TagField', [], {'default': "''"}),
'tester': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'valid': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
},
'newsletter.contactmailingstatus': {
'Meta': {'ordering': "('creation_date',)", 'object_name': 'ContactMailingStatus'},
'contact': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['newsletter.Contact']"}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['newsletter.Link']", 'null': 'True', 'blank': 'True'}),
'newsletter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['newsletter.Newsletter']"}),
'status': ('django.db.models.fields.IntegerField', [], {})
},
'newsletter.link': {
'Meta': {'ordering': "('creation_date',)", 'object_name': 'Link'},
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'url': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
'newsletter.mailinglist': {
'Meta': {'ordering': "('creation_date',)", 'object_name': 'MailingList'},
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modification_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'subscribers': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'mailinglist_subscriber'", 'symmetrical': 'False', 'to': "orm['newsletter.Contact']"}),
'unsubscribers': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'mailinglist_unsubscriber'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['newsletter.Contact']"})
},
'newsletter.newsletter': {
'Meta': {'ordering': "('creation_date',)", 'object_name': 'Newsletter'},
'content': ('django.db.models.fields.TextField', [], {'default': "u'<body>\\n<!-- Edit your newsletter here -->\\n</body>'"}),
'creation_date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'header_reply': ('django.db.models.fields.CharField', [], {'default': "'Emencia Newsletter<noreply@emencia.com>'", 'max_length': '255'}),
'header_sender': ('django.db.models.fields.CharField', [], {'default': "'Emencia Newsletter<noreply@emencia.com>'", 'max_length': '255'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'mailing_list': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['newsletter.MailingList']"}),
'modification_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'sending_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'server': ('django.db.models.fields.related.ForeignKey', [], {'default': '1', 'to': "orm['newsletter.SMTPServer']"}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'test_contacts': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['newsletter.Contact']", 'null': 'True', 'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
'newsletter.smtpserver': {
'Meta': {'object_name': 'SMTPServer'},
'headers': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'host': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'mails_hour': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
'port': ('django.db.models.fields.IntegerField', [], {'default': '25'}),
'tls': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'user': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'})
},
'newsletter.workgroup': {
'Meta': {'object_name': 'WorkGroup'},
'contacts': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['newsletter.Contact']", 'null': 'True', 'blank': 'True'}),
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'mailinglists': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['newsletter.MailingList']", 'null': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'newsletters': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['newsletter.Newsletter']", 'null': 'True', 'blank': 'True'})
}
}
complete_apps = ['newsletter']

@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
import os
import datetime
from django.conf import settings
@ -20,9 +19,9 @@ from django.views.generic import (
FormView,
ListView,
RedirectView,
TemplateView,
UpdateView
)
from emencia.django.newsletter.admin_forms import (
AttachmentForm,
ContactSettingsForm,
@ -30,7 +29,7 @@ from emencia.django.newsletter.admin_forms import (
NewsletterForm,
NewsletterDailyForm,
NewsletterRecommendForm,
NewsletterFilterForm
)
from emencia.django.newsletter.forms import (
MailingStatusFilter,
@ -44,17 +43,18 @@ from emencia.django.newsletter.models import (
ContactSettings,
MailingList,
Newsletter,
NewsletterRecommend,
NewsletterRecommend
)
from functions.admin_views import paginate_results
from functions.admin_views import paginate_results, AdminListView
from functions.custom_views import ContextMixin, CreateUpdateView
from functions.http import JsonResponse
from HTMLParser import HTMLParseError
from theme.models import Theme
from ..forms import ContactFilterForm, ContactImportForm, AutomaticEmailTestForm
from ..forms import (
ContactFilterForm, ContactImportForm, AutomaticEmailTestForm
)
from ..models import PopupCount
from ..utils.excel import ExcelResponse
from ..utils.tokens import tokenize
@ -349,12 +349,12 @@ class NewsletterUpdate(DailyMailSuccesUrlMixin, UpdateView):
return HttpResponseRedirect(self.get_success_url())
class NewsletterListView(ListView):
class NewsletterListView(AdminListView):
paginate_by = settings.ADMIN_PAGINATION
model = Newsletter
template_name = 'c_admin/newsletters/newsletter_list.html'
template_name_daily = 'c_admin/newsletters/newsletter_list_daily.html'
success_url = '/admin/newsletters/newsletters/all/'
form_class = NewsletterFilterForm
def get_template_names(self):
if self.kwargs.get('dailymail', False):
@ -362,8 +362,9 @@ class NewsletterListView(ListView):
return super(NewsletterListView, self).get_template_names()
def get_queryset(self):
qs = super(NewsletterListView, self).get_queryset()
return qs.filter(dailymail=self.kwargs.get('dailymail', False))
return self.model.objects.filter(
dailymail=self.kwargs.get('dailymail', False)
)
def send_test_newsletter(request, pk):

380
fabfile.py vendored

@ -1,380 +0,0 @@
# -*- coding: utf-8 -*-
from os.path import join, basename
from collections import namedtuple, OrderedDict
import re
from fabric.api import *
env.roledefs = {
'dev': ['root@176.121.11.165'],
'prod': ['root@176.121.11.162'],
}
env.passwords = {
'root@176.121.11.165:22': 'ue6R287QZfMc',
'root@176.121.11.162:22': 'XcS2jx5e8k6n',
}
REMOTE_HOME_DIR = '/home/www/expomap/'
LOCAL_HOME_DIR = '/home/as/PycharmProjects/expomap/'
nginx_conf_tech = '/etc/nginx/sites-available/tech_work_hit.expomap.ru'
nginx_conf = '/etc/nginx/sites-available/hit.expomap.ru'
apache2_conf = '/etc/apache2/sites-available/proj.com'
settings_conf = join(REMOTE_HOME_DIR, 'proj/settings.py')
services = ['nginx', 'apache2']
stages = {}
tickets = {}
commands = {}
def stage(stage_num):
def add_func(func):
if not callable(func):
raise NotImplementedError('func must be a callable')
func = ticket(func)
stages.setdefault(stage_num, OrderedDict()).update({func.__name__: func})
return func
return add_func
def ticket(func):
if not callable(func):
raise NotImplementedError('func must be a callable')
# stages.setdefault(stage_num, OrderedDict()).update({func.__name__: func})
tickets.update({func.__name__: func})
return func
# command_pattern
# cp = re.compile('^python manage.py (?P<command>\w+)$')
cp = re.compile('^(?P<command>\w+)$')
def register_command(command_string):
command = cp.match(command_string).group('command')
if not command:
raise ValueError('Invalid command string {command_string}'.format(command_string=command_string))
def func():
with cd(REMOTE_HOME_DIR):
run('python manage.py ' + command)
commands.update({command: func})
# run command
def rc(command):
if command in commands and callable(commands[command]):
commands[command]()
else:
raise ValueError('Command {command} is not callable'.format(command=command))
def set_host(host):
env.hosts = env.roledefs.get(host)
env.role = host
def dev():
set_host('dev')
def prod():
set_host('prod')
def get_configs():
localdir = join(LOCAL_HOME_DIR, 'support/', env.role)
get(nginx_conf, localdir)
get(apache2_conf, localdir)
get(join(REMOTE_HOME_DIR, 'schema.xml'), localdir)
get(settings_conf, localdir)
def put_configs():
localdir = join(LOCAL_HOME_DIR, 'support/', env.role)
# nginx
# put(join(localdir, basename(nginx_conf)),
# nginx_conf)
# # apache2
# put(join(localdir, basename(apache2_conf)),
# apache2_conf)
# settings
put(join(localdir, basename(settings_conf)),
settings_conf)
def newsletters_media():
with cd(join(REMOTE_HOME_DIR, 'media')):
run('mkdir -p newsletter')
put(
join(LOCAL_HOME_DIR, 'media/newsletter'),
join(REMOTE_HOME_DIR, 'media')
)
def call_state(state, only=None):
if only is not None and only in services:
run('service {only} {state}'.format(only=only, state=state))
return
for service in services:
run('service {service} {state}'.format(service=service, state=state))
def chown():
with cd(REMOTE_HOME_DIR):
run('chown -Rv www-data:www-data .')
def pull(with_configs=False, func=None):
with cd(REMOTE_HOME_DIR):
call_state('stop', only='apache2')
run('git pull')
if with_configs:
put_configs()
if func is not None and func in tickets and callable(tickets[func]):
tickets[func]()
run('python manage.py migrate')
call_state('start', only='apache2')
def stage_init(stage_num):
with cd(REMOTE_HOME_DIR):
call_state('stop', only='apache2')
run('git fetch')
run('git checkout stage{stage_num}'.format(stage_num=stage_num))
run('git pull')
# stage_num = int(stage_num)
# if stage_num in stages and isinstance(stages[stage_num], dict):
# for func_name, func in stages[stage_num].iteritems():
# func()
# call_state('start', only='apache2')
def migrate(app_name):
with cd(REMOTE_HOME_DIR):
run('python manage.py migrate {app_name}'.format(app_name=app_name))
def devmode(state=True):
localdir = join(LOCAL_HOME_DIR, 'support/', env.role)
# nginx
conf = nginx_conf_tech if state == True else nginx_conf
put(join(localdir, basename(conf)), nginx_conf)
run('/etc/init.d/nginx reload')
@stage(5)
def t1451():
with cd(REMOTE_HOME_DIR):
run('python manage.py migrate expobanner')
# temporary
register_command('banner_log_update_old')
register_command('banner_log_update')
#
@stage(5)
def t1458():
with cd(REMOTE_HOME_DIR):
run('python manage.py migrate service 0001 --fake')
run('python manage.py migrate service')
run('python manage.py set_events_services')
register_command('set_events_services')
@stage(5)
def t1456():
with cd(REMOTE_HOME_DIR):
run('python manage.py migrate expobanner')
@stage(5)
def t1463():
with cd(REMOTE_HOME_DIR):
run('python manage.py migrate newsletter')
run('pip install pymorphy2[fast]')
run('pip install -U pymorphy2-dicts-ru')
@stage(5)
def t1460():
with cd(REMOTE_HOME_DIR):
run('python manage.py migrate newsletter')
@ticket
def update_crontab():
with cd(REMOTE_HOME_DIR):
run('python manage.py crontab remove')
run('python manage.py crontab add')
@stage(5)
def t1461():
with cd(REMOTE_HOME_DIR):
run('pip install chainmap==1.0.2')
run('pip install suds==0.4')
run('python manage.py migrate conference')
run('python manage.py migrate exposition')
run('python manage.py update_events_filter_fields')
@ticket
def switch_to_stage4():
with cd(REMOTE_HOME_DIR):
call_state('stop', only='apache2')
run('git fetch')
run('git checkout stage4')
run('git pull')
call_state('start', only='apache2')
@ticket
def switch_to_stage5():
with cd(REMOTE_HOME_DIR):
call_state('stop', only='apache2')
run('git fetch')
run('git checkout staget5')
run('git pull')
call_state('start', only='apache2')
@ticket
def t1580():
with cd(REMOTE_HOME_DIR):
run('python manage.py migrate')
run('python manage.py users_to_mailinglist')
@ticket
def mailing():
with cd(REMOTE_HOME_DIR):
run('python manage.py migrate newsletter 0010')
run('python manage.py migrate newsletter 0011 --fake')
run('python manage.py migrate newsletter')
run('python manage.py migrate newsletter 0010 --fake')
run('python manage.py migrate newsletter 0011')
run('python manage.py migrate newsletter --fake')
run('python manage.py migrate')
run('python manage.py newsletter_create_dailymail')
@ticket
def mailing2():
with cd(REMOTE_HOME_DIR):
run('python manage.py migrate newsletter 0010 --fake')
run('python manage.py migrate newsletter 0011')
run('python manage.py migrate newsletter --fake')
@ticket
def t1609():
with cd(REMOTE_HOME_DIR):
files = ['media/cache/3b/8e/3b8ee5e07a982562d873a69550dd47c9.jpg']
for file in files:
put(
join(LOCAL_HOME_DIR, file),
join(REMOTE_HOME_DIR, file)
)
# def stage3_pre_final():
# with cd(REMOTE_HOME_DIR):
# run('pip install pandas')
# run('pip install django-rosetta==0.7.6')
# run('git checkout master')
# run('git pull')
# call_state('stop')
# put_configs()
# run('python manage.py migrate conference 0001 --fake')
# run('python manage.py migrate conference')
# run('python manage.py migrate expobanner')
# run('python manage.py migrate theme 0001 --fake')
# run('python manage.py migrate theme 0002')
# run('python manage.py migrate article 0001 --fake')
# run('python manage.py migrate article 0002')
# run('python manage.py migrate stats_collector')
# run('python manage.py crontab remove')
# run('python manage.py crontab add')
# chown()
# call_state('start')
# def stage3_release():
# call_state('stop')
# with cd(REMOTE_HOME_DIR):
# # run('python manage.py themeblog_to_blog')
# run('git fetch')
# run('git checkout stage3_release')
# run('git pull')
# # run('python manage.py migrate settings 0002 --fake')
# run('python manage.py migrate settings')
# run('python manage.py migrate article 0003')
# chown()
# call_state('start')
# def c_fix():
# with cd(REMOTE_HOME_DIR):
# call_state('stop', only='apache2')
# run('git pull')
# run('python manage.py migrate expobanner')
# call_state('start', only='apache2')
# def stage4_firstrun():
# with cd(REMOTE_HOME_DIR):
# call_state('stop')
# run('git fetch')
# run('git checkout stage4')
# # run('git checkout -- proj/settings.py')
# pull(with_configs=True)
# run('python manage.py syncdb')
# ticket1374()
# ticket1393()
# ticket1392()
# ticket1384()
# ticket1395()
# ticket1384_p1()
# ticket1384_p2()
# t1443()
# call_state('start')
# @ticket
# def ticket1395():
# with cd(REMOTE_HOME_DIR):
# run('python manage.py accounts_check_url')
# @ticket
# def ticket1374():
# with cd(REMOTE_HOME_DIR):
# run('python manage.py migrate theme')
# @ticket
# def ticket1393():
# with cd(REMOTE_HOME_DIR):
# run('python manage.py migrate newsletter 0001 --fake')
# run('python manage.py migrate newsletter')
# @ticket
# def ticket1392():
# with cd(REMOTE_HOME_DIR):
# run('python manage.py migrate newsletter')
# @ticket
# def ticket1384():
# with cd(REMOTE_HOME_DIR):
# run('python manage.py migrate exposition 0001 --fake')
# run('python manage.py migrate exposition')
# run('python manage.py migrate conference')
# @ticket
# def ticket1384_p1():
# with cd(REMOTE_HOME_DIR):
# run('python manage.py check_url')
# @ticket
# def ticket1384_p2():
# with cd(REMOTE_HOME_DIR):
# run('python manage.py check_translation')
# @ticket
# def t1443():
# with cd(REMOTE_HOME_DIR):
# run('chown -Rv www-data:www-data locale')

Binary file not shown.

@ -30,10 +30,5 @@
"license": "BSD-2-Clause",
"directories": {
"doc": "docs"
},
"repository": {
"type": "git",
"url": "git+ssh://git@bitbucket.org/Bonus_05/expomap.git"
},
"homepage": "https://bitbucket.org/Bonus_05/expomap#readme"
}
}

@ -52,7 +52,7 @@ class PlaceExposition(TranslatableModel, ExpoMixin):
#type uses EnumField for creating Enum type field in Mysql database
type = EnumField(values = [item1 for item1, item2 in EXPOSITION_TYPE])
#information
address = LocationField(verbose_name=_(u'Адресс'))
address = LocationField(verbose_name=_(u'Адрес'))
phone = models.BigIntegerField(blank=True, null=True)
fax = models.BigIntegerField(blank=True, null=True)
web_page = models.URLField(blank=True)

@ -1,16 +0,0 @@
# -*- coding: utf-8 -*-
# Django local settings
DEBUG = False
ALLOWED_HOSTS = ['hit.expomap.ru', '195.66.79.152', '195.66.79.145', 'expomap.ru']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'test2',
'USER': 'kotzilla',
'PASSWORD': 'qazedc',
'HOST': '',
'PORT': '',
}
}

@ -32,18 +32,20 @@ DATABASES = {
CACHES = {
"default": {
"BACKEND": "redis_cache.cache.RedisCache",
"LOCATION": "/tmp/redis.sock",
"OPTIONS": {
"CLIENT_CLASS": "redis_cache.client.DefaultClient",
},
"BACKEND": "redis_cache.RedisCache",
"LOCATION": "localhost:6379",
'OPTIONS': {
'CLIENT_CLASS': 'redis_cache.client.DefaultClient',
}
}
}
# save sessions in redis
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['hit.expomap.ru', '195.66.79.152', '195.66.79.145', 'expomap.ru', '195.66.79.148']
ALLOWED_HOSTS = ['expomap.ru']
DEFAULT_HTTP_SCHEME = 'https'
# Local time zone for this installation. Choices can be found here:
@ -113,8 +115,11 @@ CKEDITOR_CONFIGS = {
MEDIA_URL = '/media/'
STATIC_ROOT = os.path.join(SITE_ROOT, 'static')
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(SITE_ROOT, 'collected_static')
STATICFILES_DIRS = (
'static',
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
@ -170,7 +175,6 @@ TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
# os.path.join(SITE_ROOT, 'templates/debug_toolbar'),
os.path.join(SITE_ROOT, 'templates/c_admin'),
os.path.join(SITE_ROOT, 'templates/c_admin/accounts'),
os.path.join(SITE_ROOT, 'templates/c_admin/article'),
@ -200,7 +204,16 @@ TEMPLATE_DIRS = (
os.path.join(SITE_ROOT, 'templates/client/photoreport'),
os.path.join(SITE_ROOT, 'templates/client/includes'),
os.path.join(SITE_ROOT, 'templates'),
#os.path.join(SITE_ROOT, 'templates/client/popups'),
)
TEMPLATE_LOADERS = (
(
'django.template.loaders.cached.Loader',
(
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
),
)
AUTH_USER_MODEL = 'accounts.User'
@ -382,7 +395,7 @@ INSTALLED_APPS = (
'south',
'rosetta',
'widget_tweaks',
'raven.contrib.django.raven_compat',
)
CRONJOBS = [
@ -402,15 +415,15 @@ CRONJOBS = [
('*/5 * * * *', 'django.core.management.call_command', ['update_views_cache']),
('40 6 * * * ', 'django.core.management.call_command', ['newsletter_contacts_remove_notactivated']),
# временно закомментировал по просьбе клиента
# ('41 5 * * *', 'django.core.management.call_command', ['newsletter_create_announce']),
('12 4 * * *', 'django.core.management.call_command', ['stats_daily']),
('5 10 * * *', 'django.core.management.call_command', ['update_events_filter_fields']),
]
PYMORPHY_DICTS = {
'ru': { 'dir': os.path.join(SITE_ROOT, 'settings/russian_dicts')} #'/home/www/proj/settings/russian_dicts' },
'ru': { 'dir': os.path.join(SITE_ROOT, 'settings/russian_dicts')}
}
# search backend
@ -418,41 +431,9 @@ HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://localhost:8983/solr'
# ...or for multicore...
# 'URL': 'http://127.0.0.1:8983/solr/mysite',
},
}
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
}
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
}
}
# TODO automate crons
"""
# update search indexes
@ -543,60 +524,21 @@ PERIODIC = {
8: _(u'Раз в 4 года'),
9: _(u'Раз в 5 лет')
}
# sentry
RAVEN_CONFIG = {
'dsn': 'http://eb7e4b632b3543f487386cbe9151b174:0b148a7ed13643c88d3a6b014c3a4f65@sentry.oldmin.org/2',
}
try:
from local import *
except ImportError, e:
pass
# save sessions in redis
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
if not DEBUG:
# cache template loading
TEMPLATE_LOADERS = (
('django.template.loaders.cached.Loader', (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)),
)
else:
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
# debug_toolbar settings
if DEBUG:
DEBUG_TOOLBAR_PATCH_SETTINGS = False
INTERNAL_IPS = ('127.0.0.1','176.121.5.82', '176.121.11.162', '77.123.47.46')
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
INSTALLED_APPS += (
'debug_toolbar',
)
JQUERY_URL = os.path.join(SITE_ROOT, 'static/client/js/jquery-ui-1.10.4.custom.min.js'),
DEBUG_TOOLBAR_PANELS = [
#'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.staticfiles.StaticFilesPanel',
'debug_toolbar.panels.templates.TemplatesPanel',
'debug_toolbar.panels.cache.CachePanel',
'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar.panels.redirects.RedirectsPanel',
]
# logging
U_LOGFILE_SIZE = 1 * 1024 * 1024
U_LOGFILE_COUNT = 2
DEFAULT_LOGGER_NAME = 'mail'
DEFAULT_LOGGER_NAME = 'django'
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
@ -619,7 +561,7 @@ LOGGING = {
},
},
'loggers': {
'mail': {
'django': {
'handlers': ['file'],
'propagate': True,
'level': 'DEBUG',

@ -123,7 +123,8 @@ if settings.DEBUG:
# ajax urls
urlpatterns += solid_i18n_patterns('',
url(r'^registration/reply/$', 'registration.backends.default.views.RegisterReply'),
url(r'^register/', 'registration.backends.default.views.RegisterAjaxView'),
url(r'^register/', 'registration.backends.default.views.RegisterAjaxView', name='register'),
url(r'^register/validate/', 'registration.backends.default.views.registration_form_validate', name='registration_form_validate'),
url(r'^register-complete/', 'registration.backends.default.views.complete_registration'),
url(r'^callback/', 'core.simple_index_view.callback'),
url(r'^search-form/get-parent/$', 'settings.views.search_parent'),

@ -1,19 +1,26 @@
# -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib.sites.models import RequestSite
from django.contrib.sites.models import Site
from django.contrib.sites.models import RequestSite, Site
from django.utils.translation import ugettext as _
from django.http import Http404
from django.http import Http404, HttpResponse, HttpResponseRedirect
from django.shortcuts import render
from django.contrib.auth import login, logout, authenticate
from django.views.decorators.debug import sensitive_post_parameters
from django.views.decorators.cache import never_cache
from registration import signals
from registration.models import RegistrationProfile
from registration.views import ActivationView as BaseActivationView
from registration.views import RegistrationView as BaseRegistrationView
from registration.forms import RegistrationFormUniqueEmail
from accounts.forms import RegistrationCompleteForm, SocialRegistrationCompleteForm
from accounts.models import User
from social.apps.django_app.default.models import UserSocialAuth
import json
class RegistrationView(BaseRegistrationView):
"""
A registration backend which follows a simple workflow:
@ -144,19 +151,20 @@ class ActivationView(BaseActivationView):
return ('registration_activation_complete', (), {})
def registration_form_validate(request):
"""
Ajax валидация формы регистрации на лету
"""
data = {'success': False}
if request.method == 'POST':
form = RegistrationFormUniqueEmail(request.POST)
if form.is_valid():
data['success'] = True
else:
data['errors'] = form.errors
return HttpResponse(json.dumps(data), content_type='application/json')
from django.http import HttpResponse, HttpResponseRedirect
from accounts.models import User
from registration.forms import RegistrationFormUniqueEmail
from django.contrib.auth import login, logout, authenticate
from django.views.decorators.debug import sensitive_post_parameters
from django.views.decorators.cache import never_cache
@sensitive_post_parameters('password1', 'password2')
@never_cache
def RegisterAjaxView(request):
@ -277,8 +285,6 @@ def complete_registration(request):
else:
return HttpResponse('not ajax')
from django.shortcuts import render
def acquire_email(request, template_name="registration/acquire_email.html"):
"""

@ -57,5 +57,4 @@ scipy
numpy
nltk
pandas
django-modeltranslation
suds
suds

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from django import forms
from django.utils.translation import ugettext as _
from django.utils.translation import ugettext_lazy as _
from accounts.models import User
from models import Catalog, Tickets, Remote, Participation, Translation, Visit, CURENCIES, Advertising, CallBack, BuildStand
from exposition.models import Exposition

@ -10007,7 +10007,8 @@ hr+.rq-note {
}
.acticle_list h3 a {
color: #464646;
text-decoration: none
text-decoration: none;
line-height: 1.1;
}
.acticle_list h3 a:hover {
color: #f60
@ -11647,7 +11648,7 @@ button.gray:hover {
right: 0;
top: 0;
left: 0;
z-index: 10;
z-index: 110;
background: url(../lib/fancybox/fancybox_overlay.png);
display: none;
overflow-y: auto

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
postoffice-4885b11a73674eb6d54593c1d7efd758821e5ee79b8132feecaba10560f0123a

@ -1,5 +1,5 @@
<VirtualHost 127.0.0.1:8080>
WSGIDaemonProcess www-data display-name=%{GROUP} processes=8 threads=2
WSGIDaemonProcess www-data display-name=%{GROUP} processes=2 threads=2
WSGIProcessGroup www-data
WSGIScriptAlias / "/home/www/proj/project.wsgi"
ServerName 176.121.11.165

@ -1,629 +0,0 @@
# -*- coding: utf-8 -*-
# Django settings for proj project.
import os
import django
from django.utils.translation import ugettext_lazy as _
from ConfigParser import ConfigParser
DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__))
SITE_ROOT = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0]
DEBUG = True
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'expomap',
'USER': 'kotzilla',
'PASSWORD': 'qazedc',
'HOST': '',
'PORT': '',
}
}
CACHES = {
"default": {
"BACKEND": "redis_cache.cache.RedisCache",
"LOCATION": "/tmp/redis.sock",
"OPTIONS": {
"CLIENT_CLASS": "redis_cache.client.DefaultClient",
},
}
}
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['hit.expomap.ru', '195.66.79.152', '195.66.79.145', 'expomap.ru', '195.66.79.148']
DEFAULT_HTTP_SCHEME = 'http'
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# In a Windows environment this must be set to your system time zone.
TIME_ZONE = 'UTC'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'ru'
DEFAULT_LANGUAGE = 'ru'
LANGUAGES = (
('ru', _('Russian')),
('en', _('English')),
)
LOCALE_PATHS = (
os.path.join(SITE_ROOT, 'locale'),
)
DEFAULT_CHARSET = 'utf-8'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
USE_L10N = False
# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = False
MEDIA_ROOT = os.path.join(SITE_ROOT, 'media/')
CKEDITOR_UPLOAD_PATH = os.path.join(SITE_ROOT, 'media/upload')
CKEDITOR_CONFIGS = {
'default': {
'toolbar': 'standart',
'height': 200,
'width': 565,
'resize_enabled' : True,
'autoGrow_onStartup' : False,
'autoGrow_bottomSpace' : 300,
'fillEmptyBlocks' : False,
'autoParagraph' : False,
},
'newsletters': {
'toolbar': 'standart',
'height': 600,
'width': 750,
'resize_enabled' : True,
'autoGrow_onStartup' : False,
'autoGrow_bottomSpace' : 300,
'fillEmptyBlocks' : False,
'autoParagraph' : False,
},
}
MEDIA_URL = '/media/'
# STATIC_ROOT = os.path.join(SITE_ROOT, 'static')
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(SITE_ROOT, 'static'),
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
#'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
# Make this unique, and don't share it with anybody.
SECRET_KEY = '=yz1@ko%1s8bmel)c84#s*xpxn%4(1e+smdnh*@rdm*5%v!mln'
TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.core.context_processors.tz",
"django.contrib.messages.context_processors.messages",
"django.core.context_processors.request",
'social.apps.django_app.context_processors.backends',
'social.apps.django_app.context_processors.login_redirect',
'django_messages.context_processors.inbox',
"proj.views.expo_context"
)
#LOGIN_REDIRECT_URL = '/'
MIDDLEWARE_CLASSES = (
# 'django.middleware.cache.UpdateCacheMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'solid_i18n.middleware.SolidLocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'social.apps.django_app.middleware.SocialAuthExceptionMiddleware',
# 'django.middleware.cache.FetchFromCacheMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'proj.middleware.Referer',
'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
'proj.middleware.ExpoRedirectFallbackMiddleware',
'proj.middleware.SpacelessMiddleware',
)
ROOT_URLCONF = 'proj.urls'
# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'proj.wsgi.application'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
# os.path.join(SITE_ROOT, 'templates/debug_toolbar'),
os.path.join(SITE_ROOT, 'templates/c_admin'),
os.path.join(SITE_ROOT, 'templates/c_admin/accounts'),
os.path.join(SITE_ROOT, 'templates/c_admin/article'),
os.path.join(SITE_ROOT, 'templates/c_admin/country'),
os.path.join(SITE_ROOT, 'templates/c_admin/city'),
os.path.join(SITE_ROOT, 'templates/c_admin/company'),
os.path.join(SITE_ROOT, 'templates/c_admin/conference'),
os.path.join(SITE_ROOT, 'templates/c_admin/directories'),
os.path.join(SITE_ROOT, 'templates/c_admin/exposition'),
os.path.join(SITE_ROOT, 'templates/c_admin/forms'),
os.path.join(SITE_ROOT, 'templates/c_admin/import templates'),
os.path.join(SITE_ROOT, 'templates/c_admin/news'),
os.path.join(SITE_ROOT, 'templates/c_admin/organiser'),
os.path.join(SITE_ROOT, 'templates/c_admin/place_conference'),
os.path.join(SITE_ROOT, 'templates/c_admin/place_exposition'),
os.path.join(SITE_ROOT, 'templates/c_admin/page'),
os.path.join(SITE_ROOT, 'templates/c_admin/photoreport'),
os.path.join(SITE_ROOT, 'templates/c_admin/settings'),
os.path.join(SITE_ROOT, 'templates/c_admin/seminar'),
os.path.join(SITE_ROOT, 'templates/c_admin/service'),
os.path.join(SITE_ROOT, 'templates/c_admin/theme'),
os.path.join(SITE_ROOT, 'templates/c_admin/translator'),
os.path.join(SITE_ROOT, 'templates/c_admin/webinar'),
os.path.join(SITE_ROOT, 'templates/client'),
os.path.join(SITE_ROOT, 'templates/client/exposition'),
os.path.join(SITE_ROOT, 'templates/client/photoreport'),
os.path.join(SITE_ROOT, 'templates/client/includes'),
os.path.join(SITE_ROOT, 'templates'),
#os.path.join(SITE_ROOT, 'templates/client/popups'),
)
AUTH_USER_MODEL = 'accounts.User'
LOGIN_URL='/'
#registration info
ACCOUNT_ACTIVATION_DAYS=2
# mail settings
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_USE_TLS = True
EMAIL_PORT = 25
DEFAULT_FROM_EMAIL = "expomap.ru"
AUTHENTICATION_BACKENDS = (
'social.backends.open_id.OpenIdAuth',
'social.backends.vk.VKOAuth2',
'social.backends.facebook.FacebookOAuth2',
'social.backends.twitter.TwitterOAuth',
'social.backends.google.GoogleOAuth',
'social.backends.linkedin.LinkedinOAuth',
'social.backends.odnoklassniki.OdnoklassnikiOAuth2',
'social.backends.mailru.MailruOAuth2',
'django.contrib.auth.backends.ModelBackend',
)
SOCIAL_AUTH_LOGIN_URL = '/'
SOCIAL_AUTH_USER_MODEL = 'accounts.User'
SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/logged-in/'
# The user will be redirected to this URL when a social account is disconnected
SOCIAL_AUTH_INACTIVE_USER_URL = '/inactive-user/'
# #Used to redirect the user once the auth process ended successfully. The value of ?next=/foo is used if it was present
# SOCIAL_AUTH_LOGIN_ERROR_URL = '/login-error/'
# #URL where the user will be redirected in case of an error
# SOCIAL_AUTH_LOGIN_URL = '/login-url/'
# #Is used as a fallback for LOGIN_ERROR_URL
# SOCIAL_AUTH_NEW_USER_REDIRECT_URL = '/new-users-redirect-url/'
# # Used to redirect new registered users, will be used in place of SOCIAL_AUTH_LOGIN_REDIRECT_URL if defined.
# Note that ?next=/foo is appended if present, if you want new users to go to next, you’ll need to do it yourself.
# SOCIAL_AUTH_NEW_ASSOCIATION_REDIRECT_URL = '/new-association-redirect-url/'
# # Like SOCIAL_AUTH_NEW_USER_REDIRECT_URL but for new associated accounts (user is already logged in).
# Used in place of SOCIAL_AUTH_LOGIN_REDIRECT_URL
# SOCIAL_AUTH_DISCONNECT_REDIRECT_URL = '/account-disconnected-redirect-url/'
# Inactive users can be redirected to this URL when trying to authenticate.
# SOCIAL_AUTH_UID_LENGTH = <int>
# SOCIAL_AUTH_NONCE_SERVER_URL_LENGTH = <int>
# SOCIAL_AUTH_ASSOCIATION_SERVER_URL_LENGTH = <int>
# SOCIAL_AUTH_FORCE_EMAIL_VALIDATION = True
SOCIAL_AUTH_USERNAME_IS_FULL_EMAIL = True
SOCIAL_AUTH_PIPELINE = (
'social.pipeline.social_auth.social_details',
'social.pipeline.social_auth.social_uid',
'functions.pipeline.get_email', # vk
'functions.pipeline.load_user',
'social.pipeline.social_auth.auth_allowed',
'functions.pipeline.social_user',
# 'social.pipeline.social_auth.social_user',
'social.pipeline.social_auth.load_extra_data',
'social.pipeline.user.get_username',
'functions.pipeline.require_email',
#'social.pipeline.mail.mail_validation',
'functions.pipeline.create_user',
#'social.pipeline.user.create_user',
'social.pipeline.social_auth.associate_by_email',
'social.pipeline.social_auth.associate_user',
# 'social.pipeline.user.user_details'
'functions.pipeline.user_details',
)
REQUIRES_EMAIL_VALIDATION = True
SOCIAL_AUTH_EMAIL_VALIDATION_FUNCTION = 'functions.pipeline.SendVerificationEmail'
SOCIAL_AUTH_EMAIL_VALIDATION_URL = '/email_verify_sent/'
SOCIAL_AUTH_VK_OAUTH2_KEY = '3393841'
SOCIAL_AUTH_VK_OAUTH2_SECRET = '2P19EBUEpLZifaabbREv'
SOCIAL_AUTH_VK_OAUTH2_SCOPE =['email']
SOCIAL_AUTH_VK_OAUTH2_PROFILE_EXTRA_PARAMS = {
'fields': 'email'
}
SOCIAL_AUTH_FACEBOOK_KEY = '133775720059470'
SOCIAL_AUTH_FACEBOOK_SECRET = '434edf89c24a290497646a739df656c6'
SOCIAL_AUTH_FACEBOOK_SCOPE = ['email', 'publish_actions']
SOCIAL_AUTH_TWITTER_KEY = 'S6NX33FazTcWuqnXQhlOdg'
SOCIAL_AUTH_TWITTER_SECRET = 'MxUGfySQmLI5kvqSoAtWsGje2eAHQL7Jo8mXuIZ4D0'
SOCIAL_AUTH_TWITTER_SCOPE = ['email']
SOCIAL_AUTH_GOOGLE_OAUTH_KEY = '1044044901114.apps.googleusercontent.com'
SOCIAL_AUTH_GOOGLE_OAUTH_SECRET = 'j_McErlPPof88eNrmOXI-ZXI'
SOCIAL_AUTH_GOOGLE_OAUTH_SCOPE = ['email']
SOCIAL_AUTH_MAILRU_OAUTH2_KEY = '697945'
SOCIAL_AUTH_MAILRU_OAUTH2_SECRET = '343581b9e31961b334532cc1880066e8'
SOCIAL_AUTH_MAILRU_OAUTH2_SCOPE = ['email']
SOCIAL_AUTH_ODNOKLASSNIKI_OAUTH2_KEY = '1249032192'
SOCIAL_AUTH_ODNOKLASSNIKI_OAUTH2_SECRET = '87A7A1B964D2C73B9861BF76'
SOCIAL_AUTH_ODNOKLASSNIKI_OAUTH2_PUBLIC_NAME = 'CBAJLDHLEBABABABA'
SOCIAL_AUTH_ODNOKLASSNIKI_OAUTH2_SCOPE = ['GET_EMAIL']
SOCIAL_AUTH_LINKEDIN_KEY = 'jt9xwquj1fkd'
SOCIAL_AUTH_LINKEDIN_SECRET = 'GvM2xQCNADaBfiMy'
SOCIAL_AUTH_LINKEDIN_SCOPE = ['email']
INSTALLED_APPS = (
'modeltranslation',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.redirects',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
'django.contrib.sitemaps',
'haystack',
#custom modules
'redirects',
'stats_collector',
'emencia.django.newsletter',
'accounts',
'article',
'comments',
'city',
'company',
'conference',
'core',
'country',
'directories',
'expobanner',
'exposition',
'file',
'import_xls',
'news',
'note',
'organiser',
'place_conference',
'place_exposition',
'photoreport',
'registration',
'review',
'seminar',
'service',
'settings',
'theme',
'translator',
'webinar',
'meta',
'events',
#django modules
'django_crontab',
'sorl.thumbnail', # for logos
'photologue', # photogallery
'sortedm2m', # photologue dependence
'hvad', #
'tinymce', # ???
'ckeditor', # wysiwig editor in admin
'django_messages', # messages
'bitfield',
'djutils', # ??
'pytils', # ??
'pymorphy', # ??
'password_reset', # reset password
'social.apps.django_app.default', # social auth
'core',
'specialist_catalog',
'south',
'rosetta',
'widget_tweaks',
)
CRONJOBS = [
('8 * * * *', 'django.core.management.call_command', ['send_newsletter']),
('0 * * * *', 'django.core.management.call_command', ['update_index', 'conference', '--remove', '--age=6']),
('5 * * * *', 'django.core.management.call_command', ['update_index', 'exposition', '--remove', '--age=6']),
('0 1,13 * * *', 'django.core.management.call_command', ['update_index', 'place_exposition', '--remove', '--age=24']),
('0 3 * * *', 'django.core.management.call_command', ['update_index', 'company', '--remove', '--age=48']),
('0 4 * * *', 'django.core.management.call_command', ['update_index', 'theme', '--remove', '--age=48']),
('0 5 * * * ', 'django.core.management.call_command', ['update_index', 'tag', '--remove', '--age=48']),
('0 6 * * *', 'django.core.management.call_command', ['update_index', 'country', '--remove', '--age=48']),
('0 7 * * *', 'django.core.management.call_command', ['update_index', 'city', '--remove', '--age=48']),
('10 * * * *', 'django.core.management.call_command', ['banner_log_update']),
('20 2,14 * * *', 'django.core.management.call_command', ['banner_log_check_previous_day']),
('*/5 * * * *', 'django.core.management.call_command', ['update_views_cache']),
('40 6 * * * ', 'django.core.management.call_command', ['newsletter_contacts_remove_notactivated']),
# ('41 5 * * *', 'django.core.management.call_command', ['newsletter_create_announce']),
('12 4 * * *', 'django.core.management.call_command', ['stats_daily']),
('5 10 * * *', 'django.core.management.call_command', ['update_events_filter_fields']),
]
PYMORPHY_DICTS = {
'ru': { 'dir': os.path.join(SITE_ROOT, 'settings/russian_dicts')} #'/home/www/proj/settings/russian_dicts' },
}
# search backend
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://localhost:8983/solr'
# ...or for multicore...
# 'URL': 'http://127.0.0.1:8983/solr/mysite',
},
}
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
}
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
}
}
# TODO automate crons
"""
# update search indexes
0 * * * * /usr/bin/python /var/www/proj/manage.py update_index conference --remove --age=6
0 * * * * /usr/bin/python /var/www/proj/manage.py update_index exposition --remove --age=6
0 1,13 * * * /usr/bin/python /var/www/proj/manage.py update_index place_exposition --remove --age=24
0 3 * * * /usr/bin/python /var/www/proj/manage.py update_index company --remove --age=48
0 4 * * * /usr/bin/python /var/www/proj/manage.py update_index theme --remove --age=48
0 5 * * * /usr/bin/python /var/www/proj/manage.py update_index tag --remove --age=48
0 6 * * * /usr/bin/python /var/www/proj/manage.py update_index country --remove --age=48
0 7 * * * /usr/bin/python /var/www/proj/manage.py update_index city --remove --age=48
# update banner logs
10 * * * * /usr/bin/python /var/www/proj/manage.py banner_log_update
20 2,14 * * * /usr/bin/python /var/www/proj/manage.py banner_log_check_previous_day
# update hotels prices
20 1 * * 6 /usr/bin/python /var/www/proj/manage.py update_hotels_price
# newsletter
20 * * * * /usr/bin/python /var/www/proj/manage.py send_newsletter
40 6 * * * /usr/bin/python /var/www/proj/manage.py newsletter_contacts_remove_notactivated
"""
THUMBNAIL_DEBUG = DEBUG
THUMBNAIL_ENGINE = "proj.sorlengine.SorlEngine"
THUMBNAIL_FORMAT = "PNG"
CALLBACK_EMAIL = 'kotzilla@ukr.net'
BOOKING_AID = '333667'
try:
from functions.overrides import SeoPaginator as Paginator
except ImportError:
from django.core.paginator import Paginator
DEFAULT_PAGINATOR = Paginator
ADMIN_PAGINATION = 20
CLIENT_PAGINATION = 25
TEMPLATE_DEBUG = DEBUG
NO_LOGO = '/static/client/img/no-logo.png'
# events settings
CURRENCY = ('RUB', 'USD', 'EUR', 'RMB', 'GBP', 'AED', 'SGD', 'TRY', 'CZK', 'CHF', 'SEK', 'LKR', 'UAH', 'IDR', 'PLN','JPY')
BIT_AUDIENCE = (('experts', _(u'Специалисты')), ('experts and consumers', _(u'Специалисты и потребители')),
('general public', _(u'Широкая публика')))
MONTHES = {'jan': {'value': 1, 'name': _(u'Январь')}, 'feb': {'value': 2, 'name': _(u'Февраль')},
'mar': {'value': 3, 'name': _(u'Март')}, 'apr': {'value': 4, 'name': _(u'Апрель')},
'may': {'value': 5, 'name': _(u'Май')}, 'jun': {'value': 6, 'name': _(u'Июнь')},
'jul': {'value': 7, 'name': _(u'Июль')}, 'aug': {'value': 8, 'name': _(u'Август')},
'sep': {'value': 9, 'name': _(u'Сентябрь')}, 'oct': {'value': 10, 'name': _(u'Октябрь')},
'nov': {'value': 11, 'name': _(u'Ноябрь')}, 'dec': {'value': 12, 'name': _(u'Декабрь')}}
SNG_COUNTRIES = [159, 186, 31, 6, 99, 13, 189, 64]
RUSSIA_PK = 159
MOSCOW_PK = -2960561
SPB_PK = -2996338
CLIENT_DATE_FORMAT = ["%d.%m.%Y"]
# cache pages in random seconds. random in this range
CACHE_RANGE = [60, 120]
DEFAULT_POPUP_COOKIE = 'expo_b_default_popup'
INI_CONFIG_PATH = os.path.join(SITE_ROOT, 'proj/config.ini')
INI_CONFIG = ConfigParser()
INI_CONFIG.read(INI_CONFIG_PATH)
C_CITY_CATALOG_KEY = 'conf_city_catalog'
C_COUNTRY_CATALOG_KEY = 'conf_country_catalog'
E_CITY_CATALOG_KEY = 'expo_city_catalog'
E_COUNTRY_CATALOG_KEY = 'expo_country_catalog'
DEFAULT_DESCRIPTION = {
'e_description_ru': 'templates/client/includes/conference/default_description_ru.html',
'e_description_en': 'templates/client/includes/conference/default_description_en.html',
'c_description_ru': 'templates/client/includes/exposition/default_description_ru.html',
'c_description_en': 'templates/client/includes/exposition/default_description_en.html',
}
PERIODIC = {
0: '',
1: _(u'Ежегодно'),
2: _(u'2 раза в год'),
3: _(u'3 раза в год'),
4: _(u'4 раза в год'),
5: _(u'5 раз в год'),
6: _(u'Раз в 2 года'),
7: _(u'Раз в 3 года'),
8: _(u'Раз в 4 года'),
9: _(u'Раз в 5 лет')
}
try:
from local import *
except ImportError, e:
pass
# save sessions in redis
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
if not DEBUG:
# cache template loading
TEMPLATE_LOADERS = (
('django.template.loaders.cached.Loader', (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)),
)
else:
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
# debug_toolbar settings
if DEBUG:
DEBUG_TOOLBAR_PATCH_SETTINGS = False
INTERNAL_IPS = ('127.0.0.1','176.121.5.82', '176.121.11.162', '77.123.47.46')
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
INSTALLED_APPS += (
'debug_toolbar',
)
JQUERY_URL = os.path.join(SITE_ROOT, 'static/client/js/jquery-ui-1.10.4.custom.min.js'),
DEBUG_TOOLBAR_PANELS = [
#'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.staticfiles.StaticFilesPanel',
'debug_toolbar.panels.templates.TemplatesPanel',
'debug_toolbar.panels.cache.CachePanel',
'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar.panels.redirects.RedirectsPanel',
]
# logging
U_LOGFILE_SIZE = 1 * 1024 * 1024
U_LOGFILE_COUNT = 2
DEFAULT_LOGGER_NAME = 'django'
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s \n'
},
'simple': {
'format': '%(levelname)s %(message)s'
},
},
'handlers': {
'file': {
'level': 'INFO',
'filename': os.path.join(SITE_ROOT, 'logs/django.log'),
'formatter': 'verbose',
'class':'logging.handlers.RotatingFileHandler',
'maxBytes': U_LOGFILE_SIZE,
'backupCount': U_LOGFILE_COUNT,
},
},
'loggers': {
'django': {
'handlers': ['file'],
'propagate': True,
'level': 'DEBUG',
},
}
}

@ -1 +0,0 @@
dev:$apr1$51bqElVf$/.SfDBWGSjAauaw82Drbo1

@ -1,201 +0,0 @@
<?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="data_begin" type="date" 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>

@ -1,89 +0,0 @@
server {
# server_name 176.121.11.165 expomap.ru www.expomap.ru dev.expomap.ru;
listen 80;
return 301 https://$host$request_uri;
}
geo $maintenance {
default yes;
127.0.0.1/32 no;
31.43.24.170/24 no;
}
server {
listen 443;
server_name 176.121.11.165 www.expomap.ru expomap.ru dev.expomap.ru;
#ssl_stapling on;
ssl on;
ssl_certificate /etc/nginx/ssl/expomap.ru.crt;
ssl_certificate_key /etc/nginx/ssl/expomap.ru.key;
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
ssl_session_timeout 24h;
ssl_session_cache shared:SSL:25m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers kEECDH+AES128:kEECDH:kEDH:-3DES:kRSA+AES128:kEDH+3DES:DES-CBC3-SHA:!RC4:!aNULL:!eNULL:!MD5:!EXPORT:!LOW:!SEED:!CAMELLIA:!IDEA:!PSK:!SRP:!SSLv2;
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security "max-age=31536000;";
add_header Content-Security-Policy-Report-Only "default-src https:; script-src https: 'unsafe-eval' 'unsafe-inline'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:";
client_header_timeout 360s;
error_page 503 /dev_work.html;
location / {
if ($maintenance = yes) {
return 503;
}
auth_basic "Unauthorized";
auth_basic_user_file /home/www/proj/.htpasswd;
proxy_pass http://127.0.0.1:8080/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
include /etc/nginx/geoip_proxy.conf;
client_max_body_size 100m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 16k;
proxy_buffers 256 8k;
proxy_busy_buffers_size 2000k;
proxy_temp_file_write_size 2048k;
}
location /965E1EE7949FD639CA0124C8D8C57774.txt {
root /home/www/proj/;
}
location /4885b11a73674eb6d54593c1d7efd758821e5ee79b8132feecaba10560f0123a.html {
root /home/www/proj/support;
}
location /static {
root /home/www/proj;
}
location /media {
root /home/www/proj;
}
location /templates {
root /home/www/proj/static;
}
location /subdmn {
root /home/old_files;
}
location = /dev_work.html {
root /home/www/proj/support/;
internal;
}
}

@ -1,25 +0,0 @@
<html>
<head>
<title>Извините, идут технические работы</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Pragma" content="no-cache">
<style>
body{
margin:0px;
font-family:Arial;
}
.head{
height:70px;
background-color:#c7d9f0;
}
.body{
padding-top:70px;
text-align:center;
}
</style>
</head>
<body style="margin:0;">
<div class="head"></div>
<div class="body">Извините, идут технические работы.</div>
</body>
</html>

@ -1,5 +1,4 @@
server {
# server_name 176.121.11.165 expomap.ru www.expomap.ru dev.expomap.ru;
listen 80;
return 301 https://$host$request_uri;
}
@ -7,7 +6,6 @@ server {
server {
listen 443;
server_name 176.121.11.165 www.expomap.ru expomap.ru dev.expomap.ru;
#ssl_stapling on;
ssl on;
ssl_certificate /etc/nginx/ssl/expomap.ru.crt;
ssl_certificate_key /etc/nginx/ssl/expomap.ru.key;
@ -22,14 +20,12 @@ server {
client_header_timeout 360s;
location / {
auth_basic "Unauthorized";
auth_basic_user_file /home/www/proj/.htpasswd;
proxy_pass http://127.0.0.1:8080/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
include /etc/nginx/geoip_proxy.conf;
include /etc/nginx/geoip_proxy.conf;
client_max_body_size 100m;
client_body_buffer_size 128k;
@ -42,12 +38,12 @@ server {
proxy_temp_file_write_size 2048k;
}
location /965E1EE7949FD639CA0124C8D8C57774.txt {
root /home/www/proj/;
location /4885b11a73674eb6d54593c1d7efd758821e5ee79b8132feecaba10560f0123a.html {
root /home/www/proj;
}
location /4885b11a73674eb6d54593c1d7efd758821e5ee79b8132feecaba10560f0123a.html {
root /home/www/proj/support;
location /965E1EE7949FD639CA0124C8D8C57774.txt {
root /home/www/proj;
}
location /static {
@ -68,13 +64,4 @@ server {
root /home/www/proj/static;
}
location /subdmn {
root /home/old_files;
}
#location ~* ^.+\.(rss|atom|jpg|jpeg|gif|png|ico|rtf|js|css)$ {
# expires max;
#}
}

@ -1,84 +0,0 @@
server {
server_name expomap.ru www.expomap.ru;
# listen 80;
return 301 https://expomap.ru$request_uri;
}
server {
listen 176.121.11.162:443 ssl;
server_name www.expomap.ru;
# ssl on;
# ssl_certificate /etc/nginx/ssl/expomap.ru.crt;
# ssl_certificate_key /etc/nginx/ssl/expomap.ru.key;
return 301 https://expomap.ru$request_uri;
}
server {
listen 176.121.11.162:443 ssl default_server ;
server_name expomap.ru ;
# ssl_stapling on;
ssl on;
ssl_certificate /etc/nginx/ssl/expomap.ru.crt;
ssl_certificate_key /etc/nginx/ssl/expomap.ru.key;
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
ssl_session_timeout 24h;
ssl_session_cache shared:SSL:25m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers kEECDH+AES128:kEECDH:kEDH:-3DES:kRSA+AES128:kEDH+3DES:DES-CBC3-SHA:!RC4:!aNULL:!eNULL:!MD5:!EXPORT:!LOW:!SEED:!CAMELLIA:!IDEA:!PSK:!SRP:!SSLv2;
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security "max-age=31536000;";
add_header Content-Security-Policy-Report-Only "default-src https:; script-src https: 'unsafe-eval' 'unsafe-inline'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:";
client_header_timeout 360s;
location / {
# auth_basic "Unauthorized";
# auth_basic_user_file /home/www/proj/.htpasswd;
proxy_pass http://127.0.0.1:8080;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
include /etc/nginx/geoip_proxy.conf;
client_max_body_size 100m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 16k;
proxy_buffers 256 8k;
proxy_busy_buffers_size 2000k;
proxy_temp_file_write_size 2048k;
}
location /965E1EE7949FD639CA0124C8D8C57774.txt {
root /home/www/proj/;
}
location /4885b11a73674eb6d54593c1d7efd758821e5ee79b8132feecaba10560f0123a.html {
root /home/www/proj/support;
}
location /static {
access_log off;
expires max;
root /home/www/proj;
}
location /media {
access_log off;
expires max;
root /home/www/proj;
}
location /templates {
access_log off;
expires max;
root /home/www/proj/static;
}
location /subdmn {
root /home/old_files;
}
}

@ -1,31 +0,0 @@
<VirtualHost 127.0.0.1:8080>
WSGIDaemonProcess www-data display-name=%{GROUP} processes=16 threads=1
WSGIProcessGroup www-data
WSGIScriptAlias / "/home/www/proj/project.wsgi"
ServerName hit.expomap.ru
<Directory "/home/www/proj/">
Order allow,deny
Options Indexes FollowSymLinks
Allow from all
IndexOptions FancyIndexing
</Directory>
Alias /media "/home/www/proj/media/"
Alias /static "/home/www/proj/static/"
<Directory "/home/www/proj/media">
Order allow,deny
Options Indexes FollowSymLinks
Allow from all
IndexOptions FancyIndexing
</Directory>
<Directory "/home/www/proj/static">
Order allow,deny
Options Indexes FollowSymLinks
Allow from all
IndexOptions FancyIndexing
</Directory>
ErrorLog /var/log/apache2/expo.error.log
</VirtualHost>

@ -1,201 +0,0 @@
<?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="data_begin" type="date" 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>

@ -1,627 +0,0 @@
# -*- coding: utf-8 -*-
# Django settings for proj project.
import os
import django
from django.utils.translation import ugettext_lazy as _
from ConfigParser import ConfigParser
DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__))
SITE_ROOT = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0]
DEBUG = False
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'expomap',
'USER': 'kotzilla',
'PASSWORD': 'qazedc',
'HOST': '',
'PORT': '',
}
}
CACHES = {
"default": {
"BACKEND": "redis_cache.cache.RedisCache",
"LOCATION": "/tmp/redis.sock",
"OPTIONS": {
"CLIENT_CLASS": "redis_cache.client.DefaultClient",
},
}
}
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['hit.expomap.ru', '195.66.79.152', '195.66.79.145', 'expomap.ru', '195.66.79.148']
DEFAULT_HTTP_SCHEME = 'https'
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# In a Windows environment this must be set to your system time zone.
TIME_ZONE = 'UTC'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'ru'
DEFAULT_LANGUAGE = 'ru'
LANGUAGES = (
('ru', _('Russian')),
('en', _('English')),
)
LOCALE_PATHS = (
os.path.join(SITE_ROOT, 'locale'),
)
DEFAULT_CHARSET = 'utf-8'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
USE_L10N = False
# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = False
MEDIA_ROOT = os.path.join(SITE_ROOT, 'media/')
CKEDITOR_UPLOAD_PATH = os.path.join(SITE_ROOT, 'media/upload')
CKEDITOR_CONFIGS = {
'default': {
'toolbar': 'standart',
'height': 200,
'width': 565,
'resize_enabled' : True,
'autoGrow_onStartup' : False,
'autoGrow_bottomSpace' : 300,
'fillEmptyBlocks' : False,
'autoParagraph' : False,
},
'newsletters': {
'toolbar': 'standart',
'height': 600,
'width': 750,
'resize_enabled' : True,
'autoGrow_onStartup' : False,
'autoGrow_bottomSpace' : 300,
'fillEmptyBlocks' : False,
'autoParagraph' : False,
},
}
MEDIA_URL = '/media/'
STATIC_ROOT = os.path.join(SITE_ROOT, 'static')
STATIC_URL = '/static/'
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
#'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
# Make this unique, and don't share it with anybody.
SECRET_KEY = '=yz1@ko%1s8bmel)c84#s*xpxn%4(1e+smdnh*@rdm*5%v!mln'
TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.core.context_processors.tz",
"django.contrib.messages.context_processors.messages",
"django.core.context_processors.request",
'social.apps.django_app.context_processors.backends',
'social.apps.django_app.context_processors.login_redirect',
'django_messages.context_processors.inbox',
"proj.views.expo_context"
)
#LOGIN_REDIRECT_URL = '/'
MIDDLEWARE_CLASSES = (
# 'django.middleware.cache.UpdateCacheMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'solid_i18n.middleware.SolidLocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'social.apps.django_app.middleware.SocialAuthExceptionMiddleware',
# 'django.middleware.cache.FetchFromCacheMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'proj.middleware.Referer',
'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
'proj.middleware.ExpoRedirectFallbackMiddleware',
'proj.middleware.SpacelessMiddleware',
)
ROOT_URLCONF = 'proj.urls'
# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'proj.wsgi.application'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
# os.path.join(SITE_ROOT, 'templates/debug_toolbar'),
os.path.join(SITE_ROOT, 'templates/c_admin'),
os.path.join(SITE_ROOT, 'templates/c_admin/accounts'),
os.path.join(SITE_ROOT, 'templates/c_admin/article'),
os.path.join(SITE_ROOT, 'templates/c_admin/country'),
os.path.join(SITE_ROOT, 'templates/c_admin/city'),
os.path.join(SITE_ROOT, 'templates/c_admin/company'),
os.path.join(SITE_ROOT, 'templates/c_admin/conference'),
os.path.join(SITE_ROOT, 'templates/c_admin/directories'),
os.path.join(SITE_ROOT, 'templates/c_admin/exposition'),
os.path.join(SITE_ROOT, 'templates/c_admin/forms'),
os.path.join(SITE_ROOT, 'templates/c_admin/import templates'),
os.path.join(SITE_ROOT, 'templates/c_admin/news'),
os.path.join(SITE_ROOT, 'templates/c_admin/organiser'),
os.path.join(SITE_ROOT, 'templates/c_admin/place_conference'),
os.path.join(SITE_ROOT, 'templates/c_admin/place_exposition'),
os.path.join(SITE_ROOT, 'templates/c_admin/page'),
os.path.join(SITE_ROOT, 'templates/c_admin/photoreport'),
os.path.join(SITE_ROOT, 'templates/c_admin/settings'),
os.path.join(SITE_ROOT, 'templates/c_admin/seminar'),
os.path.join(SITE_ROOT, 'templates/c_admin/service'),
os.path.join(SITE_ROOT, 'templates/c_admin/theme'),
os.path.join(SITE_ROOT, 'templates/c_admin/translator'),
os.path.join(SITE_ROOT, 'templates/c_admin/webinar'),
os.path.join(SITE_ROOT, 'templates/client'),
os.path.join(SITE_ROOT, 'templates/client/exposition'),
os.path.join(SITE_ROOT, 'templates/client/photoreport'),
os.path.join(SITE_ROOT, 'templates/client/includes'),
os.path.join(SITE_ROOT, 'templates'),
#os.path.join(SITE_ROOT, 'templates/client/popups'),
)
AUTH_USER_MODEL = 'accounts.User'
LOGIN_URL='/'
#registration info
ACCOUNT_ACTIVATION_DAYS=2
# mail settings
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_USE_TLS = True
EMAIL_PORT = 25
DEFAULT_FROM_EMAIL = "expomap.ru"
AUTHENTICATION_BACKENDS = (
'social.backends.open_id.OpenIdAuth',
'social.backends.vk.VKOAuth2',
'social.backends.facebook.FacebookOAuth2',
'social.backends.twitter.TwitterOAuth',
'social.backends.google.GoogleOAuth',
'social.backends.linkedin.LinkedinOAuth',
'social.backends.odnoklassniki.OdnoklassnikiOAuth2',
'social.backends.mailru.MailruOAuth2',
'django.contrib.auth.backends.ModelBackend',
)
SOCIAL_AUTH_LOGIN_URL = '/'
SOCIAL_AUTH_USER_MODEL = 'accounts.User'
SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/logged-in/'
# The user will be redirected to this URL when a social account is disconnected
SOCIAL_AUTH_INACTIVE_USER_URL = '/inactive-user/'
# #Used to redirect the user once the auth process ended successfully. The value of ?next=/foo is used if it was present
# SOCIAL_AUTH_LOGIN_ERROR_URL = '/login-error/'
# #URL where the user will be redirected in case of an error
# SOCIAL_AUTH_LOGIN_URL = '/login-url/'
# #Is used as a fallback for LOGIN_ERROR_URL
# SOCIAL_AUTH_NEW_USER_REDIRECT_URL = '/new-users-redirect-url/'
# # Used to redirect new registered users, will be used in place of SOCIAL_AUTH_LOGIN_REDIRECT_URL if defined.
# Note that ?next=/foo is appended if present, if you want new users to go to next, you’ll need to do it yourself.
# SOCIAL_AUTH_NEW_ASSOCIATION_REDIRECT_URL = '/new-association-redirect-url/'
# # Like SOCIAL_AUTH_NEW_USER_REDIRECT_URL but for new associated accounts (user is already logged in).
# Used in place of SOCIAL_AUTH_LOGIN_REDIRECT_URL
# SOCIAL_AUTH_DISCONNECT_REDIRECT_URL = '/account-disconnected-redirect-url/'
# Inactive users can be redirected to this URL when trying to authenticate.
# SOCIAL_AUTH_UID_LENGTH = <int>
# SOCIAL_AUTH_NONCE_SERVER_URL_LENGTH = <int>
# SOCIAL_AUTH_ASSOCIATION_SERVER_URL_LENGTH = <int>
# SOCIAL_AUTH_FORCE_EMAIL_VALIDATION = True
SOCIAL_AUTH_USERNAME_IS_FULL_EMAIL = True
SOCIAL_AUTH_PIPELINE = (
'social.pipeline.social_auth.social_details',
'social.pipeline.social_auth.social_uid',
'functions.pipeline.get_email', # vk
'functions.pipeline.load_user',
'social.pipeline.social_auth.auth_allowed',
'functions.pipeline.social_user',
# 'social.pipeline.social_auth.social_user',
'social.pipeline.social_auth.load_extra_data',
'social.pipeline.user.get_username',
'functions.pipeline.require_email',
#'social.pipeline.mail.mail_validation',
'functions.pipeline.create_user',
#'social.pipeline.user.create_user',
'social.pipeline.social_auth.associate_by_email',
'social.pipeline.social_auth.associate_user',
# 'social.pipeline.user.user_details'
'functions.pipeline.user_details',
)
REQUIRES_EMAIL_VALIDATION = True
SOCIAL_AUTH_EMAIL_VALIDATION_FUNCTION = 'functions.pipeline.SendVerificationEmail'
SOCIAL_AUTH_EMAIL_VALIDATION_URL = '/email_verify_sent/'
SOCIAL_AUTH_VK_OAUTH2_KEY = '3393841'
SOCIAL_AUTH_VK_OAUTH2_SECRET = '2P19EBUEpLZifaabbREv'
SOCIAL_AUTH_VK_OAUTH2_SCOPE =['email']
SOCIAL_AUTH_VK_OAUTH2_PROFILE_EXTRA_PARAMS = {
'fields': 'email'
}
SOCIAL_AUTH_VK_OAUTH2_EXTRA_DATA = ['email']
SOCIAL_AUTH_FACEBOOK_KEY = '133775720059470'
SOCIAL_AUTH_FACEBOOK_SECRET = '434edf89c24a290497646a739df656c6'
SOCIAL_AUTH_FACEBOOK_SCOPE = ['email', 'publish_actions']
SOCIAL_AUTH_TWITTER_KEY = 'S6NX33FazTcWuqnXQhlOdg'
SOCIAL_AUTH_TWITTER_SECRET = 'MxUGfySQmLI5kvqSoAtWsGje2eAHQL7Jo8mXuIZ4D0'
SOCIAL_AUTH_TWITTER_SCOPE = ['email']
SOCIAL_AUTH_GOOGLE_OAUTH_KEY = '1044044901114.apps.googleusercontent.com'
SOCIAL_AUTH_GOOGLE_OAUTH_SECRET = 'j_McErlPPof88eNrmOXI-ZXI'
SOCIAL_AUTH_GOOGLE_OAUTH_SCOPE = ['email']
SOCIAL_AUTH_MAILRU_OAUTH2_KEY = '697945'
SOCIAL_AUTH_MAILRU_OAUTH2_SECRET = '343581b9e31961b334532cc1880066e8'
SOCIAL_AUTH_MAILRU_OAUTH2_SCOPE = ['email']
SOCIAL_AUTH_ODNOKLASSNIKI_OAUTH2_KEY = '1249032192'
SOCIAL_AUTH_ODNOKLASSNIKI_OAUTH2_SECRET = '87A7A1B964D2C73B9861BF76'
SOCIAL_AUTH_ODNOKLASSNIKI_OAUTH2_PUBLIC_NAME = 'CBAJLDHLEBABABABA'
SOCIAL_AUTH_ODNOKLASSNIKI_OAUTH2_SCOPE = ['GET_EMAIL']
SOCIAL_AUTH_LINKEDIN_KEY = 'jt9xwquj1fkd'
SOCIAL_AUTH_LINKEDIN_SECRET = 'GvM2xQCNADaBfiMy'
SOCIAL_AUTH_LINKEDIN_SCOPE = ['email']
INSTALLED_APPS = (
'modeltranslation',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.redirects',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
'django.contrib.sitemaps',
'haystack',
#custom modules
'redirects',
'stats_collector',
'emencia.django.newsletter',
'accounts',
'article',
'comments',
'city',
'company',
'conference',
'core',
'country',
'directories',
'expobanner',
'exposition',
'file',
'import_xls',
'news',
'note',
'organiser',
'place_conference',
'place_exposition',
'photoreport',
'registration',
'review',
'seminar',
'service',
'settings',
'theme',
'translator',
'webinar',
'meta',
'events',
#django modules
'django_crontab',
'sorl.thumbnail', # for logos
'photologue', # photogallery
'sortedm2m', # photologue dependence
'hvad', #
'tinymce', # ???
'ckeditor', # wysiwig editor in admin
'django_messages', # messages
'bitfield',
'djutils', # ??
'pytils', # ??
'pymorphy', # ??
'password_reset', # reset password
'social.apps.django_app.default', # social auth
'core',
'specialist_catalog',
'south',
'rosetta',
'widget_tweaks',
)
CRONJOBS = [
('8 * * * *', 'django.core.management.call_command', ['send_newsletter']),
('0 * * * *', 'django.core.management.call_command', ['update_index', 'conference', '--remove', '--age=6']),
('5 * * * *', 'django.core.management.call_command', ['update_index', 'exposition', '--remove', '--age=6']),
('0 1,13 * * *', 'django.core.management.call_command', ['update_index', 'place_exposition', '--remove', '--age=24']),
('0 3 * * *', 'django.core.management.call_command', ['update_index', 'company', '--remove', '--age=48']),
('0 4 * * *', 'django.core.management.call_command', ['update_index', 'theme', '--remove', '--age=48']),
('0 5 * * * ', 'django.core.management.call_command', ['update_index', 'tag', '--remove', '--age=48']),
('0 6 * * *', 'django.core.management.call_command', ['update_index', 'country', '--remove', '--age=48']),
('0 7 * * *', 'django.core.management.call_command', ['update_index', 'city', '--remove', '--age=48']),
('10 * * * *', 'django.core.management.call_command', ['banner_log_update']),
('20 2,14 * * *', 'django.core.management.call_command', ['banner_log_check_previous_day']),
('*/5 * * * *', 'django.core.management.call_command', ['update_views_cache']),
('40 6 * * * ', 'django.core.management.call_command', ['newsletter_contacts_remove_notactivated']),
('41 5 * * *', 'django.core.management.call_command', ['newsletter_create_announce']),
('12 4 * * *', 'django.core.management.call_command', ['stats_daily']),
('5 10 * * *', 'django.core.management.call_command', ['update_events_filter_fields']),
]
PYMORPHY_DICTS = {
'ru': { 'dir': os.path.join(SITE_ROOT, 'settings/russian_dicts')} #'/home/www/proj/settings/russian_dicts' },
}
# search backend
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://localhost:8983/solr'
# ...or for multicore...
# 'URL': 'http://127.0.0.1:8983/solr/mysite',
},
}
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
}
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
}
}
# TODO automate crons
"""
# update search indexes
0 * * * * /usr/bin/python /var/www/proj/manage.py update_index conference --remove --age=6
0 * * * * /usr/bin/python /var/www/proj/manage.py update_index exposition --remove --age=6
0 1,13 * * * /usr/bin/python /var/www/proj/manage.py update_index place_exposition --remove --age=24
0 3 * * * /usr/bin/python /var/www/proj/manage.py update_index company --remove --age=48
0 4 * * * /usr/bin/python /var/www/proj/manage.py update_index theme --remove --age=48
0 5 * * * /usr/bin/python /var/www/proj/manage.py update_index tag --remove --age=48
0 6 * * * /usr/bin/python /var/www/proj/manage.py update_index country --remove --age=48
0 7 * * * /usr/bin/python /var/www/proj/manage.py update_index city --remove --age=48
# update banner logs
10 * * * * /usr/bin/python /var/www/proj/manage.py banner_log_update
20 2,14 * * * /usr/bin/python /var/www/proj/manage.py banner_log_check_previous_day
# update hotels prices
20 1 * * 6 /usr/bin/python /var/www/proj/manage.py update_hotels_price
# newsletter
20 * * * * /usr/bin/python /var/www/proj/manage.py send_newsletter
40 6 * * * /usr/bin/python /var/www/proj/manage.py newsletter_contacts_remove_notactivated
"""
THUMBNAIL_DEBUG = DEBUG
THUMBNAIL_ENGINE = "proj.sorlengine.SorlEngine"
THUMBNAIL_FORMAT = "PNG"
CALLBACK_EMAIL = 'kotzilla@ukr.net'
BOOKING_AID = '333667'
try:
from functions.overrides import SeoPaginator as Paginator
except ImportError:
from django.core.paginator import Paginator
DEFAULT_PAGINATOR = Paginator
ADMIN_PAGINATION = 20
CLIENT_PAGINATION = 25
TEMPLATE_DEBUG = DEBUG
NO_LOGO = '/static/client/img/no-logo.png'
# events settings
CURRENCY = ('RUB', 'USD', 'EUR', 'RMB', 'GBP', 'AED', 'SGD', 'TRY', 'CZK', 'CHF', 'SEK', 'LKR', 'UAH', 'IDR', 'PLN','JPY')
BIT_AUDIENCE = (('experts', _(u'Специалисты')), ('experts and consumers', _(u'Специалисты и потребители')),
('general public', _(u'Широкая публика')))
MONTHES = {'jan': {'value': 1, 'name': _(u'Январь')}, 'feb': {'value': 2, 'name': _(u'Февраль')},
'mar': {'value': 3, 'name': _(u'Март')}, 'apr': {'value': 4, 'name': _(u'Апрель')},
'may': {'value': 5, 'name': _(u'Май')}, 'jun': {'value': 6, 'name': _(u'Июнь')},
'jul': {'value': 7, 'name': _(u'Июль')}, 'aug': {'value': 8, 'name': _(u'Август')},
'sep': {'value': 9, 'name': _(u'Сентябрь')}, 'oct': {'value': 10, 'name': _(u'Октябрь')},
'nov': {'value': 11, 'name': _(u'Ноябрь')}, 'dec': {'value': 12, 'name': _(u'Декабрь')}}
SNG_COUNTRIES = [159, 186, 31, 6, 99, 13, 189, 64]
RUSSIA_PK = 159
MOSCOW_PK = -2960561
SPB_PK = -2996338
CLIENT_DATE_FORMAT = ["%d.%m.%Y"]
# cache pages in random seconds. random in this range
CACHE_RANGE = [60, 120]
DEFAULT_POPUP_COOKIE = 'expo_b_default_popup'
INI_CONFIG_PATH = os.path.join(SITE_ROOT, 'proj/config.ini')
INI_CONFIG = ConfigParser()
INI_CONFIG.read(INI_CONFIG_PATH)
C_CITY_CATALOG_KEY = 'conf_city_catalog'
C_COUNTRY_CATALOG_KEY = 'conf_country_catalog'
E_CITY_CATALOG_KEY = 'expo_city_catalog'
E_COUNTRY_CATALOG_KEY = 'expo_country_catalog'
DEFAULT_DESCRIPTION = {
'e_description_ru': 'templates/client/includes/conference/default_description_ru.html',
'e_description_en': 'templates/client/includes/conference/default_description_en.html',
'c_description_ru': 'templates/client/includes/exposition/default_description_ru.html',
'c_description_en': 'templates/client/includes/exposition/default_description_en.html',
}
PERIODIC = {
0: '',
1: _(u'Ежегодно'),
2: _(u'2 раза в год'),
3: _(u'3 раза в год'),
4: _(u'4 раза в год'),
5: _(u'5 раз в год'),
6: _(u'Раз в 2 года'),
7: _(u'Раз в 3 года'),
8: _(u'Раз в 4 года'),
9: _(u'Раз в 5 лет')
}
try:
from local import *
except ImportError, e:
pass
# save sessions in redis
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
if not DEBUG:
# cache template loading
TEMPLATE_LOADERS = (
('django.template.loaders.cached.Loader', (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)),
)
else:
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
# debug_toolbar settings
if DEBUG:
DEBUG_TOOLBAR_PATCH_SETTINGS = False
INTERNAL_IPS = ('127.0.0.1','176.121.5.82', '176.121.11.162', '77.123.47.46')
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
INSTALLED_APPS += (
'debug_toolbar',
)
JQUERY_URL = os.path.join(SITE_ROOT, 'static/client/js/jquery-ui-1.10.4.custom.min.js'),
DEBUG_TOOLBAR_PANELS = [
#'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.staticfiles.StaticFilesPanel',
'debug_toolbar.panels.templates.TemplatesPanel',
'debug_toolbar.panels.cache.CachePanel',
'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar.panels.redirects.RedirectsPanel',
]
# logging
U_LOGFILE_SIZE = 1 * 1024 * 1024
U_LOGFILE_COUNT = 2
DEFAULT_LOGGER_NAME = 'django'
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s \n'
},
'simple': {
'format': '%(levelname)s %(message)s'
},
},
'handlers': {
'file': {
'level': 'INFO',
'filename': os.path.join(SITE_ROOT, 'logs/django.log'),
'formatter': 'verbose',
'class':'logging.handlers.RotatingFileHandler',
'maxBytes': U_LOGFILE_SIZE,
'backupCount': U_LOGFILE_COUNT,
},
},
'loggers': {
'django': {
'handlers': ['file'],
'propagate': True,
'level': 'DEBUG',
},
}
}

@ -1,97 +0,0 @@
server {
server_name expomap.ru www.expomap.ru;
# listen 80;
return 301 https://expomap.ru$request_uri;
}
geo $maintenance {
default yes;
127.0.0.1/32 no;
31.43.24.170/24 no;
}
server {
listen 176.121.11.162:443 ssl;
server_name www.expomap.ru;
# ssl on;
# ssl_certificate /etc/nginx/ssl/expomap.ru.crt;
# ssl_certificate_key /etc/nginx/ssl/expomap.ru.key;
return 301 https://expomap.ru$request_uri;
}
server {
listen 176.121.11.162:443 ssl default_server ;
server_name expomap.ru ;
# ssl_stapling on;
ssl on;
ssl_certificate /etc/nginx/ssl/expomap.ru.crt;
ssl_certificate_key /etc/nginx/ssl/expomap.ru.key;
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
ssl_session_timeout 24h;
ssl_session_cache shared:SSL:25m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers kEECDH+AES128:kEECDH:kEDH:-3DES:kRSA+AES128:kEDH+3DES:DES-CBC3-SHA:!RC4:!aNULL:!eNULL:!MD5:!EXPORT:!LOW:!SEED:!CAMELLIA:!IDEA:!PSK:!SRP:!SSLv2;
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security "max-age=31536000;";
add_header Content-Security-Policy-Report-Only "default-src https:; script-src https: 'unsafe-eval' 'unsafe-inline'; style-src https: 'unsafe-inline'; img-src https: data:; font-src https: data:";
client_header_timeout 360s;
error_page 503 /dev_work.html;
location / {
# auth_basic "Unauthorized";
# auth_basic_user_file /home/www/proj/.htpasswd;
if ($maintenance = yes) {
return 503;
}
proxy_pass http://127.0.0.1:8080;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
include /etc/nginx/geoip_proxy.conf;
client_max_body_size 100m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 16k;
proxy_buffers 256 8k;
proxy_busy_buffers_size 2000k;
proxy_temp_file_write_size 2048k;
}
location /965E1EE7949FD639CA0124C8D8C57774.txt {
root /home/www/proj/;
}
location /4885b11a73674eb6d54593c1d7efd758821e5ee79b8132feecaba10560f0123a.html {
root /home/www/proj/support;
}
location /static {
root /home/www/proj;
}
location /media {
root /home/www/proj;
}
location /templates {
root /home/www/proj/static;
}
location /subdmn {
root /home/old_files;
}
}

@ -14,7 +14,6 @@ td a{
{% block body %}
{% load i18n %}
<div class="box span8">
<div class="box-header well">

@ -2,6 +2,26 @@
{% load i18n %}
{% block body %}
<div class="box span10">
<div class="box-header well">
<h2><i class="icon-arrow-down"></i>{% trans "Фильтры" %}</h2>
</div>
<div class="box-content">
<form class="form-horizontal">
{% for field in form %}
<div class="control-group {% if field.errors %}error{% endif %}">
<label class="control-label"><b>{{ field.label }}:</b></label>
<div class="controls">{{ field }}
<span class="help-inline">{{ field.errors }}</span>
</div>
</div>
{% endfor %}
<button type="submit" class="btn">{% trans "Найти" %}</button>
</form>
</div>
</div>
<div class="box span10">
<div class="box-header well">

@ -1,7 +1,5 @@
{% extends 'client/base_catalog.html' %}
{% load static %}
{% load i18n %}
{% load static i18n %}
{% block bread_scrumbs %}
<div class="bread-crumbs">
@ -17,29 +15,28 @@
</div>
{% endblock %}
{% block content_list %}
{% if user.email %}
<div class="set-sect ch-pwd">
<header>{% trans 'смена пароля' %}</header>
<div class="set-sect-body">
<form id="paswd_change" class="pw-form" method="post" action="#">{% csrf_token %}
<div class="mf-line">
<div class="mf-field">
<header>{% trans 'смена пароля' %}</header>
<div class="set-sect-body">
<form id="paswd_change" class="pw-form" method="post" action="#">{% csrf_token %}
<div class="mf-line">
<div class="mf-field">
{{ change_password_form.old_password }}
</div>
</div>
</div>
</div>
<div class="mf-line">
<div class="mf-field">
<div class="mf-line">
<div class="mf-field">
{{ change_password_form.new_password }}
</div>
</div>
<div class="mf-field">
<div class="mf-field">
{{ change_password_form.new_password_confirm }}
</div>
</div>
</div>
</div>
<div class="mf-line">
<div class="mf-success">
@ -48,68 +45,68 @@
</div>
<div class="mf-buttons-line">
<button type="submit" class="icon-save">{% trans 'сохранить' %}</button>
</div>
</form>
</div>
</div>
<div class="mf-buttons-line">
<button type="submit" class="icon-save">{% trans 'сохранить' %}</button>
</div>
</form>
</div>
</div>
{% endif %}
<!--
<div class="set-sect">
<header>{% trans 'социализация и sharing' %}</header>
<div class="set-sect-body">
<form action="#">
<div class="mf-soc-m clearfix">
<div class="mf-soc-col">
<div class="mfsm-title">Подключено:</div>
<div class="mf-line">
<div class="sm-i"><img src="img/soc-medias/icon-fb.png" alt="" /> Artem Zubkevich</div>
<a class="clear" href="#">очистить</a>
</div>
<div class="mf-line">
<div class="sm-i"><img src="img/soc-medias/icon-twit.png" alt="" /> @zubkevich</div>
<a class="clear" href="#">очистить</a>
</div>
</div>
<div class="mf-soc-col">
<div class="mfsm-title">Подключить:</div>
<div class="sm-body">
<ul>
<header>{% trans 'социализация и sharing' %}</header>
<div class="set-sect-body">
<form action="#">
<div class="mf-soc-m clearfix">
<div class="mf-soc-col">
<div class="mfsm-title">Подключено:</div>
<div class="mf-line">
<div class="sm-i"><img src="img/soc-medias/icon-fb.png" alt="" /> Artem Zubkevich</div>
<a class="clear" href="#">очистить</a>
</div>
<div class="mf-line">
<div class="sm-i"><img src="img/soc-medias/icon-twit.png" alt="" /> @zubkevich</div>
<a class="clear" href="#">очистить</a>
</div>
</div>
<div class="mf-soc-col">
<div class="mfsm-title">Подключить:</div>
<div class="sm-body">
<ul>
<li><a href="#"><img src="{% static 'client/img/soc-medias/icon-fb.png' %}" alt="" /></a></li>
<li><a href="#"><img src="{% static 'client/img/soc-medias/icon-twit.png' %}" alt="" /></a></li>
<li><a href="#"><img src="{% static 'client/img/soc-medias/icon-goog.png' %}" alt="" /></a></li>
<li><a href="#"><img src="{% static 'client/img/soc-medias/icon-lin.png' %}" alt="" /></a></li>
<li><a href="#"><img src="{% static 'client/img/soc-medias/icon-ok.png' %}" alt="" /></a></li>
<li><a href="#"><img src="{% static 'client/img/soc-medias/icon-mailr.png' %}" alt="" /></a></li>
<li><a href="#"><img src="{% static 'client/img/soc-medias/icon-vk.png' %}" alt="" /></a></li>
</ul>
</div>
</div>
</div>
<div class="mf-checks-title">Публиковать на ваши страницы:</div>
<div class="mf-line">
<label class="check"><input type="checkbox" name="sType" value="exhb" />Выставки, конференции, семинары в которых я я участвую</label>
</div>
<div class="mf-line">
<label class="check"><input type="checkbox" name="sType" value="exhb" />Выставки, конференции, семинары которые я собираюсь посетить</label>
</div>
<div class="mf-line">
<label class="check"><input type="checkbox" name="sType" value="exhb" />Фотографии на которых я отмечен</label>
</div>
<div class="mf-buttons-line">
<button class="icon-save">сохранить</button>
</div>
</form>
</div>
<li><a href="#"><img src="{% static 'client/img/soc-medias/icon-goog.png' %}" alt="" /></a></li>
<li><a href="#"><img src="{% static 'client/img/soc-medias/icon-lin.png' %}" alt="" /></a></li>
<li><a href="#"><img src="{% static 'client/img/soc-medias/icon-ok.png' %}" alt="" /></a></li>
<li><a href="#"><img src="{% static 'client/img/soc-medias/icon-mailr.png' %}" alt="" /></a></li>
<li><a href="#"><img src="{% static 'client/img/soc-medias/icon-vk.png' %}" alt="" /></a></li>
</ul>
</div>
</div>
</div>
<div class="mf-checks-title">Публиковать на ваши страницы:</div>
<div class="mf-line">
<label class="check"><input type="checkbox" name="sType" value="exhb" />Выставки, конференции, семинары в которых я я участвую</label>
</div>
<div class="mf-line">
<label class="check"><input type="checkbox" name="sType" value="exhb" />Выставки, конференции, семинары которые я собираюсь посетить</label>
</div>
<div class="mf-line">
<label class="check"><input type="checkbox" name="sType" value="exhb" />Фотографии на которых я отмечен</label>
</div>
<div class="mf-buttons-line">
<button class="icon-save">сохранить</button>
</div>
</form>
</div>
</div>
-->
{# <div class="set-sect subscribe">#}
@ -245,7 +242,7 @@
});
});
</script>
</script>
{% endblock %}
{% endblock %}

@ -1,6 +1,7 @@
{% extends 'client/base_catalog.html' %}
{% load i18n %}
{% load template_filters thumbnail %}
{% load thumbnail %}
{% load template_filters %}
{% block og %}
<meta property="og:image" content="{% thumbnail object.get_logo '500' %}">
@ -19,12 +20,11 @@
</div>
{% endblock %}
{% block page_title %}
{% endblock %}
{% block content_list %}
{% if object.paid_new_id and object.paid_new.public %}
{% if object.paid_new_id and object.paid_new.public %}
{% include 'client/includes/exposition/expo_paid.html' with exposition=object %}
{% else %}
{% include 'client/includes/exposition/exposition_object.html' with exposition=object %}

@ -7,28 +7,28 @@
<div class="m-article event-page">
<div class="item-wrap event clearfix">
<aside>
{% if exposition.expohit %}
<div class="hit"></div>
{% endif %}
<div class="i-pict">
{% with obj=exposition %}
{% include 'client/includes/show_logo.html' %}
{% endwith %}
</div>
<div class="i-stats">
{% if exposition.visitors %}
<span class="visitors" title="Посетители">{{ exposition.visitors }}</span>
{% endif %}
{% if exposition.members %}
<span class="participants" title="Участники">{{ exposition.members }}</span>
{% endif %}
</div>
<div class="i-discount">
{% if exposition.discount %}
<a class="discount-button" href="#">{% trans 'Скидка' %} -{{ exposition.discount }}%</a>
<div class="dsc-text">{{ exposition.discount_description|safe|linebreaks }}</div>
{% endif %}
</div>
{% if exposition.expohit %}
<div class="hit"></div>
{% endif %}
<div class="i-pict">
{% with obj=exposition %}
{% include 'client/includes/show_logo.html' %}
{% endwith %}
</div>
<div class="i-stats">
{% if exposition.visitors %}
<span class="visitors" title="Посетители">{{ exposition.visitors }}</span>
{% endif %}
{% if exposition.members %}
<span class="participants" title="Участники">{{ exposition.members }}</span>
{% endif %}
</div>
<div class="i-discount">
{% if exposition.discount %}
<a class="discount-button" href="#">{% trans 'Скидка' %} -{{ exposition.discount }}%</a>
<div class="dsc-text">{{ exposition.discount_description|safe|linebreaks }}</div>
{% endif %}
</div>
{% if exposition.paid_new.logo %}
<div class="paid-partner-block">
<p class="partner-title">{% trans 'Организатор' %}</p>
@ -37,32 +37,37 @@
</div>
</div>
{% endif %}
</aside>
</aside>
<div class="i-info">
<header>
<h1 class="i-title">
{% if exposition.main_title %}
<header>
<h1 class="i-title">
{% if exposition.main_title %}
{{ exposition.name|safe }} - {{ exposition.main_title|lowfirst|safe }}
{% else %}
{{ exposition.name|safe }}
{% endif %}
</h1>
</header>
{% else %}
{{ exposition.name|safe }}
{% endif %}
</h1>
</header>
<div class="i-date">
{% with obj=exposition %}
{% include 'client/includes/show_date_block.html' %}
{% endwith %}
<div class="i-date">
{% with obj=exposition %}
{% include 'client/includes/show_date_block.html' %}
{% endwith %}
{% include "client/includes/sharing_block.html" %}
</div>
</div>
{% if exposition.place %}
{% if exposition.place %}
<div class="i-address">
<header>
<div class="address">
{{ exposition.place.adress }}
{% if exposition.place.web_page %}
<a href="{{ exposition.place.web_page }}">{{ exposition.place.name }}</a>
{% else %}
{{ exposition.place.name }}
{% endif %}
{{ exposition.place.address.address }}
</div>
<div class="show-map"><a class="toggle-map" href="#">{% trans 'Раскрыть карту' %}</a></div>
</header>
@ -73,57 +78,57 @@
<div class="map-canvas" id="map-canvas" data-coords="{{ exposition.place.address.lat|coord_format }},{{ exposition.place.address.lng|coord_format }}" ></div>
</div>
</div>
{% endif %}
{% endif %}
<div class="event_org">
<a href="#pw-event-news-subscribe" class="button pw-open new_subribe_btn"><i class="fa fa-at"></i>&nbsp;{% trans 'Подписаться на новости' %}</a>
</div>
<hr />
<div class="i-buttons clearfix">
<div class="ib-main">
{% with event=exposition user=user %}
{% include 'client/includes/visit_button.html' %}
{% endwith %}
{% include 'client/includes/calendar_button.html' with obj=object %}
<div class="{% if request.user.is_authenticated%}note-wrap{% else %}note-wrap-disabled{% endif %}">
{% with note=object|note_by_user:request.user %}
<a class="button green icon-note {% if note %}active{% endif %} note-button" href="/expo/add-note/{{ obj.url }}/">{% trans 'заметка' %}</a>
<div class="note-overlay">
<form action="">
<textarea name="note_text" class="note-text"> {{ note }}</textarea>
</form>
</div>
{% endwith %}
</div>
{% if request.user.is_admin %}
<a class="button green " href="/admin/exposition/{{ object.url }}/">{% trans 'изменить' %}</a>
{% endif %}
<hr />
<div class="i-buttons clearfix">
<div class="ib-main">
{% with event=exposition user=user %}
{% include 'client/includes/visit_button.html' %}
{% endwith %}
{% include 'client/includes/calendar_button.html' with obj=object %}
<div class="{% if request.user.is_authenticated%}note-wrap{% else %}note-wrap-disabled{% endif %}">
{% with note=object|note_by_user:request.user %}
<a class="button green icon-note {% if note %}active{% endif %} note-button" href="/expo/add-note/{{ obj.url }}/">{% trans 'заметка' %}</a>
<div class="note-overlay">
<form action="">
<textarea name="note_text" class="note-text"> {{ note }}</textarea>
</form>
</div>
{% endwith %}
</div>
{% if request.user.is_admin %}
<a class="button green " href="/admin/exposition/{{ object.url }}/">{% trans 'изменить' %}</a>
{% endif %}
{% if exposition.photogallery_id %}
<a class="button blue icon-photo" href="{{ exposition.get_permanent_url }}photo/">{% trans 'фото' %}</a>
{% endif %}
</div>
<div class="ib-add"><a class="button blue2 icon-find" href="http://www.booking.com/searchresults.html?aid={{ book_aid }}&city={{ object.city.id }}">{% trans 'Найти отель' %}</a></div>
</div>
<hr />
<div class="i-divs clearfix">
<div class="i-subj">
<ul>
{% with themes=exposition.theme.all %}
{% for theme in themes %}
<li><a href="{{ object.catalog }}theme/{{ theme.url }}/">{{ theme.name }} ({{ theme.expositions_number }})</a></li>
{% endfor %}
{% endwith %}
</ul>
</div>
<div class="i-tags">
{% with tags=exposition.tag.all %}
{% for tag in tags %}
<a href="{{ object.catalog }}tag/{{ tag.url }}/">{{ tag.name }}</a>{% if forloop.counter != tags|length %},{% endif %}
{% endfor %}
{% endwith %}
</div>
</div>
</div>
</div>
<div class="ib-add"><a class="button blue2 icon-find" href="http://www.booking.com/searchresults.html?aid={{ book_aid }}&city={{ object.city.id }}">{% trans 'Найти отель' %}</a></div>
</div>
<hr />
<div class="i-divs clearfix">
<div class="i-subj">
<ul>
{% with themes=exposition.theme.all %}
{% for theme in themes %}
<li><a href="{{ object.catalog }}theme/{{ theme.url }}/">{{ theme.name }} ({{ theme.expositions_number }})</a></li>
{% endfor %}
{% endwith %}
</ul>
</div>
<div class="i-tags">
{% with tags=exposition.tag.all %}
{% for tag in tags %}
<a href="{{ object.catalog }}tag/{{ tag.url }}/">{{ tag.name }}</a>{% if forloop.counter != tags|length %},{% endif %}
{% endfor %}
{% endwith %}
</div>
</div>
</div>
</div>
<p><a href="#pw-event-news-subscribe" class="button pw-open"><i class="fa fa-at"></i>&nbsp;{% trans 'Подписаться на новости' %}</a>&nbsp;&nbsp;&nbsp;<i>{% blocktrans with name=exposition.name|safe %}Получайте актуальную информацию о выставке {{ name }} на свой email{% endblocktrans %}</i></p>
@ -332,7 +337,7 @@
</div>
{% include 'client/includes/booking_block.html' with city=exposition.city place=exposition.place event=exposition %}
<hr />
<hr />
{% if exposition.get_nearest_events %}
<div class="e-cat">
@ -411,7 +416,7 @@
{% endblock %}
{% block popup %}
{% include 'client/popups/advertise_member.html' with form=advertising_form %}
{% include 'client/popups/advertise_member.html' with form=advertising_form %}
{% include 'client/popups/issue_organizer.html' %}
{% include 'client/popups/event_news_subscribe.html' %}
{% endblock %}

@ -1,67 +1,72 @@
{% load static %}
{% load i18n %}
{% load static i18n %}
{% load thumbnail %}
{% load template_filters %}
{% block page_body %}
<div class="m-article event-page">
<div class="item-wrap event clearfix">
<aside>
{% if exposition.expohit %}
<div class="hit"></div>
{% endif %}
<div class="m-article event-page">
<div class="item-wrap event clearfix">
<aside>
{% if exposition.expohit %}
<div class="hit"></div>
{% endif %}
{% if exposition.canceled %}
<div class="cancel"></div>
{% endif %}
<div class="i-pict">
<div class="i-pict">
{% with obj=exposition %}
{% include 'client/includes/show_logo.html' %}
{% endwith %}
</div>
</div>
<div class="i-stats">
{% if exposition.visitors %}
<span class="visitors" title="{% trans 'Посетители' %}">{{ exposition.visitors }}</span>
{% endif %}
<div class="i-stats">
{% if exposition.visitors %}
<span class="visitors" title="{% trans 'Посетители' %}">{{ exposition.visitors }}</span>
{% endif %}
{% if exposition.members %}
<span class="participants" title="{% trans 'Участники' %}">{{ exposition.members }}</span>
{% endif %}
</div>
{% if exposition.members %}
<span class="participants" title="{% trans 'Участники' %}">{{ exposition.members }}</span>
{% endif %}
</div>
<div class="i-discount">
<div class="i-discount">
{% if exposition.discount %}
<a class="discount-button" href="#">{% trans 'Скидка' %} -{{ exposition.discount }}%</a>
<div class="dsc-text">{{ exposition.discount_description|safe|linebreaks }}</div>
{% endif %}
</div>
</aside>
<div class="i-info">
<header>
<h1 class="i-title">
{% if exposition.main_title %}
{{ exposition.name|safe }} - {{ exposition.main_title|lowfirst|safe }}
{% else %}
{{ exposition.name|safe }}
{% endif %}
</h1>
</header>
<div class="i-date">
{% with obj=exposition %}
{% include 'client/includes/show_date_block.html' %}
{% endwith %}
{% include "client/includes/sharing_block.html" %}
</div>
{% if exposition.place %}
{% endif %}
</div>
</aside>
<div class="i-info">
<header>
<h1 class="i-title">
{% if exposition.main_title %}
{{ exposition.name|safe }} - {{ exposition.main_title|lowfirst|safe }}
{% else %}
{{ exposition.name|safe }}
{% endif %}
</h1>
</header>
<div class="i-date">
{% with obj=exposition %}
{% include 'client/includes/show_date_block.html' %}
{% endwith %}
{% include "client/includes/sharing_block.html" %}
</div>
{% if exposition.place %}
<div class="i-address">
<header>
<div class="address">
{{ exposition.place.adress }}
{% if exposition.place.web_page %}
<a href="{{ exposition.place.web_page }}">{{ exposition.place.name }}</a>
{% else %}
{{ exposition.place.name }}
{% endif %}
{{ exposition.place.address.address }}
</div>
<div class="show-map"><a class="toggle-map" href="#">{% trans 'Раскрыть карту' %}</a></div>
</header>
@ -82,65 +87,65 @@
</div>
</header>
</div>
{% endif %}
{% endif %}
<div class="event_org">
<a href="#pw-event-news-subscribe" class="button pw-open new_subribe_btn"><i class="fa fa-at"></i>&nbsp;{% trans 'Подписаться на новости' %}</a>
</div>
<hr />
<hr />
<div class="i-buttons clearfix">
<div class="ib-main">
{% with event=exposition user=user %}
{% include 'client/includes/visit_button.html' %}
{% endwith %}
<div class="i-buttons clearfix">
<div class="ib-main">
{% with event=exposition user=user %}
{% include 'client/includes/visit_button.html' %}
{% endwith %}
{% include 'client/includes/calendar_button.html' with obj=object %}
<div class="{% if request.user.is_authenticated%}note-wrap{% else %}note-wrap-disabled{% endif %}">
{% with note=object|note_by_user:request.user %}
<a class="button green icon-note {% if note %}active{% endif %} note-button" href="/expo/add-note/{{ obj.url }}/">{% trans 'заметка' %}</a>
<div class="note-overlay">
<form action="">
<textarea name="note_text" class="note-text"> {{ note }}</textarea>
</form>
</div>
{% endwith %}
</div>
{% if request.user.is_admin %}
<a target="_blank" class="button green " href="/admin/exposition/{{ object.url }}/">{% trans 'изменить' %}</a>
{% endif %}
{% with note=object|note_by_user:request.user %}
<a class="button green icon-note {% if note %}active{% endif %} note-button" href="/expo/add-note/{{ obj.url }}/">{% trans 'заметка' %}</a>
<div class="note-overlay">
<form action="">
<textarea name="note_text" class="note-text"> {{ note }}</textarea>
</form>
</div>
{% endwith %}
</div>
{% if request.user.is_admin %}
<a target="_blank" class="button green " href="/admin/exposition/{{ object.url }}/">{% trans 'изменить' %}</a>
{% endif %}
{% if exposition.photogallery_id %}
<a class="button blue icon-photo" href="{{ exposition.get_permanent_url }}photo/">{% trans 'фото' %}</a>
{% endif %}
</div>
<div class="ib-add"><a target="_blank" class="button blue2 icon-find" href="http://www.booking.com/searchresults.html?aid={{ book_aid }}&city={{ object.city.id }}">{% trans 'Найти отель' %}</a></div>
</div>
</div>
<div class="ib-add"><a target="_blank" class="button blue2 icon-find" href="http://www.booking.com/searchresults.html?aid={{ book_aid }}&city={{ object.city.id }}">{% trans 'Найти отель' %}</a></div>
</div>
<hr />
<hr />
<div class="i-divs clearfix">
<div class="i-subj">
<ul>
<div class="i-divs clearfix">
<div class="i-subj">
<ul>
{% with themes=exposition.themes %}
{% for theme in themes %}
<li><a href="{{ object.catalog }}theme/{{ theme.url }}/">{{ theme.name }} ({{ theme.expositions_number }})</a></li>
{% endfor %}
{% endwith %}
</ul>
</div>
<div class="i-tags">
{% with tags=exposition.tags %}
{% for tag in tags %}
<a href="{{ object.catalog }}tag/{{ tag.url }}/">{{ tag.name }}</a>{% if forloop.counter != tags|length %},{% endif %}
{% endfor %}
{% endwith %}
</div>
</div>
</div>
</div>
</ul>
</div>
<div class="i-tags">
{% with tags=exposition.tags %}
{% for tag in tags %}
<a href="{{ object.catalog }}tag/{{ tag.url }}/">{{ tag.name }}</a>{% if forloop.counter != tags|length %},{% endif %}
{% endfor %}
{% endwith %}
</div>
</div>
</div>
</div>
{% include 'client/includes/exposition/exposition_services.html' with object=exposition %}
@ -181,7 +186,7 @@
{% endif %}
</div>
<hr />
<hr />
{% include 'client/includes/banners/expo_detail.html' %}
@ -254,8 +259,8 @@
{% include 'client/includes/banners/detail_inner.html' %}
</div>
{% include "client/includes/article/articles_in_event.html" with event=exposition news_list=news %}
<hr />
{% include "client/includes/article/articles_in_event.html" with event=exposition news_list=news %}
<hr />
<div class="i-members clearfix">
<div class="im-participants">
@ -323,7 +328,7 @@
</div>
</div>
<hr/>
<hr/>
{% if exposition.area %}
{% else %}
{% if exposition.members or exposition.visitors or exposition.foundation_year %}
@ -356,13 +361,13 @@
</div>
</div>
{% endif %}
</div>
</div>
{% include 'client/includes/booking_block.html' with city=exposition.city place=exposition.place event=exposition %}
{% include 'client/includes/booking_block.html' with city=exposition.city place=exposition.place event=exposition %}
<hr />
{% if exposition.get_nearest_events %}
{% if exposition.get_nearest_events %}
<div class="e-cat">
<div class="sect-title">{% trans 'Другие выставки, которые могут быть вам интересны' %}</div>
<ul class="cat-list cl-exhibitions">
@ -426,57 +431,57 @@
</ul>
</div>
{% include 'client/includes/banners/detail_inner_3.html' %}
{% endif %}
<div class="e-cat look-also">
<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 }}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 %}
<a href="{{ exposition.catalog }}theme/{{ exposition.theme.all.0.url }}/country/{{ exposition.country.url }}/">{% trans "Выставки по тематике " %}&laquo;{{ exposition.theme.all.0.name|capfirst }}&raquo; {% if request.LANGUAGE_CODE == 'ru' and exposition.country.inflect %}{{ exposition.country.inflect }}{% else %}{% trans 'in' %} {{ exposition.country.name }}{% endif %}</a>
<a href="{{ exposition.catalog }}theme/{{ exposition.theme.all.0.url }}/city/{{ exposition.city.url }}/">{% trans "Выставки по тематике " %}&laquo;{{ exposition.theme.all.0.name|capfirst }}&raquo; {% if request.LANGUAGE_CODE == 'ru' and exposition.city.inflect %}{{ exposition.city.inflect }}{% else %}{% trans 'in' %} {{ exposition.city.name }}{% endif %}</a>
{% endif %}
</div>
{% endif %}
<div class="e-cat look-also">
<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 }}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 %}
<a href="{{ exposition.catalog }}theme/{{ exposition.theme.all.0.url }}/country/{{ exposition.country.url }}/">{% trans "Выставки по тематике " %}&laquo;{{ exposition.theme.all.0.name|capfirst }}&raquo; {% if request.LANGUAGE_CODE == 'ru' and exposition.country.inflect %}{{ exposition.country.inflect }}{% else %}{% trans 'in' %} {{ exposition.country.name }}{% endif %}</a>
<a href="{{ exposition.catalog }}theme/{{ exposition.theme.all.0.url }}/city/{{ exposition.city.url }}/">{% trans "Выставки по тематике " %}&laquo;{{ exposition.theme.all.0.name|capfirst }}&raquo; {% if request.LANGUAGE_CODE == 'ru' and exposition.city.inflect %}{{ exposition.city.inflect }}{% else %}{% trans 'in' %} {{ exposition.city.name }}{% endif %}</a>
{% endif %}
</div>
{% endblock %}
{% block content_text %}
{% endblock %}
{% block popup %}
{% include 'client/popups/advertise_member.html' with form=advertising_form %}
{% include 'client/popups/advertise_member.html' with form=advertising_form %}
{% include 'client/popups/event_news_subscribe.html' %}
{% endblock %}
{% block scripts %}
{% if request.GET.debug == '1' %}
<script src="{% static 'client/js/_modules/page.exposition.object.js' %}"></script>
{% else %}
<script src="{% static 'client/js_min/_modules/page.exposition.object.min.js' %}"></script>
{% endif %}
<script>
EXPO.exposition.object.init({
visit:{
activeClass:"visit",
passiveClass:"unvisit",
currentHtml:'<li class="current"><a href="{{ request.user.get_permanent_url }}">{{ request.user.get_full_name }}&nbsp;{% if request.user.company %}({{ request.user.company.name }}){% endif %}</a></li>',
visitorsListId:"visitors-list",
somebodyId:"somebody",
nobodyId:"nobody"
},
note:{
wrapClass:'note-wrap',
wrapDisabledClass:'note-wrap-disabled',
buttonClass:'note-button',
inputClass:'note-text'
},
advertise:{
id:"advert-member-form"
},
{% if request.GET.debug == '1' %}
<script src="{% static 'client/js/_modules/page.exposition.object.js' %}"></script>
{% else %}
<script src="{% static 'client/js_min/_modules/page.exposition.object.min.js' %}"></script>
{% endif %}
<script>
EXPO.exposition.object.init({
visit:{
activeClass:"visit",
passiveClass:"unvisit",
currentHtml:'<li class="current"><a href="{{ request.user.get_permanent_url }}">{{ request.user.get_full_name }}&nbsp;{% if request.user.company %}({{ request.user.company.name }}){% endif %}</a></li>',
visitorsListId:"visitors-list",
somebodyId:"somebody",
nobodyId:"nobody"
},
note:{
wrapClass:'note-wrap',
wrapDisabledClass:'note-wrap-disabled',
buttonClass:'note-button',
inputClass:'note-text'
},
advertise:{
id:"advert-member-form"
},
event_news_subscribe:{
id: "event-news-subscribe-form"
},
addCalendarText:"{% trans 'В расписание' %}",
removeCalendarText:"{% trans 'Из расписания' %}"
});
</script>
addCalendarText:"{% trans 'В расписание' %}",
removeCalendarText:"{% trans 'Из расписания' %}"
});
</script>
{% endblock %}

@ -4,10 +4,10 @@
<a class="button icon-sm" href="#">{% trans 'услуги' %}</a>
<div class="cli-services-sm">
<ul>
{% if obj.paid %}
<li><a target="_blank" href="{{ obj.paid.oficial_link.get_object_url }}">{% trans 'Официальный сайт' %}</a></li>
<li><a target="_blank" href="{{ obj.paid.tickets_link.get_object_url }}">{% trans 'Билеты на выставку' %}</a></li>
<li><a target="_blank" href="{{ obj.paid.participation_link.get_object_url }}">{% trans 'Заявка на участие' %}</a></li>
{% if obj.paid_new %}
<li><a target="_blank" href="{{ obj.paid_new.oficial_link.get_object_url }}">{% trans 'Официальный сайт' %}</a></li>
<li><a target="_blank" href="{{ obj.paid_new.tickets_link.get_object_url }}">{% trans 'Билеты на выставку' %}</a></li>
<li><a target="_blank" href="{{ obj.paid_new.participation_link.get_object_url }}">{% trans 'Заявка на участие' %}</a></li>
{% elif obj.partner %}
<li><a target="_blank" href="{{ obj.web_page }}">{% trans 'Официальный сайт' %}</a></li>
<li><a target="_blank" href="{{ obj.link }}">{% trans 'Билеты' %}</a></li>
@ -20,4 +20,4 @@
{% endif %}
</ul>
</div>
</div>
</div>

@ -112,7 +112,7 @@
{# <a class="cl-btn icon-cal" href="{% url 'account_calendar' %}">{% trans 'календарь' %}</a>#}
{# <a class="cl-btn icon-doc" href="/profile/feed/">{% trans 'документы' %}</a>#}
<a href="{% url 'account_calendar' %}" data-tooltip="{% trans 'Календарь' %}"><i class="fa fa-calendar"></i></a>
<a href="/profile/feed/" data-tooltip="{% trans 'Документы' %}"><i class="fa fa-file-text-o"></i></a>
<a href="/profile/feed/" data-tooltip="{% trans 'Лента событий' %}"><i class="fa fa-file-text-o"></i></a>
</div>
<div class="clb-profile">

@ -1,11 +1,11 @@
{% load i18n %}
<div class="reversed" style="border-left: 5px solid #ff9900; padding: 8px 12px; background-color: #fff; font-size:17px; text-align: justify; margin-bottom: 10px">{% trans "События по указанным параметрам не найдены. Попробуйте упростить параметры или расширить временные рамки. Также, вы можете посмотреть уже прошедшие события и проверить самостоятельно, будут ли они проходить в будущем." %}</div>
<div class="reversed" style="border-left: 5px solid #ff9900; padding: 8px 12px; background-color: #fff; font-size:17px; text-align: justify; margin-bottom: 10px">{% trans "События по указанным параметрам не найдены. Попробуйте упростить параметры или расширить временные рамки. Также вы можете посмотреть уже прошедшие события и проверить самостоятельно, будут ли они проходить в будущем." %}</div>
<div id="message-not-found" class="modal_not_found">
<div class="modal_not_found_body">
<h3>{% trans 'События по указанным параметрам не найдены.' %}</h3>
<p>{% trans "Попробуйте упростить параметры или расширить временные рамки. Также, вы можете посмотреть уже прошедшие события и проверить самостоятельно, будут ли они проходить в будущем." %}</p>
<h3>{% trans 'События по указанным параметрам не найдены' %}</h3>
<p>{% trans "Попробуйте упростить параметры или расширить временные рамки. Также вы можете посмотреть уже прошедшие события и проверить самостоятельно, будут ли они проходить в будущем." %}</p>
</div>
</div>

@ -1,68 +1,68 @@
{% load static %}
{% load i18n %}
{% load static i18n %}
<div id="pw-reg" class="popup-window pw-reg">
<header class="clearfix">
<div class="pw-title">{% trans 'Регистрация' %}</div>
</header>
<div class="pw-body clearfix">
<form method="post" class="pw-form simple-validate-register reg-form" id="reg_form" action="/register/">{% csrf_token %}
<div class="pwf-line">
<div class="pwf-field">
<header class="clearfix">
<div class="pw-title">{% trans 'Регистрация' %}</div>
</header>
<div class="pw-body clearfix">
<form method="post" class="pw-form simple-validate-register reg-form" id="reg_form" action="{% url 'register' %}" data-validate-url="{% url 'registration_form_validate' %}">
{% csrf_token %}
<div class="pwf-line">
<div class="pwf-field">
<input id="id_first_name" maxlength="30" name="first_name" placeholder="{% trans 'Имя' %}" type="text">
</div>
<div class="pwf-msg">
<div class="msg-help">{% trans 'например, свое имя' %}</div>
</div>
</div>
<div class="pwf-line">
<div class="pwf-field">
<div class="pwf-msg">
<div class="msg-help">{% trans 'например, свое имя' %}</div>
</div>
</div>
<div class="pwf-line">
<div class="pwf-field">
<input id="id_last_name" maxlength="30" name="last_name" placeholder="{% trans 'Фамилия' %}" type="text">
</div>
<div class="pwf-msg">
<div class="msg-help">{% trans 'например, свою фамилию' %}</div>
</div>
</div>
<div class="pwf-line">
<div class="pwf-field">
<div class="pwf-msg">
<div class="msg-help">{% trans 'например, свою фамилию' %}</div>
</div>
</div>
<div class="pwf-line">
<div class="pwf-field">
<input id="id_email" name="email" placeholder="{% trans 'Адрес электронной почты' %}" type="text">
</div>
<div class="pwf-msg"><div class="msg-help">{% trans 'например, ivanova@mail.ru' %}</div></div>
</div>
<div class="pwf-line">
<div class="pwf-field">
<div class="pwf-msg"><div class="msg-help">{% trans 'например, ivanova@mail.ru' %}</div></div>
</div>
<div class="pwf-line">
<div class="pwf-field">
<input id="id_password1" name="password1" placeholder="{% trans 'Придумайте пароль' %}" type="password">
</div>
<div class="pwf-msg"><div class="msg-help">{% trans 'пароль должен иметь не меньше 6 символов' %}</div></div>
</div>
<div class="pwf-msg"><div class="msg-help">{% trans 'пароль должен иметь не меньше 6 символов' %}</div></div>
</div>
<div class="pwf-line">
<div class="pwf-field">
<div class="pwf-field">
<input id="id_password2" name="password2" placeholder="{% trans 'Повторите пароль' %}" type="password">
</div>
<div class="pwf-msg"><div class="msg-help">{% trans 'пароль должен иметь не меньше 6 символов' %}</div></div>
</div>
<div class="pwf-msg"><div class="msg-help">{% trans 'пароль должен иметь не меньше 6 символов' %}</div></div>
</div>
<a href="{% url 'termsofuse' %}" style="color:#a2a2a2;">{% trans "Пользовательское соглашение" %}</a>
<div class="pwf-buttons-line pwf-line" style="margin-top: 12px;">
<div class="pwf-field">
<button type="submit" class="icon-check">{% trans 'Зарегистрироваться' %}</button>
</div>
<div class="pwf-msg err-message-box pd-top-14 red"> {% trans "Ошибка" %}</div>
</div>
</form>
</div>
<footer class="clearfix">
<div class="soc-med-login">
<div class="sm-label">{% trans 'или войдите с помощью' %}</div>
<div class="sm-body">
<ul>
<li><a href="{% url 'social:begin' 'facebook' %}?next={{ request.path }}"><img src="{% static 'client/img/soc-medias/icon-fb.png' %}" alt="" /></a></li>
<li><a href="{% url 'social:begin' 'twitter' %}?next={{ request.path }}"><img src="{% static 'client/img/soc-medias/icon-twit.png' %}" alt="" /></a></li>
<li><a href="{% url 'social:begin' 'odnoklassniki-oauth2' %}?next={{ request.path }}"><img src="{% static 'client/img/soc-medias/icon-ok.png' %}" alt="" /></a></li>
<li><a href="{% url 'social:begin' 'mailru-oauth2' %}?next={{ request.path }}"><img src="{% static 'client/img/soc-medias/icon-mailr.png' %}" alt="" /></a></li>
<li><a href="{% url 'social:begin' 'vk-oauth2' %}?next={{ request.path }}"><img src="{% static 'client/img/soc-medias/icon-vk.png' %}" alt="" /></a></li>
</ul>
</div>
</div>
</footer>
</div>
<button type="submit" class="icon-check">{% trans 'Зарегистрироваться' %}</button>
</div>
<div class="pwf-msg err-message-box pd-top-14 red"> {% trans "Ошибка" %}</div>
</div>
</form>
</div>
<footer class="clearfix">
<div class="soc-med-login">
<div class="sm-label">{% trans 'или войдите с помощью' %}</div>
<div class="sm-body">
<ul>
<li><a href="{% url 'social:begin' 'facebook' %}?next={{ request.path }}"><img src="{% static 'client/img/soc-medias/icon-fb.png' %}" alt="" /></a></li>
<li><a href="{% url 'social:begin' 'twitter' %}?next={{ request.path }}"><img src="{% static 'client/img/soc-medias/icon-twit.png' %}" alt="" /></a></li>
<li><a href="{% url 'social:begin' 'odnoklassniki-oauth2' %}?next={{ request.path }}"><img src="{% static 'client/img/soc-medias/icon-ok.png' %}" alt="" /></a></li>
<li><a href="{% url 'social:begin' 'mailru-oauth2' %}?next={{ request.path }}"><img src="{% static 'client/img/soc-medias/icon-mailr.png' %}" alt="" /></a></li>
<li><a href="{% url 'social:begin' 'vk-oauth2' %}?next={{ request.path }}"><img src="{% static 'client/img/soc-medias/icon-vk.png' %}" alt="" /></a></li>
</ul>
</div>
</div>
</footer>
</div>

@ -1,6 +1,5 @@
{% extends 'base_catalog.html' %}
{% load static %}
{% load i18n %}
{% load static i18n %}
{% load template_filters %}
{% block bread_scrumbs %}

@ -108,7 +108,7 @@
<h3>{% trans "Решение 1." %}</h3>
<p>{% blocktrans %}<a href="#" data-scroll="#reviews">Воспитать выставочного специалиста</a> в своей компании.{% endblocktrans %}</p>
<p>{% trans "Необходимо выделить хотя бы 1 человека, который в течение минимум 2-3 месяцев будет заниматься подготовкой к выставке." %}</p>
<p class="with_arrow">{% trans 'А как это может быть в реальнлсти, посмотрите в нашем мультфильме" и стрелочку оранжевую на проигрыватель.' %}</p>
<p class="with_arrow">{% trans 'А как это может быть в реальности, посмотрите в нашем мультфильме.' %}</p>
</div>
<div class="variant expomap">

Loading…
Cancel
Save