Merged branches

remotes/origin/1203
Назар Котюк 11 years ago
parent 1cf238d979
commit b17a6e4748
  1. 1
      accounts/management/__init__.py
  2. 1
      accounts/management/commands/__init__.py
  3. 82
      accounts/management/commands/load_accounts.py
  4. 1
      article/management/__init__.py
  5. 1
      article/management/commands/__init__.py
  6. 62
      article/management/commands/article_load.py
  7. 63
      article/management/commands/articles_from_old.py
  8. 79
      article/management/commands/news_from_old.py
  9. 45
      article/management/commands/news_generate_file.py
  10. 69
      article/management/commands/update_news.py
  11. 0
      banners/__init__.py
  12. 10
      banners/models.py
  13. 16
      banners/tests.py
  14. 7
      banners/urls.py
  15. 10
      banners/views.py
  16. 1
      conference/management/__init__.py
  17. 1
      conference/management/commands/__init__.py
  18. 99
      conference/management/commands/conf_load.py
  19. 218
      conference/management/commands/conf_old.py
  20. 1
      settings/management/__init__.py
  21. 1
      settings/management/commands/__init__.py
  22. 36
      settings/management/commands/do_inflect.py
  23. 26
      settings/management/commands/update_views_cache.py
  24. BIN
      static/client.old/img/comments/1.png
  25. BIN
      static/client.old/img/comments/2.gif
  26. BIN
      static/client.old/img/comments/3.png
  27. BIN
      static/client.old/img/comments/4.png
  28. BIN
      static/client.old/img/comments/5.jpg
  29. BIN
      static/client.old/img/comments/PROPHOTOS.png
  30. BIN
      static/client.old/img/comments/RS Balance.png
  31. BIN
      static/client.old/img/comments/Revival RMC.jpg
  32. BIN
      static/client.old/img/comments/Sail First.png
  33. BIN
      static/client.old/img/comments/VEZDEVOZ.png
  34. BIN
      static/img/soc-medias/icon-fb.png
  35. BIN
      static/img/soc-medias/icon-fb_hover.png
  36. BIN
      static/img/soc-medias/icon-goog.png
  37. BIN
      static/img/soc-medias/icon-lin.png
  38. BIN
      static/img/soc-medias/icon-lin_hover.png
  39. BIN
      static/img/soc-medias/icon-mailr.png
  40. BIN
      static/img/soc-medias/icon-ok.png
  41. BIN
      static/img/soc-medias/icon-twit.png
  42. BIN
      static/img/soc-medias/icon-vk.png
  43. BIN
      static/img/soc-medias/icon-yand.png
  44. BIN
      static/img/soc-medias/sm-icon-fb-w.png
  45. BIN
      static/img/soc-medias/sm-icon-fb.png
  46. BIN
      static/img/soc-medias/sm-icon-fb_hover.png
  47. BIN
      static/img/soc-medias/sm-icon-lin-w.png
  48. BIN
      static/img/soc-medias/sm-icon-lin.png
  49. BIN
      static/img/soc-medias/sm-icon-lin_hover.png
  50. BIN
      static/img/soc-medias/sm-icon-rss.png
  51. BIN
      static/img/soc-medias/sm-icon-twit-w.png
  52. BIN
      static/img/soc-medias/sm-icon-twit.png
  53. BIN
      static/img/soc-medias/sm-icon-twit_hover.png
  54. BIN
      static/img/soc-medias/sm-icon-vk-w.png
  55. BIN
      static/img/soc-medias/sm-icon-vk.png
  56. BIN
      static/img/soc-medias/sm-icon-vk_hover.png
  57. 59
      templates/admin/meta/meta_list.html
  58. 60
      templates/admin/meta/meta_setting.html
  59. 40
      templates/client/conference/catalog.html
  60. 65
      templates/client/conference/catalog_theme.html
  61. 42
      templates/client/conference/conference_by.html
  62. 24
      templates/client/conference/conference_detail.html
  63. 42
      templates/client/conference/conference_list.html
  64. 25
      templates/client/conference/members.html
  65. 26
      templates/client/conference/visitors.html
  66. 140
      templates/client/includes/conference/conference_list.html
  67. 350
      templates/client/includes/conference/conference_object.html
  68. 14
      templates/client/includes/conference/conference_services.html
  69. 21
      templates/client/includes/index/blogs.html
  70. 9
      templates/client/includes/index/confs.html
  71. 9
      templates/client/includes/index/expos.html
  72. 38
      templates/client/includes/index/main_date_block.html
  73. 64
      templates/client/includes/index/main_events.html
  74. 21
      templates/client/includes/index/news.html
  75. BIN
      templates/client/static_client/img/comments/1.png
  76. BIN
      templates/client/static_client/img/comments/2.gif
  77. BIN
      templates/client/static_client/img/comments/3.png
  78. BIN
      templates/client/static_client/img/comments/4.png
  79. BIN
      templates/client/static_client/img/comments/5.jpg
  80. BIN
      templates/client/static_client/img/comments/PROPHOTOS.png
  81. BIN
      templates/client/static_client/img/comments/RS Balance.png
  82. BIN
      templates/client/static_client/img/comments/Revival RMC.jpg
  83. BIN
      templates/client/static_client/img/comments/Sail First.png
  84. BIN
      templates/client/static_client/img/comments/VEZDEVOZ.png
  85. BIN
      templates/client/static_client/img/partners/new/Bologna Fiere.jpg
  86. BIN
      templates/client/static_client/img/partners/new/Expoforum.gif
  87. BIN
      templates/client/static_client/img/partners/new/Fiera Milano.png
  88. BIN
      templates/client/static_client/img/partners/new/ITE_Logo.png
  89. BIN
      templates/client/static_client/img/partners/new/Lippman Connects.jpg
  90. BIN
      templates/client/static_client/img/partners/new/Messe Duesseldorf.png
  91. BIN
      templates/client/static_client/img/partners/new/Messe Dusseldorf.jpg
  92. BIN
      templates/client/static_client/img/partners/new/Restec.jpg
  93. BIN
      templates/client/static_client/img/partners/new/VDNH.jpg
  94. BIN
      templates/client/static_client/img/partners/new/cnr expo.png
  95. BIN
      templates/client/static_client/img/partners/new/crocus_expo.png
  96. BIN
      templates/client/static_client/img/partners/new/deutsche-messe-ag-logo.jpg
  97. BIN
      templates/client/static_client/img/partners/new/evroexpo.jpg
  98. BIN
      templates/client/static_client/img/partners/new/expocentr_logo.gif
  99. BIN
      templates/client/static_client/img/partners/new/imgo.jpg
  100. BIN
      templates/client/static_client/img/partners/new/koelnmesse_logo.png
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1 @@
__author__ = 'root'

@ -0,0 +1,82 @@
import os
import MySQLdb
from MySQLdb.cursors import DictCursor
from django.core.management.base import BaseCommand
from accounts.models import User
def create_new_user(data):
email = data['email']
firstname = data['firstname']
lastname = data['lastname']
position = data['position']
web_page = data['web_page']
fb = data['fb']
li = data['li']
sk = data['sk']
about = data['about']
password = data['password']
url = data['url']
if not url:
url = str(data['id'])
user = User(username=email, first_name=firstname, last_name=lastname, email=email,
is_staff=False, is_active=True, is_superuser=False, password=password, position=position, url=url)
try:
user.save()
except:
return
profile = user.profile
profile.web_page = web_page
profile.facebook = fb
profile.linkedin = li
profile.skype = sk
profile.about = about
try:
profile.save()
except:
pass
return
class Command(BaseCommand):
def handle(self, *args, **options):
db = MySQLdb.connect(host="localhost",
user="expomap",
passwd="7FbLtAGjse",
db="old_db",
charset='utf8',
cursorclass=DictCursor)
cursor = db.cursor()
sql = """
SELECT customers_id as id, customers_email_address as email, customers_password as password, customers_firstname as firstname ,
customers_lastname as lastname , customers_telephone as phone, customers_job as `position`, customers_web as web_page,
customers_facebook as fb, customers_linkedin as li, customers_skype as sk, customers_about as about,
url
FROM `customers`
where customers_email_address!=''
"""
cursor.execute(sql)
result = cursor.fetchall()
#user.password = result[0]['customers_password']
for res in result:
email = res['email']
print(email)
try:
user = User.objects.get(username=email)
except User.DoesNotExist:
user = None
create_new_user(res)
if user:
password = res['password']
user.password = password
user.save()

@ -0,0 +1 @@
__author__ = 'root'

@ -0,0 +1,62 @@
# -*- coding: utf-8 -*-
import xlrd
from django.core.management.base import BaseCommand
from django.conf import settings
from article.models import Article
from import_xls.excel_settings import article_sett
from django.db import IntegrityError
NEWS_FILE = settings.MEDIA_ROOT+'/import/news.xls'
class Command(BaseCommand):
def handle(self, *args, **options):
f = open(NEWS_FILE, 'r')
book = xlrd.open_workbook(file_contents=f.read())
sheet = book.sheet_by_index(0)
row_list = [sheet.row_values(row_number) for row_number in range(sheet.nrows)]
labels = [label for label in row_list[0]]
existing = 0
for row_number, row in enumerate(row_list[2:]):
published = row[4]
if row[0] != '':
# in first column ids
try:
object = Article.objects.language('ru').get(id=int(row[0]))
object.type = Article.news
object.save()
print(object.type)
continue
except ValueError:
object = Article(type=Article.news)
object.translate('ru')
except Article.DoesNotExist:
object = Article(id= int(row[0]))
object.translate('ru')
existing += 1
else:
# if id blank - its a new place
object = Article(type=Article.news)
object.translate('ru')
for col_number, cell in enumerate(row):
label = labels[col_number]
setting = article_sett.get(label)
if setting is None:
continue
field_name = setting['field']
func = setting.get('func')
value = func(cell)
setattr(object, field_name, value)
object.publish_date = published
try:
object.save()
except Exception, e:
print(e)

@ -0,0 +1,63 @@
# -*- coding: utf-8 -*-
import MySQLdb
from MySQLdb.cursors import DictCursor
from django.core.management.base import BaseCommand, CommandError
from functions.translate import fill_with_signal
from article.models import Article
from accounts.models import User
class Command(BaseCommand):
def handle(self, *args, **options):
db = MySQLdb.connect(host="localhost",
user="kotzilla",
passwd="qazedc",
db="old_expomap",
charset='utf8',
cursorclass=DictCursor)
cursor = db.cursor()
sql = """SELECT articles_description.articles_id as id ,
articles_description.articles_name as main_title,
articles_description.articles_description as description,
articles.authors_id as author,
articles_description.articles_intro as preview,
articles.articles_date_added as created,
articles.articles_last_modified as modified,
articles.articles_date_available as publish_date,
articles_description.articles_head_title_tag as title,
articles_description.articles_head_desc_tag as descriptions,
articles_description.articles_head_keywords_tag as keywords
FROM `articles_description`
JOIN articles
ON articles_description.articles_id=articles.articles_id"""
cursor.execute(sql)
result = cursor.fetchall()
user = User.objects.get(id=1)
Article.objects.blogs().delete()
for a in result:
article = Article(type=Article.blog,
id=a['id'],
created=a['created'],
modified=a['modified'],
publish_date=a['publish_date'])
article.author = user
article.translate('ru')
article.main_title = a['main_title']
article.preview = a['preview']
article.description = a['description']
article.title = a['title']
article.keywords = a['keywords']
if len(a['descriptions'])<255:
article.descriptions = a['descriptions']
article.save()
print(article)
#print(a['main_title'])

@ -0,0 +1,79 @@
# -*- coding: utf-8 -*-
import MySQLdb
from MySQLdb.cursors import DictCursor
from django.core.management.base import BaseCommand, CommandError
from functions.translate import fill_with_signal
from article.models import Article
from accounts.models import User
from django.db import IntegrityError
class Command(BaseCommand):
def handle(self, *args, **options):
db = MySQLdb.connect(host="localhost",
user="expomap",
passwd="7FbLtAGjse",
db="old_db",
charset='utf8',
cursorclass=DictCursor)
cursor = db.cursor()
sql = """SELECT news_id as id ,
headline as main_title,
content as description,
cid as author,
date_added as created
FROM `latest_news`
WHERE status = 1
AND `date_added` >= '2015-04-03'
order by created DESC"""
cursor.execute(sql)
result = cursor.fetchall()
user = User.objects.get(id=1)
#Article.objects.news().delete()
for a in result:
title = a['main_title']
id = a['id']
published = a['created']
#try:
# news = Article.objects.get(id=id)
#except Article.DoesNotExist:
# continue
#news.publish_date = published
#news.save()
if len(a['main_title'])>255 or not a['main_title']:
continue
article = Article(type=Article.news,
id=a['id'],
created=a['created'])
if a['author']:
try:
author = User.objects.get(id=a['author'])
except User.DoesNotExist:
author = user
else:
author = user
article.author = author
article.translate('ru')
article.main_title = a['main_title']
article.description = a['description']
try:
article.save()
print(article)
except :
print ('error. id:%d'%a['id'])
#print(a['main_title'])

@ -0,0 +1,45 @@
# -*- coding: utf-8 -*-
import MySQLdb
from MySQLdb.cursors import DictCursor
from django.core.management.base import BaseCommand, CommandError
from functions.translate import fill_with_signal
from article.models import Article
from accounts.models import User
from django.db import IntegrityError
import xlwt
from django.utils import translation
from django.conf import settings
class Command(BaseCommand):
def handle(self, *args, **options):
translation.activate('en')
workbook = xlwt.Workbook(encoding = 'utf8')
worksheet = workbook.add_sheet('My Worksheet')
font = xlwt.Font()
font.name = 'Times New Roman'
font.bold = True
style = xlwt.XFStyle()
# Create the Style
style.font = font
qs = Article.objects.news()
worksheet.write(0, 0, 'id')
worksheet.write(0, 1, 'url')
worksheet.write(0, 2, 'title')
row = 1
for a in qs:
print a.id
url = a.slug
id = a.id
name = a.main_title
worksheet.write(row, 0, id)
worksheet.write(row, 1, url)
worksheet.write(row, 2, name)
row += 1
workbook.save(settings.MEDIA_ROOT+'/import/exported_news.xls')

@ -0,0 +1,69 @@
# -*- coding: utf-8 -*-
import MySQLdb
import datetime
from django.utils.translation import activate
from MySQLdb.cursors import DictCursor
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
import xlrd
from import_xls.utils import to_theme, to_tag
from functions.translate import fill_with_signal
from article.models import Article
from accounts.models import User
from django.db import IntegrityError
from exposition.models import Exposition
NEWS_FILE = settings.MEDIA_ROOT+'/import/exported_news.xls'
BLOGS_FILE = settings.MEDIA_ROOT+'/import/blogs.xls'
class Command(BaseCommand):
def handle(self, *args, **options):
activate('ru')
f = open(BLOGS_FILE, 'r')
book = xlrd.open_workbook(file_contents=f.read())
sheet = book.sheet_by_index(0)
row_list = [sheet.row_values(row_number) for row_number in range(sheet.nrows)]
print(len(row_list))
existing = 0
for row_number, row in enumerate(row_list[2:]):
id = int(row[0])
if id == 49:
continue
main_title = row[1]
theme = row[2]
tag = row[3]
description = row[4]
article = Article.objects.language('ru').get(id=id)
#article.main_title = main_title
#article.description = description
#article.save()
to_theme(article, theme)
to_tag(article, tag)
print(id)
"""
try:
expo = Exposition.objects.filter(translations__name=event)[0]
except IndexError:
expo = None
if expo:
article.exposition = expo
article.save()
print(id)
"""

@ -0,0 +1,10 @@
from django.db import models
# Create your models here.
class Redirect(models.Model):
redirect = models.URLField()
count = models.PositiveIntegerField(default=0)
def __unicode__(self):
return self.redirect

@ -0,0 +1,16 @@
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.assertEqual(1 + 1, 2)

@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
urlpatterns = patterns('',
url(r'redirect/(?P<id>.*)/$', 'banners.views.redirect'),
)

@ -0,0 +1,10 @@
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404
from banners.models import Redirect
from django.db.models import F
def redirect(request, id):
redirect = get_object_or_404(Redirect, id=id)
Redirect.objects.filter(id=id).update(count=F('count')+1)
return HttpResponseRedirect(redirect.redirect)

@ -0,0 +1 @@
__author__ = 'root'

@ -0,0 +1,99 @@
# -*- coding: utf-8 -*-
import xlrd
from django.core.management.base import BaseCommand
from django.conf import settings
from conference.models import Conference
from import_xls.excel_settings import event_sett
from django.db import IntegrityError
CONF_FILE = settings.MEDIA_ROOT+'/import/conf.xls'
ADDCONF_FILE = settings.MEDIA_ROOT+'/import/add_conf.xls'
class Command(BaseCommand):
def handle(self, *args, **options):
f = open(ADDCONF_FILE, 'r')
book = xlrd.open_workbook(file_contents=f.read())
sheet = book.sheet_by_index(0)
row_list = [sheet.row_values(row_number) for row_number in range(sheet.nrows)]
labels = [label for label in row_list[0]]
existing = 0
for row_number, row in enumerate(row_list[1:]):
if row[0] != '':
try:
object = Conference.objects.language('ru').get(id=int(row[0]))
existing += 1
except ValueError:
object = Conference()
object.translate('ru')
except Conference.DoesNotExist:
object = Conference(id= int(row[0]))
object.translate('ru')
existing += 1
else:
# if id blank - its a new place
object = Conference()
object.translate('ru')
methods = []
for col_number, cell in enumerate(row):
label = labels[col_number]
setting = event_sett.get(label)
if setting is None:
continue
if setting.get('method'):
if cell != "":
methods.append({'func': setting['func'], 'value': cell, 'purpose': setting.get('purpose')})
continue
field_name = setting['field']
func = setting.get('func')
if func is not None:
extra_value = setting.get('extra_values')
if extra_value is not None:
# if setting has extra value then
# it is some field like city, theme, tag
# that has relation and can be created
# in function we add language(need for relation fields)
# and extra value from object (like for city need country)
value = func(cell, 'ru', getattr(object, extra_value))
elif setting.get('bitfield'):
value = func(object, cell, setting['label'])
else:
value = func(cell)
setattr(object, field_name, value)
try:
object.save()
except IntegrityError:
print('error %s'% str(object))
continue
print('post save %s'% str(object))
for method in methods:
func = method['func']
if method.get('purpose'):
try:
func(object, method['value'], method['purpose'])
except:
continue
else:
func(object, method['value'])

@ -0,0 +1,218 @@
# -*- coding: utf-8 -*-
import os
import MySQLdb
from MySQLdb.cursors import DictCursor
from django.core.management.base import BaseCommand
from django.conf import settings
from conference.models import Conference
from django.core.files import File
from functions.translate import fill_with_signal
from country.models import Country
from city.models import City
class Command(BaseCommand):
def handle(self, *args, **options):
db = MySQLdb.connect(host="localhost",
user="expomap",
passwd="7FbLtAGjse",
db="old_db",
charset='utf8',
cursorclass=DictCursor)
cursor = db.cursor()
sql = """
SELECT products.products_id as id, products_date_added as created, products_last_modified as modified,
discount, expohit, ufi, products_name as name, products_description as description,
products_short_description as main_title, products_viewed as viewed, products_period as period,
products_org as organiser,products_products as products, products_official as web_page,
products_img1 as logo, products_startdate as data_begin, products_enddate as data_end,
url as old_url, places_id
FROM `products`
LEFT JOIN `products_description` ON products.products_id=products_description.products_id
WHERE `products_status` =1
AND `conference` =1 AND places_id >0
"""
cursor.execute(sql)
result = cursor.fetchall()
names = [item['name'] for item in result]
media = settings.MEDIA_ROOT.replace('media/', '')
for i, item in enumerate(result):
name = item['name']
print('number: %d, name: %s'%(i, name.encode('utf8')))
if Conference.objects.filter(translations__name=name).exists():
continue
data_begin = item['data_begin']
data_end= item['data_end']
place_id = item['places_id'] # convert to country and city
country, city = get_places(place_id)
#if isinstance(city, unicode):
#print(city.encode('utf8'))
# value = bad_cities.get(city)
# if value:
# bad_cities[city] = value + 1
# else:
# bad_cities[city] = 1
# counter += 1
# continue
if not country or not city:
continue
old_url = item['old_url']
periodic = item['period']
periodic = get_periodic(periodic)
web_page = item['web_page']
currency = 'USD'
expohit = item['expohit']
ufi = item['ufi']
if ufi:
ufi = 1
else:
ufi = 0
created = item['created']
modified = item['modified']
data = {'name_ru': name, 'main_title_ru': item['main_title'], 'description_ru': item['description'],
'main_themes_ru': item['products'], 'time_ru': '', 'discount_description_ru': '', 'title_ru': '',
'descriptions_ru': '', 'keywords_ru': ''}
conference = Conference(data_begin=data_begin, data_end=data_end, city=city, country=country,
web_page=web_page, old_url=old_url, periodic=periodic, currency=currency,
expohit=expohit, created=created, modified=modified)
try:
fill_with_signal(Conference, conference, data)
except:
continue
print('conference: %s'%str(conference))
#print(len(bad_cities.keys()))
#print(len(result))
#print(Conference.objects.filter().count())
#print(Conference.objects.exclude(translations__name__in=names).count())
def get_periodic(value):
PERIODIC = {u'Ежегодно': 1.0, u'Раз в 2 года': 0.5, u'2 раза в год': 2.0, u'4 раза в год': 4.0,
u'3 раза в год': 3.0, u'Раз в 3 года': 0.33, u'Раз в 4 года': 0.25, u'5 раз в год': 5.0,
u'Раз в два года': 0.5, u'Три раза в год': 3.0}
return PERIODIC.get(value, 0)
def get_logo(value):
if not value:
return None
if value.startswith('..'):
value = value.replace('..', 'media')
elif value.startswith('/'):
value = 'media'+value
return value
def get_places(place_id):
db = MySQLdb.connect(host="localhost",
user="expomap",
passwd="7FbLtAGjse",
db="old_db",
charset='utf8',
cursorclass=DictCursor)
cursor = db.cursor()
sql_city = """
SELECT title as city_name, url as city_old_url, inflect as city_inflect, parent_id as country_id
FROM `products_places`
WHERE `places_id` =%s
"""%place_id
cursor.execute(sql_city)
result = cursor.fetchone()
city_name, city_old_url, city_inflect = result['city_name'], result['city_old_url'], result['city_inflect']
country_id = result['country_id']
if city_name:
city_name = city_name.strip()
if city_name==u'Гонконг':
country = Country.objects.get(id=76)
city = City.objects.get(url='hong-kong')
return (country, city)
sql_country = """
SELECT title as country_name, url as country_old_url, inflect as country_inflect
FROM `products_places`
WHERE `places_id` =%s
"""%country_id
cursor.execute(sql_country)
result = cursor.fetchone()
country_name, country_old_url, country_inflect = result['country_name'], result['country_old_url'], result['country_inflect']
country_name = filter_country(country_name)
try:
country = Country.objects.get(translations__name=country_name)
except Country.DoesNotExist:
country = None
except Country.MultipleObjectsReturned:
country = Country.objects.filter(translations__name=country_name)[0]
city_name = filter_city(city_name)
try:
city = City.objects.get(translations__name=city_name, country=country)
except City.DoesNotExist:
#city = city_name
city = None
#print(city_name.encode('utf8'))
except City.MultipleObjectsReturned:
city = City.objects.filter(translations__name=city_name, country=country)[0]
#print('----------------')
#print(city_name.encode('utf8'))
#print('----------------')
return (country, city)
def filter_country(name):
if name == u'ЮАР':
name = u'Южно-Африканская Республика'
elif name == u'Танзания':
name = u'Объединенная Республика Танзания'
elif name == u'Гавайи':
name = u'США'
elif name == u'Бирма':
name = u'Мьянма'
elif name == u'Босния и Герцоговина':
name = u'Босния и Герцеговина'
return name
def filter_city(name):
cities = {u'Дели': u'Нью-Дели', u'Дэли': u'Нью-Дели', u'Пуна': u'Пуне', u'Лонг-Бич': u'Лонг Бич',
u'Калифорния': u'Лос-Анджелес', u'Санта-Клара': u'Санта Клара', u'Скотсдейл': u'Скоттсдейл',
u'Пенанг': u'Пинанг', u'Лейк Буэна Виста': u'Лейк-Буэна-Виста', u'Лиллестрём': u'Лиллештром',
u'Хертогенбош': u'Ден Бош', u'Марбелла': u'Марбелья', u'Лилль': u'Лилль', u'Ла Рош-сюр-Форон': u'Ла-Рош-сюр-Форон',
u'Эль-Кувейт': u'Кувейт', u'Харрогит': u'Харрогейт', u'Иокогама': u'Йокогама', u'Палм Бич': u'Палм-Бич',
u'Фрайбург': u'Фрейбург в Брейсгау', u'Колмар': u'Кольмар', u'Мускат': u'Маскат', u'Бад Зальцуфлен': u'Бад-Зальцуфлен'}
new_name = cities.get(name)
if new_name:
return new_name
else:
return name
"""
# convert logo
logo = item['logo']
logo = get_logo(logo)
if logo and logo.startswith('media/images'):
file = media + logo
if os.path.isfile(file):
f = open('mytest.pdf')
else:
logo = None
"""

@ -0,0 +1 @@
__author__ = 'root'

@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
import xlrd
from theme.models import Tag, Theme
from city.models import City
CITIES = settings.MEDIA_ROOT+'/import/cities_inflect.xls'
TAGS = settings.MEDIA_ROOT+'/import/tags_inflect.xls'
class Command(BaseCommand):
def handle(self, *args, **options):
f = open(TAGS, 'r')
book = xlrd.open_workbook(file_contents=f.read())
sheet = book.sheet_by_index(0)
row_list = [sheet.row_values(row_number) for row_number in range(sheet.nrows)]
print(row_list[2][0])
for row_number, row in enumerate(row_list[2:]):
url = row[1]
print(url)
inflect = row[3]
if inflect:
Tag.objects.filter(url=url).update(inflect=inflect)
#City.objects.filter(url=url).update(inflect=row[4])
#try:
# city = City.objects.get(id=id)
#except City.DoesNotExist:
# print()

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from django.test.client import RequestFactory
from django.utils import translation
from django.conf import settings
from exposition.views import ExpositionByCity
class Command(BaseCommand):
def handle(self, *args, **options):
langs = [code for code, name in settings.LANGUAGES]
for lang in langs:
translation.activate(lang)
request = RequestFactory().get('/expo/city/')
view = ExpositionByCity.as_view()
response = view(request)
print(lang)
print('success')

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,59 @@
{% extends 'admin_list.html' %}
{% load static %}
{% block body %}
<div class="box span8">
<div class="box-header well">
<h2><i class="icon-arrow-down"></i>Фильтры</h2>
</div>
<div class="box-content">
<form>
{{ form }}
<button type="submit" class="btn">Найти</button>
</form>
</div>
</div>
<div class="box span8">
<div class="box-header well">
<h2><i class="icon-arrow-down"></i>Список мета настроек</h2>
</div>
<div class="box-content">
<table class="table table-hover">
<thead>
<tr>
<th>id</th>
<th>Страница</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for item in object_list %}
<tr>
<td>{{ item.id }}</td>
<td>{{ item.name }}</td>
<td class="center sorting_1">
<a class="btn-small btn-info" href="/admin/meta/{{ item.id }}">
Изменить
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<a class="btn btn-success" href="/admin/meta/"><i class="icon-plus-sign icon-white"></i> Добавить настройку</a>
</div>
{# pagination #}
{% include 'admin/includes/admin_pagination.html' with page_obj=object_list %}
</div>
{% endblock %}

@ -0,0 +1,60 @@
{% extends 'base.html' %}
{% load static %}
{# Displays article form #}
{% block scripts %}
<script src="{% static 'ckeditor/ckeditor/ckeditor.js' %}"></script>
{# selects #}
<link href="{% static 'js/select/select2.css' %}" rel="stylesheet"/>
<script src="{% static 'js/select/select2.js' %}"></script>
<script src="{% static 'custom_js/make_select.js' %}"></script>
{# ajax #}
<script src="{% static 'custom_js/file_post_ajax.js' %}"></script>
<script src="{% static 'custom_js/select_tag.js' %}"></script>
{% endblock %}
{% block body %}
<form method="post" class="form-horizontal" name="form2" id="form2"enctype="multipart/form-data"> {% csrf_token %}
<fieldset>
<legend><i class="icon-edit"></i>{% if article %} Изменить {% else %} Добавить {% endif %}настройку{% if article %}(<a href="{{ article.get_permanent_url }}" target="_blank">на сайте</a>){% endif %}</legend>
<div class="box span8">
<div class="box-header well">
<h2><i class="icon-pencil"></i> </h2>
</div>
<div class="box-content">
{# name #}
<div class="control-group {% if form.name.errors %}error{% endif %}">
<label class="control-label"><b>{{ form.name.label }}:</b></label>
<div class="controls">
{{ form.name }}
<span class="help-inline">{{ form.name.errors }}</span>
</div>
</div>
{# title #}
{% include 'admin/forms/multilang.html' with field='title' form=form languages=languages %}
{# description #}
{% include 'admin/forms/multilang.html' with field='description' form=form languages=languages %}
{# keywords #}
{% include 'admin/forms/multilang.html' with field='keywords' form=form languages=languages %}
{# title #}
{% include 'admin/forms/multilang.html' with field='h1' form=form languages=languages %}
</div>
</div>
<div class="controls">
<input class="btn btn-large btn-primary" type="submit" value="{% if article %}Изменить{% else %}Добавить{% endif %}">
<input class="btn btn-large" type="reset" value="Отмена">
</div>
</fieldset>
</form>
{% endblock %}

@ -0,0 +1,40 @@
{% extends 'base_catalog.html' %}
{% load template_filters %}
{% load i18n %}
{% block bread_scrumbs %}
<div class="bread-crumbs">
<a href="/">{% trans 'Главная страница' %}</a>
<a href="{{ catalog_url }}">{% trans 'Конференции' %}</a>
{% if month %}
<a href="{{ catalog_url }}{{ filter_object.url }}/">{{ filter_object.name }}</a>
<a href="{{ year.link }}">{{ year.text }}</a>
<strong>{{ month.text }}</strong>
{% else %}
{% if year %}
<a href="{{ catalog_url }}{{ filter_object.url }}/">{{ filter_object.name }}</a>
<strong>{{ year.text }}</strong>
{% else %}
<strong>{{ filter_object.name }}</strong>
{% endif %}
{% endif %}
</div>
{% endblock %}
{% block page_title %}
<div class="page-title">
<h1>{% if meta %}{{ meta.h1 }}{% else %}{% trans 'Конференции' %}: <strong>{{ filter_object.name }}</strong>{% endif %}</h1>
</div>
{% include 'includes/exposition/catalog_filter_period.html' %}
{% endblock %}
{% block content_list %}
{% include 'includes/conference/conference_list.html' with object_list=object_list %}
{% endblock %}
{% block paginator %}
{% include 'includes/catalog_paginator.html' with page_obj=page_obj %}
{% endblock %}

@ -0,0 +1,65 @@
{% extends 'base_catalog.html' %}
{% load template_filters %}
{% load i18n %}
{% block bread_scrumbs %}
<div class="bread-crumbs">
<a href="/">{% trans 'Главная страница' %}</a>
<a href="{{ catalog_url }}">{% trans 'Конференции' %}</a>
{% if month %}
<a href="{{ catalog_url }}{{ filter_object.url }}/">{{ filter_object.name }}</a>
{% if country %}
<a href="{{ catalog_url }}{{ filter_object.url }}/country/{{ country.url }}">{{ country.name }}</a>
{% endif %}
{% if city %}
<a href="{{ catalog_url }}{{ filter_object.url }}/city/{{ city.url }}">{{ city.name }}</a>
{% endif %}
<a href="{{ year.link }}">{{ year.text }}</a>
<strong>{{ month.text }}</strong>
{% else %}
{% if year %}
<a href="{{ catalog_url }}{{ filter_object.url }}/">{{ filter_object.name }}</a>
{% if country %}
<a href="{{ catalog_url }}{{ filter_object.url }}/country/{{ country.url }}">{{ country.name }}</a>
{% endif %}
{% if city %}
<a href="{{ catalog_url }}{{ filter_object.url }}/city/{{ city.url }}">{{ city.name }}</a>
{% endif %}
<strong>{{ year.text }}</strong>
{% else %}
{% if country %}
<a href="{{ catalog_url }}{{ filter_object.url }}/">{{ filter_object.name }}</a>
<strong>{{ country.name }}</strong>
{% else %}
{% if city %}
<a href="{{ catalog_url }}{{ filter_object.url }}/">{{ filter_object.name }}</a>
<strong>{{ city.name }}</strong>
{% else %}
<strong>{{ filter_object.name }}</strong>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
</div>
{% endblock %}
{% block page_title %}
<div class="page-title">
<h1>{% if meta %}{{ meta.h1 }}{% else %}{% trans 'Конференции' %}: <strong>{{ filter_object.name }}</strong>{% endif %}</h1>
</div>
{% include 'includes/exposition/catalog_filter_period.html' %}
{% endblock %}
{% block content_list %}
{% include 'includes/conference/conference_list.html' with object_list=object_list %}
{% endblock %}
{% block paginator %}
{% include 'includes/catalog_paginator.html' with page_obj=page_obj %}
{% endblock %}

@ -0,0 +1,42 @@
{% extends 'base_catalog.html' %}
{% load static %}
{% load i18n %}
{% load template_filters %}
{% block style %}
<link rel="stylesheet" href="{% static 'client/css/pages/exposition_by.css' %}">
{% endblock %}
{% block bread_scrumbs %}
<div class="bread-crumbs">
<a href="/">{% trans 'Главная страница' %}</a>
<a href="/conference/">{% trans 'Конференции' %}</a>
<strong>{{ title1 }}</strong>
</div>
{% endblock %}
{% block page_title %}
<div class="page-title">
<h1>{{ title2 }}:</h1>
</div>
{% endblock %}
{% block content_list %}
{% for obj in object_list %}
{% set cur_word = obj.name %}
{% if cur_word|slice:":1"|lower != prev_word|slice:":1"|lower and forloop.counter != 1 %}
</ul>
{% endif %}
{% if cur_word|slice:":1"|lower != prev_word|slice:":1"|lower %}
<ul class="leter-list">
<div class="leter"><font size="5">{{ cur_word|slice:":1"|upper }}</font></div>
{% endif %}
<li>
<a href="/conference/{{ catalog }}{{ obj.url }}/">{{ obj.name }}&nbsp;({{ obj.conference_count }})</a>
</li>
{% set prev_word = obj.name %}
{% endfor %}
{% endblock %}

@ -0,0 +1,24 @@
{% extends 'base_catalog.html' %}
{% load i18n %}
{% block bread_scrumbs %}
<div class="bread-crumbs">
<a href="/">{% trans 'Главная страница' %}</a>
<a href="{{ object.catalog }}">{% trans 'Конференции' %}</a>
<a href="{{ object.catalog }}country/{{ object.country.url }}/">{{ object.country }}</a>
<a href="{{ object.catalog }}city/{{ object.city.url }}/">{{ object.city }}</a>
<strong>{{ object.name }}</strong>
</div>
{% endblock %}
{% block page_title %}
{% endblock %}
{% block content_list %}
{% include 'client/includes/conference/conference_object.html' with event=object %}
{% endblock %}
{% block paginator %}
{% endblock %}

@ -0,0 +1,42 @@
{% extends 'base_catalog.html' %}
{% load i18n %}
{% block bread_scrumbs %}
<div class="bread-crumbs">
<a href="/">{% trans 'Главная страница' %}</a>
{% if month %}
<a href="{{ catalog_url }}">{% trans 'Конференции' %}</a>
<a href="{{ year.link }}">{{ year.text }}</a>
<strong>{{ month.text }}</strong>
{% else %}
{% if year %}
<a href="{{ catalog_url }}">{% trans 'Конференции' %}</a>
<strong>{{ year.text }}</strong>
{% else %}
<strong>{% trans 'Конференции' %}</strong>
{% endif %}
{% endif %}
</div>
{% endblock %}
{% block page_title %}
<div class="page-title">
<h1>{% if meta %}{{ meta.h1 }}{% else %}{% trans 'Конференции' %}{% endif %}</h1>
</div>
{% include 'includes/exposition/catalog_filter_period.html' %}
{% endblock %}
{% block content_list %}
{% include 'includes/conference/conference_list.html' with object_list=object_list %}
{% endblock %}
{% block paginator %}
{% include 'includes/catalog_paginator.html' with page_obj=page_obj %}
{% endblock %}

@ -0,0 +1,25 @@
{% extends 'base_catalog.html' %}
{% load i18n %}
{% block bread_scrumbs %}
<div class="bread-crumbs">
<a href="/">{% trans 'Главная страница' %}</a>
<a href="{{ object.catalog }}">{% trans 'Конференции' %}</a>
<a href="{{ object.catalog }}country/{{ object.country.url }}/">{{ object.country }}</a>
<a href="{{ object.catalog }}city/{{ object.city.url }}/">{{ object.city }}</a>
<a href="{{ object.get_permanent_url }}">{{ object.name }}</a>
<strong>{% trans 'Участники' %}</strong>
</div>
{% endblock %}
{% block page_title %}
{% endblock %}
{% block content_list %}
{% include 'includes/exposition/members.html' with object_list=object_list %}
{% endblock %}
{% block paginator %}
{% include 'includes/catalog_paginator.html' with page_obj=page_obj %}
{% endblock %}

@ -0,0 +1,26 @@
{% extends 'base_catalog.html' %}
{% load i18n %}
{% block bread_scrumbs %}
<div class="bread-crumbs">
<a href="/">{% trans 'Главная страница' %}</a>
<a href="{{ object.catalog }}">{% trans 'Конференции' %}</a>
<a href="{{ object.catalog }}country/{{ object.country.url }}/">{{ object.country }}</a>
<a href="{{ object.catalog }}city/{{ object.city.url }}/">{{ object.city }}</a>
<a href="{{ object.get_permanent_url }}">{{ object.name }}</a>
<strong>{% trans 'Посетители' %}</strong>
</div>
{% endblock %}
{% block page_title %}
{% endblock %}
{% block content_list %}
{% include 'includes/exposition/visitors.html' with object_list=object_list %}
{% endblock %}
{% block paginator %}
{% include 'includes/catalog_paginator.html' with page_obj=page_obj %}
{% endblock %}

@ -0,0 +1,140 @@
{% load static %}
{% load i18n %}
{% load template_filters %}
<ul class="cat-list cl-exhibitions">
{% with objects=object_list %}
{% for obj in objects %}
<li class="cl-item {% if obj.canceled %}canceled{% endif %}">
<div class="cl-item-wrap clearfix">
<a href="{{ obj.get_permanent_url }}">
{% if obj.canceled %}
<div class="cancel"></div>
{% else %}
{% if obj.expohit %}
<div class="hit"></div>
{% endif %}
{% endif %}
<div class="cli-pict">
{% with obj=obj %}
{% include 'client/includes/show_logo.html' %}
{% endwith %}
</div>
</a>
<div class="cli-info">
<div class="cli-top clearfix">
{% if obj.quality_label.ufi.is_set %}
<div class="cli-approved">
<img src="{% static 'client/img/approved-logo.png' %}" alt="" title="Approved Event" />
</div>
{% endif %}
<header>
<div class="cli-title"><a href="{{ obj.get_permanent_url }}">{{ obj.name|safe }}</a></div>
</header>
<div class="cli-descr">
{{ obj.main_title|safe }}
</div>
</div>
<div class="cli-bot clearfix">
<div class="cli-date">
{% with obj=obj %}
{% include 'client/includes/show_date_block.html' %}
{% endwith %}
</div>
{% if obj.country %}
<div class="cli-place">
<a href="{{ obj.catalog }}country/{{ obj.country.url }}/">{{ obj.country }}</a>, <a href="{{ obj.catalog }}city/{{ obj.city.url }}/">{{ obj.city }}</a>
{% if obj.place %}
, <a href="/places/{{ obj.place.url }}/">{{ obj.place }}</a>
{% endif %}
</div>
{% endif %}
</div>
</div>
<div class="cli-buttons clearfix">
<div class="cli-m-buttons">
{% include 'client/includes/exposition/services.html' with obj=obj %}
{% include 'client/includes/calendar_button.html' with obj=obj%}
<div class="{% if request.user.is_authenticated%}note-wrap{% else %}note-wrap-disabled{% endif %}">
{% with note=obj|note_by_user:request.user %}
<a class="button green icon-note {% if note %}active{% endif %} note-button" href="/conference/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 %}
<div class="note-wrap">
<a class="button green " href="/admin/conference/{{ obj.url }}/">{% trans 'изменить' %}</a>
</div>
{% endif %}
<div></div>
</div>
<div class="cli-s-buttons">
{% include 'client/buttons/booking_button.html' with object=obj %}
</div>
</div>
</div>
<footer class="clearfix">
<div class="cli-stats">
{% if obj.visitors %}
<span class="visitors" title="Посетители">{{ obj.visitors }}</span>
{% endif %}
{% if obj.members %}
<span class="participants" title="Участники">{{ obj.members }}</span>
{% endif %}
</div>
<div class="cli-tags">
{% include 'client/includes/exposition/tags.html' with obj=obj %}
</div>
</footer>
</li>
{% if forloop.counter == 8 %}
<!-- Яндекс.Директ -->
<script type="text/javascript">
yandex_partner_id = 58151;
yandex_site_bg_color = 'FFFFFF';
yandex_ad_format = 'direct';
yandex_font_size = 1;
yandex_direct_type = 'horizontal';
yandex_direct_border_type = 'block';
yandex_direct_limit = 3;
yandex_direct_title_font_size = 3;
yandex_direct_border_radius = true;
yandex_direct_links_underline = false;
yandex_direct_header_bg_color = 'FEEAC7';
yandex_direct_bg_color = 'FFF9F0';
yandex_direct_border_color = 'FBE5C0';
yandex_direct_title_color = '666666';
yandex_direct_url_color = '000000';
yandex_direct_text_color = '000000';
yandex_direct_hover_color = 'FF3333';
yandex_direct_sitelinks_color = '666666';
yandex_direct_favicon = false;
yandex_no_sitelinks = false;
document.write('<scr'+'ipt type="text/javascript" src="//an.yandex.ru/system/context.js"></scr'+'ipt>');
</script>
{%endif %}
{% endfor %}
{% endwith %}
</ul>
{% block scripts %}
{% if request.GET.debug == '1' %}
<script src="{% static 'client/js/_modules/block.exposition.list.js' %}"></script>
{% else %}
<script src="{% static 'client/js_min/_modules/block.exposition.list.min.js' %}"></script>
{% endif %}
<script>
EXPO.exposition.list.init({
note:{
wrapClass:'note-wrap',
wrapDisabledClass:'note-wrap-disabled',
buttonClass:'note-button',
inputClass:'note-text'
},
addCalendarText:"{% trans 'В расписание' %}",
removeCalendarText:"{% trans 'Из расписания' %}"
});
</script>
{% endblock %}

@ -0,0 +1,350 @@
{% load static %}
{% load i18n %}
{% load thumbnail %}
{% load template_filters %}
{% block page_body %}
<div class="m-article event-page">
<div class="item-wrap event clearfix">
<aside>
{% if event.expohit %}
<div class="hit"></div>
{% endif %}
<div class="i-pict">
{% with obj=event %}
{% include 'client/includes/show_logo.html' %}
{% endwith %}
</div>
<div class="i-stats">
{% if event.visitors %}
<span class="visitors" title="Посетители">{{ event.visitors }}</span>
{% endif %}
{% if event.members %}
<span class="participants" title="Участники">{{ event.members }}</span>
{% endif %}
</div>
<div class="i-discount">
{% if event.discount %}
<a class="discount-button" href="#">{% trans 'Скидка' %} -{{ event.discount }}%</a>
<div class="dsc-text">{{ event.discount_description|safe|linebreaks }}</div>
{% endif %}
</div>
</aside>
<div class="i-info">
<header>
<div class="i-title">
{% if event.main_title %}
{{ event.main_title|safe }} {{ event.name|safe }}
{% else %}
{{ event.name|safe }}
{% endif %}
</div>
</header>
<div class="i-date">
{% with obj=event %}
{% include 'client/includes/show_date_block.html' %}
{% endwith %}
</div>
{% if event.place %}
<div class="i-address">
<header>
<div class="address">
{{ event.place.adress }}
</div>
<div class="show-map"><a class="toggle-map" href="#">{% trans 'Раскрыть карту' %}</a></div>
</header>
<div class="i-map">
<div class="close-map"><a class="toggle-map" href="#">{% trans 'Скрыть карту' %}</a>
</div>
<div class="map-canvas" id="map-canvas" data-coords="{{ event.place.address.lat|stringformat:'f' }},{{ event.place.address.lng|stringformat:'f' }}" ></div>
</div>
</div>
{% endif %}
<hr />
<div class="i-buttons clearfix">
<div class="ib-main">
{% with event=event 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/conference/{{ object.url }}/">{% 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=event.theme.all %}
{% for theme in themes %}
<li><a href="{{ object.catalog }}theme/{{ theme.url }}/">{{ theme.name }} ({{ theme.conferences_number }})</a></li>
{% endfor %}
{% endwith %}
</ul>
</div>
<div class="i-tags">
{% with tags=event.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>
{% include 'client/includes/conference/conference_services.html' with event=event %}
{% include 'includes/event_steps.html' with event=event %}
{% if event.get_photos %}
{% with photos=event.get_photos|slice:"5" %}
<hr />
<div class="i-photo-slides">
<div class="sect-title"><a href="#">{% trans 'Фотографии с прошлой конференции' %}</a></div>
<div id="ps-photo-gallery" class="ps-photo-gallery swiper-container">
<ul class="swiper-wrapper">
{% for photo in photos %}
<li class="swiper-slide">
<img src="{{ photo.get_display_url }}" alt="" />
</li>
{% endfor %}
</ul>
<div class="re-controls">
<a class="prev" href="#">&lt;</a>
<a class="next" href="#">&gt;</a>
</div>
</div>
</div>
{% endwith %}
{% endif %}
{% if event.description %}
<div class="i-event-description">
<div class="ied-title">{% if event.event_type == 'expo' %}{% trans 'О выставке' %}{% else %}{% trans 'О конференции' %}{% endif %} {{ event.name|safe }}</div>
<div class="ied-text">{{ event.description|safe|linebreaks }}</div>
</div>
<hr />
{% endif %}
<div class="i-event-additional clearfix">
<div class="sect-title">{% trans 'Дополнительная информация' %}</div>
<ul class="e-docs">
{% if event.business_program.exists %}
<li><a href="{{ event.get_permanent_url }}program/">{% trans 'Деловая программа' %}</a></li>
{% endif %}
</ul>
<dl class="add-info">
{% if event.organiser.all|length > 0 %}
<dt>{% trans 'Организатор' %}:</dt>
<dd>
{% with organisers=event.organiser.all %}
{% for organiser in organisers %}
{{ organiser.name }}<br />
{% endfor %}
{% endwith %}
</dd>
{% endif %}
{% if event.web_page %}
<dt>{% trans 'Веб-сайт' %}:</dt>
<dd>
<a target="_blank" href="#" data-type="href" data-hash="1qwer" data-url="{{ event.web_page|base64_encode }}" class="link-encode">{{ event.web_page }}</a>
</dd>
{% endif %}
{% if event.get_audience %}
<dt>{% trans 'Аудитория' %}:</dt>
<dd>
{{ event.get_audience }}
</dd>
{% endif %}
{% if event.get_periodic %}
<dt>{% trans 'Периодичность' %}:</dt>
<dd>{{ event.get_periodic }}</dd>
{% endif %}
{% if event.time %}
<dt>{% trans 'Время работы' %}:</dt>
<dd>{{ event.time|safe }}</dd>
{% endif %}
</dl>
</div>
<hr />
<div class="i-members clearfix">
<div class="im-participants">
{% with companies=event.company.all|slice:":6" %}
{% if companies %}
{# есть участники #}
<header>
<div class="im-title">{% trans 'Спикеры' %}</div>
<a class="more" href="{{ event.get_permanent_url }}members/">{% trans 'Все спикеры' %}</a>
</header>
<ul>
{% for company in companies %}
<li>
<a href="{{ company.get_permanent_url }}">
<span class="imp-pict">
{% with obj=company %}
{% include 'includes/show_logo.html' %}
{% endwith %}
</span>
{{ company.name }}
</a>
</li>
{% endfor %}
</ul>
{% else %}
{# нет участников #}
<header>
<div class="im-title">{% trans 'Спикеры' %}</div>
<p>{% trans 'Разместите информацию о ключевых спикерах' %}</p>
<p><a href="#pw-advertise" class="button icon-up pw-open" >{% trans 'Рекламировать спикера' %}</a></p>
</header>
{% endif %}
{% endwith %}
</div>
<div class="im-visitors">
{% with visitors=event.users.all|slice:":17" %}
<header>
<div class="im-title">{% trans 'Посетители' %}</div>
</header>
<ul id="visitors-list">
{% if visitors %}
{# есть посетители #}
{% for user in visitors %}
{% if user == request.user %}
<li class="current"><a href="{{ user.get_permanent_url }}">{{ user.get_full_name }}&nbsp;{% if user.company %}({{ user.company.name }}){% endif %}</a></li>
{% else %}
<li><a href="{{ user.get_permanent_url }}">{{ user.get_full_name }}&nbsp;{% if user.company %}({{ user.company.name }}){% endif %}</a></li>
{% endif %}
{% endfor %}
{% endif %}
</ul>
<a id="somebody" class=" more mb-1em {% if visitors|length > 0 %}{%else%}hidden{% endif %}" href="{{ event.get_permanent_url }}visitors/">{% trans 'Все посетители' %}</a>
{% endwith %}
<p id="nobody" class=" mb-1em {% if event.users.all|length > 0 %}hidden{% else %}{% endif %}">{% trans 'Пока никто не отметился на событии.' %}</p>
{% with event=event user=user %}
{% include 'client/includes/visit_button.html' %}
{% endwith %}
</div>
</div>
<hr/>
{% if event.members or event.visitors or event.foundation_year %}
<div class="e-num-info">
<div class="eni-stats">
{% if event.members %}
<div class="enis-item"><b>{{ event.members }}</b> {% trans 'участников' %}</div>
{% endif %}
{% if event.visitors %}
<div class="enis-item"><b>{{ event.visitors }}</b> {% trans 'посетителей' %}</div>
{% endif %}
{% if event.foundation_year %}
<div class="eni-founded">{% trans 'Основано в' %} <b>{{ event.foundation_year }}</b> {% trans 'году' %}</div>
{% endif %}
</div>
</div>
{% endif %}
</div>
{% include 'client/includes/booking_block.html' with city=event.city place=event.place %}
<hr />
{% if event.get_nearest_events|slice:":6" %}
<div class="e-cat">
<div class="sect-title">{% trans 'Ближайшие выставки по тематике' %} <a href="{{ expo_catalog }}theme/{{ event.theme.all.0.url }}">«{{ event.theme.all.0 }}»</a></div>
<ul class="cat-list cl-exhibitions">
{% for exp in event.get_nearest_events %}
<li class="cl-item">
<div class="cl-item-wrap clearfix">
<a href="{{ exp.get_permanent_url }}">
<div class="cli-pict">
{% with obj=exp %}
{% include 'client/includes/show_logo.html' %}
{% endwith %}
</div>
</a>
<div class="cli-info">
<div class="cli-top clearfix">
{% if exp.approved %}
<div class="cli-approved">
<img src="{% static 'client/img/approved-logo.png' %}" alt="" title="Approved Event" />
</div>
{% endif %}
<header>
<div class="cli-title"><a href="{{ exp.get_permanent_url }}">{{ exp.name|safe }}</a></div>
</header>
<div class="cli-descr">
{{ exp.main_title|safe|linebreaks }}
</div>
<div class="cli-bot clearfix">
<div class="cli-date">
{% with obj=exp %}
{% include 'client/includes/show_date_block.html' %}
{% endwith %}
</div>
<div class="cli-place">
<a href="{{ exp.country.get_permanent_url }}">{{ exp.country }}</a>, <a href="{{ exp.city.get_permanent_url }}">{{ exp.city }}</a>
{% if exp.place %}
, <a href="{{ exp.place.get_permanent_url }}">{{ exp.place }}</a>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
<div class="e-cat look-also">
<div class="sect-title">{% trans 'Смотрите также:' %}</div>
<a href="{{ event.catalog }}city/{{ event.city.url }}/">{% trans "Конференции" %} {% if request.LANGUAGE_CODE == 'ru' and event.city.inflect %}{{ event.city.inflect }}{% else %}{% trans 'in' %} {{ event.city.name }}{% endif %}</a>
<a href="{{ event.catalog }}country/{{ event.country.url }}/">{% trans "Конференции" %} {% if request.LANGUAGE_CODE == 'ru' and event.country.inflect %}{{ event.country.inflect }}{% else %}{% trans 'in' %} {{ event.country.name }}{% endif %}</a>
<a href="{{ event.catalog }}theme/{{ event.theme.all.0.url }}/country/{{ event.country.url }}/">{% trans "Конференции по тематике " %}&laquo;{{ event.theme.all.0.name|lower }}&raquo; {% if request.LANGUAGE_CODE == 'ru' and event.country.inflect %}{{ event.country.inflect }}{% else %}{% trans 'in' %} {{ event.country.name }}{% endif %}</a>
<a href="{{ event.catalog }}theme/{{ event.theme.all.0.url }}/city/{{ event.city.url }}/">{% trans "Конференции по тематике " %}&laquo;{{ event.theme.all.0.name|lower }}&raquo; {% if request.LANGUAGE_CODE == 'ru' and event.city.inflect %}{{ event.city.inflect }}{% else %}{% trans 'in' %} {{ event.city.name }}{% endif %}</a>
</div>
{% endblock %}
{% block content_text %}
{% endblock %}
{% block popup %}
{% include 'client/popups/advertise_member.html' with form=advertising_form %}
{% 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"
},
addCalendarText:"{% trans 'В расписание' %}",
removeCalendarText:"{% trans 'Из расписания' %}"
});
</script>
{% endblock %}

@ -0,0 +1,14 @@
{% load i18n %}
<div class="i-sub-articles">
<ul>
<li>
<a href="{{ event.get_permanent_url }}service/translator/">{% trans 'Устный переводчик' %}</a>
</li>
{% if event.country_id not in sng_countries %}
<li>
<a href="{{ event.get_permanent_url }}service/visit/">{% trans 'Бизнес-тур "под ключ"' %}</a>
</li>
{% endif %}
</ul>
</div>

@ -0,0 +1,21 @@
{% load i18n %}
{% load static %}
<div class="mp-reviews">
<header>
<div class="mpr-title"><a href="/blogs/">{% trans 'Обзоры и аналитика' %}</a></div>
<div class="more-link"><a class="more" href="/blogs/">{% trans 'Все обзоры' %}</a></div>
</header>
<ul>
{% for blog in blogs %}
<li>
<a href="{{ blog.get_permanent_url }}">
<span class="mpr-pict">
{% include 'client/includes/article/article_on_main_preview.html' with obj=blog %}
</span>
<span class="mpr-text">{{ blog.main_title }}</span>
</a>
</li>
{% endfor %}
</ul>
</div>

@ -0,0 +1,9 @@
{% load i18n %}
<header>{% trans 'конференции' %}</header>
<ul>
{% for theme in themes %}
<li><a href="/conference/theme/{{ theme.url }}/"><span>{{ theme.name }}</span>&nbsp;<i>({{ theme.conferences_number }})</i></a></li>
{% endfor %}
</ul>
<footer><a class="more" href="/conference/theme/">{% trans 'Все тематики' %}</a></footer>

@ -0,0 +1,9 @@
{% load i18n %}
<header>{% trans 'Выставки' %}</header>
<ul>
{% for theme in themes %}
<li><a href="/expo/theme/{{ theme.url }}/"><span>{{ theme.name }}</span>&nbsp;<i>({{ theme.expositions_number }})</i></a></li>
{% endfor %}
</ul>
<footer><a class="more" href="/expo/theme/">{% trans 'Все тематики' %}</a></footer>

@ -0,0 +1,38 @@
{% load i18n %}
{% load template_filters %}
{% get_current_language as LANGUAGE_CODE %}
{% load pytils_dt %}
{% if obj.data_begin|timesince_exp:obj.data_end %}
{{ obj.data_begin|date:"F" }}
{% else %}
{% if obj.data_begin|timesince:obj.data_end < "1 day" %}
{% ifequal LANGUAGE_CODE 'ru' %}
{{ obj.data_begin|ru_strftime:"%d %B %Y" }}
{% else %}
{{ obj.data_begin }}
{% endifequal %}
{% else %}
{% if obj.data_end %}
{% trans 'с' %}
{% ifnotequal obj.data_begin|date:"F" obj.data_end|date:"F" %}
{% ifequal LANGUAGE_CODE 'ru' %}
{{ obj.data_begin|ru_strftime:"%d %B" }}
{% else %}
{{ obj.data_begin|date:"F j" }}
{% endifequal %}
{% else %}
{{ obj.data_begin|date:"j" }}{% endifnotequal %} {% trans 'по' %} {{ obj.data_end|date:"j E Y" }} {% trans 'года' %}
{% else %}
{{ obj.data_begin }}
{% endif %}
{% endif %}
{% endif %}

@ -0,0 +1,64 @@
{% load thumbnail %}
{% load i18n %}
{% load template_filters %}
<div class="mcl">
<div id="mp-recent-expo" class="recent-expo swiper-container">
<ul class="swiper-wrapper">
{% for event in events %}
<li class="swiper-slide">
<div class="re-pict pict-over" >
{% if event.logo %}
<a href="{{ event.get_permanent_url }}">
<!--<img src="{{ event.logo.url }}">-->
{% thumbnail event.get_preview "220x220" as im %}
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}">
{% endthumbnail %}
</a>
{% endif %}
</div>
<div class="re-body">
<div class="re-info">
<a href="{{ event.get_permanent_url }}">
<div class="re-title">{{ event.name|safe }}</div>
<div class="re-date">
{% include 'client/includes/index/main_date_block.html' with obj=event %}
</div>
<div class="re-descr" title="{{ event.main_title|safe }}">{{ event.main_title|safe }}</div>
</a>
</div>
<footer>
<div class="re-buttons">
<a class="button blue icon-calendar {% if event|in_calendar:request.user %}removecalendar {% else %}addcalendar {% endif %}" href="{{ event.get_calendar_url }}">{% if event|in_calendar:request.user %}{% trans 'Убрать из календаря' %}{% else %}{% trans 'добавить в календарь' %}{% endif %}</a>
<div class="main-page {% if request.user.is_authenticated%}note-wrap{% else %}note-wrap-disabled{% endif %}">
<a class="button green icon-note {% if note %}active{% endif %} note-button" href="/expo/add-note/{{ event.url }}/">{% trans 'заметка' %}</a>
<div class="note-overlay">
<form action="">
<textarea name="note_text" class="note-text"> {{ note }}</textarea>
</form>
</div>
</div>
</div>
<div class="re-tags">
{% with tags=event.tag.all %}
{% for tag in tags %}
<a href="{{ event.get_catalog_url }}tag/{{ tag.url }}">{{ tag }}</a>{% if forloop.counter < tags|length %},{% endif %}
{% endfor %}
{% endwith %}
</div>
</footer>
</div>
</li>
{% endfor %}
</ul>
<div class="re-controls">
<a class="prev" href="#">&lt;</a>
<a class="next" href="#">&gt;</a>
</div>
</div>
</div>

@ -0,0 +1,21 @@
{% load i18n %}
<header>
<a href="/news/">{% trans 'Новости событий' %}</a>
</header>
<ul>
{% for news in news_list %}
<li>
<a href="{{ news.get_permanent_url }}">
<span class="nl-pict">
{% include 'client/includes/article/news_on_main_logo.html' with obj=news %}
</span>
<span class="nl-body">
<span class="nl-text">{{ news.main_title }}</span>
<span class="nl-date">{{ news.created|date:"d E Y" }}</span>
</span>
</a>
</li>
{% endfor %}
</ul>
<footer><a class="more" href="/news/">{% trans 'Все новости' %}</a></footer>

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save