diff --git a/city/management/__init__.py b/city/management/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/city/management/commands/__init__.py b/city/management/commands/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/city/management/commands/city_lost_create.py b/city/management/commands/city_lost_create.py new file mode 100644 index 00000000..033de6f3 --- /dev/null +++ b/city/management/commands/city_lost_create.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +from django.core.management.base import BaseCommand, CommandError +from city.models import City +from country.models import Country + +cities = [ + {'id':'-1563952', 'country':'11', 'url':'canberra-australia', 'ru':u'Канберра', 'en':'Canberra'}, +] +""" +cities = [ + {'id':'-1563952', 'country':'11', 'url':'canberra-australia', 'ru':u'Канберра', 'en':'Canberra'}, + {'id':'-1586844', 'country':'11', 'url':'melbourne-australia', 'ru':u'Мельбурн', 'en':'Melbourne'}, + {'id':'-1594675', 'country':'11', 'url':'perth-australia', 'ru':u'Перт', 'en':'Perth'}, + {'id':'-1555188', 'country':'11', 'url':'adelaide-australia', 'ru':u'Аделаида', 'en':'Adelaide'}, + {'id':'-1561728', 'country':'11', 'url':'brisbane-australia', 'ru':u'Брисбен', 'en':'Brisbane'}, + {'id':'-1569058', 'country':'11', 'url':'darwin-australia', 'ru':u'Дарвин', 'en':'Darwin'}, + + {'id':'-1989985', 'country':'10', 'url':'salzburg-austria', 'ru':u'Зальцбург', 'en':'Salzburg'}, + {'id':'-1981445', 'country':'10', 'url':'innsbruck-austria', 'ru':u'Инсбрук', 'en':'Innsbruck'}, + {'id':'-1982354', 'country':'10', 'url':'klagenfurt-austria', 'ru':u'Клагенфурте', 'en':'Klagenfurt'}, + + {'id':'-979186', 'country':'8', 'url':'buenos-aires-argentina', 'ru':u'Буэнос-Айрес', 'en':'Buenos Aires'}, + + {'id':'-1955925', 'country':'17', 'url':'charleroi-belgium', 'ru':u'Шарлеруа', 'en':'Charleroi'}, + {'id':'-1953257', 'country':'17', 'url':'antwerp-belgium', 'ru':u'Антверпен', 'en':'Antwerp'}, + {'id':'-1955538', 'country':'17', 'url':'brussels-belgium', 'ru':u'Брюссель', 'en':'Brussels'}, + {'id':'-1958757', 'country':'17', 'url':'ghent-belgium', 'ru':u'Гент', 'en':'Ghent'}, + {'id':'-1963947', 'country':'17', 'url':'leuven-belgium', 'ru':u'Левен', 'en':'Leuven'}, + {'id':'-1964016', 'country':'17', 'url':'liege-belgium', 'ru':u'Льеж', 'en':'Liège'}, + {'id':'-1965564', 'country':'17', 'url':'mons-belgium', 'ru':u'Монс', 'en':'Mons'}, + {'id':'-1956109', 'country':'17', 'url':'ciney-belgium', 'ru':u'Сине', 'en':'Ciney'}, + {'id':'-1959925', 'country':'17', 'url':'hasselt-belgium', 'ru':u'Хасселт', 'en':'Hasselt'}, + + {'id':'-629138', 'country':'27', 'url':'belo-horizonte-brazil', 'ru':u'Белу-Оризонти', 'en':'Belo Horizonte'}, + {'id':'-663509', 'country':'27', 'url':'porto-alegre-brazil', 'ru':u'Порту-Алегри', 'en':'Porto Alegre'}, + {'id':'-629039', 'country':'27', 'url':'Belem-brazil', 'ru':u'Белем', 'en':'Belém'}, + {'id':'-644901', 'country':'27', 'url':'goiania-brazil', 'ru':u'Гояния', 'en':'Goiânia'}, + {'id':'-653186', 'country':'27', 'url':'manaus-brazil', 'ru':u'Манаус', 'en':'Manaus'}, + {'id':'-657942', 'country':'27', 'url':'olinda-brazil', 'ru':u'Olinda', 'en':'Olinda'}, + {'id':'-657510', 'country':'27', 'url':'novo-hamburgo-brazil', 'ru':u'Novo Hamburgo', 'en':'Novo Hamburgo'}, + + {'id':'-2112243', 'country':'84', 'url':'surat-india', 'ru':u'Сурат', 'en':'Sūrat'}, + {'id':'-3102179', 'country':'85', 'url':'basrah-iraq', 'ru':u'Басра', 'en':'Basrah'}, + {'id':'-559845', 'country':'33', 'url':'abbotsford-canada', 'ru':u'Abbotsford', 'en':'Abbotsford'}, + {'id':'-561990', 'country':'33', 'url':'calgary-canada', 'ru':u'Калгари', 'en':'Calgary'}, + {'id':'-571851', 'country':'33', 'url':'quebec-canada', 'ru':u'Квебек', 'en':'Quebec'}, + {'id':'-569541', 'country':'33', 'url':'montreal-canada', 'ru':u'Монреаль', 'en':'Montreal'}, + {'id':'-570760', 'country':'33', 'url':'ottawa-canada', 'ru':u'Оттава', 'en':'Ottawa'}, + {'id':'-567785', 'country':'33', 'url':'laval-canada', 'ru':u'Лаваль', 'en':'Laval'}, + {'id':'-564968', 'country':'33', 'url':'fredericton-canada', 'ru':u'Фредериктон', 'en':'Fredericton'}, + {'id':'-564064', 'country':'33', 'url':'edmonton-canada', 'ru':u'Эдмонтон', 'en':'Edmonton'}, + {'id':'-569498', 'country':'33', 'url':'moncton-canada', 'ru':u'Монктон', 'en':'Moncton'}, + {'id':'-562447', 'country':'33', 'url':'charlottetown-canada', 'ru':u'Шарлоттаун', 'en':'Charlottetown'}, + + + {'id':'-2764584', 'country':'147', 'url':'karachi-pakistan', 'ru':u'Карачи', 'en':'Karachi'}, + {'id':'-2767043', 'country':'147', 'url':'lahore-pakistan', 'ru':u'Лахор', 'en':'Lahore'}, + + ] +""" + +class Command(BaseCommand): + def handle(self, *args, **options): + for city in cities: + #City.objects.get(id=city['id']).delete() + + country = Country.objects.get(id=city['country']) + c = City(id=city['id'], country=country, url=city['url']) + c.translate('ru') + c.name = city['ru'] + print('pre save %s'%str(c)) + c.save() + print('post save %s'%str(c)) + + + + + diff --git a/city/models.py b/city/models.py index 4026dfe0..9ca28779 100644 --- a/city/models.py +++ b/city/models.py @@ -12,7 +12,7 @@ from functions.signal_handlers import post_save_handler from functions.models_methods import ExpoManager #check if table exist and create flags if true -flags = [str(item.id) for item in Service.objects.all()] if db_table_exists('service_service') else [] +flags = [str(item.url) for item in Service.objects.all()] if db_table_exists('service_service') else [] class City(TranslatableModel): diff --git a/company/views.py b/company/views.py index 0adeac4c..7bdf6c53 100644 --- a/company/views.py +++ b/company/views.py @@ -9,7 +9,7 @@ from functions.search_forms import CompanySearchForm class CompanySearchView(ListView): - paginate_by = 2 + paginate_by = 10 template_name = 'company/search.html' search_form = CompanySearchForm model = Company @@ -40,6 +40,7 @@ class CompanySearchView(ListView): class CompanyView(ExpoListView): + paginate_by = 10 model = Company template_name = 'company_catalog.html' search_form = CompanySearchForm diff --git a/country/models.py b/country/models.py index fde98425..6f1de3f7 100644 --- a/country/models.py +++ b/country/models.py @@ -16,7 +16,7 @@ from functions.signal_handlers import post_save_handler, pre_save_handler from django.utils.translation import get_language as lang # check if table exist and create flags if true -flags = [str(item.id) for item in Service.objects.all()] if db_table_exists('service_service') else [] +flags = [str(item.url) for item in Service.objects.all()] if db_table_exists('service_service') else [] class CountryManager(TranslationManager): def all(self): diff --git a/import_xls/excel_settings.py b/import_xls/excel_settings.py index cbfd77f3..32a17fc1 100644 --- a/import_xls/excel_settings.py +++ b/import_xls/excel_settings.py @@ -31,7 +31,7 @@ def get_audience(value): return def get_theme(value): - objects = value.all() + objects = value.theme.all() return ','.join(str(obj.id) for obj in objects) @@ -103,7 +103,7 @@ field_settings = [ {'name': 'description', 'verbose_name': u'Описание', 'type': unicode}, {'name': 'country', 'verbose_name': u'Страна', 'type': unicode}, {'name': 'city', 'verbose_name': u'Город', 'type': unicode}, - {'name': 'theme', 'verbose_name': u'Тематика', 'type': get_theme, 'width':8000}, + # {'name': 'theme', 'verbose_name': u'Тематика', 'type': get_theme, 'width':8000}, {'name': 'tag', 'verbose_name': u'Теги', 'type': get_tag, 'width':8000}, {'name': 'address', 'verbose_name': u'Адрес', 'type': unicode}, #{'name': 'periodic', 'verbose_name': 'Периодичность', 'type': str}, @@ -113,7 +113,7 @@ field_settings = [ {'name': 'time', 'verbose_name': u'Время проведения', 'type': unicode}, {'name': 'products', 'verbose_name': u'Экспонируемые продукты', 'type': unicode}, {'name': 'foundation', 'verbose_name': u'Год основания', 'type': get_int}, - {'name': 'events_number', 'verbose_name': u'Год основания', 'type': get_int}, + #{'name': 'events_number', 'verbose_name': u'Год основания', 'type': get_int}, {'name': 'staff_number', 'verbose_name': u'Год основания', 'type': get_int}, {'name': 'specialization', 'verbose_name': u'Год основания', 'type': unicode}, {'name': 'foundation_year', 'verbose_name': u'Год основания', 'type': get_int}, @@ -162,20 +162,13 @@ def to_country(value): def to_city(value, lang, country): try: # get city by name - objects = get_translation_aware_manager(City) + #objects = get_translation_aware_manager(City) # except IndexError if no found - city = objects.filter(name=value)[0] + city = City.objects.filter(translations__name=value, country=country)[0] return city except IndexError: return None - # not found - # try to create new city - #city = City(country=country) - #city.translate(lang) - #city.name = value - #city.save() - return city from exposition.models import Exposition def to_audience(value, model=Exposition): @@ -350,13 +343,17 @@ def to_type(value): return 'Exposition complex' def to_phone(value): - deduct = ('-','(',')','.',' ', '+') - for elem in deduct: - value = value.replace(elem, '') + if value: + if isinstance(value, float) or isinstance(value, int): + return value + else: + deduct = ('-','(',')','.',' ', '+') + for elem in deduct: + value = value.replace(elem, '') - value = to_int(value) + value = to_int(value) - return value + return value @@ -370,7 +367,7 @@ def save_halls(obj, value): area = None number = None name = '' - l = hall.split(u'–') + l = hall.split(u'-') if len(l)>1: area = int(l[1].strip().replace(' ', '')) l = l[0].split(u'№') @@ -393,7 +390,7 @@ def save_halls(obj, value): place_exp_sett = { u'ID':{u'field': u'id', u'func': to_int}, - u'Название':{u'field': u'name', u'func': unicode}, + u'Название ВЦ':{u'field': u'name', u'func': unicode}, u'Тип':{u'field': u'type', u'func': to_type}, u'Краткое описание':{u'field': u'main_title', u'func': unicode}, u'Страна':{u'field': u'country', u'func': to_country}, @@ -414,7 +411,7 @@ place_exp_sett = { u'Закрытая выставочная площадь, кв. м.':{u'field': u'closed_area', u'func': to_int}, u'Открытая выставочная площадь, кв. м.':{u'field': u'open_area', u'func': to_int}, u'Количество павильонов':{u'field': u'total_pavilions', u'func': to_int}, - u'Площадь павильонов/залов (по номерам)':{u'field': u'halls', u'func': save_halls, u'method': True}, + u'Площадь павильона':{u'field': u'halls', u'func': save_halls, u'method': True}, u'Конференц-залы':{u'field': u'total_halls', u'func': to_int}, u'Схема территории':{u'field': u'scheme', u'func': save_file, u'method': True, u'purpose': 'scheme teritory'},#сделать u'Банк/Банкоматы/Обмен валюты':{u'field': u'bank', u'func': bool}, diff --git a/import_xls/import_forms.py b/import_xls/import_forms.py index 1d52a19b..d815573b 100644 --- a/import_xls/import_forms.py +++ b/import_xls/import_forms.py @@ -124,7 +124,7 @@ class ImportPlaceExpositionForm(ImportForm): 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)] - # all field names in excel file (must be in second row) + labels = [label for label in row_list[0]] for row_number, row in enumerate(row_list): @@ -295,6 +295,7 @@ class ImportTagForm(ImportForm): hacked problem with importing theme field in save_file method """ model = Tag + #@async def save_file(self): data = self.cleaned_data lang = data['language'] diff --git a/media/imgs/.10 b/media/imgs/.10 new file mode 100644 index 00000000..d99707e8 --- /dev/null +++ b/media/imgs/.10 @@ -0,0 +1,12 @@ + + + +
+ ![]() |
++ |
+
|
![]() |
+
+
|
+![]() |
+||||||||||||||||||||||||||||||
|
+ |
++ |
+
|
+
+
+
+
|
+
+
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+
|
+
+
|
+![]() |
+
+
|
+
+
|
+
+
|
+ ++ + |
+ ||||||||||||||||||||||||||||
| + |
+
|
+
![]() |
-- |
-
|
![]() |
-
-
|
-![]() |
-||||||||||||||||||||||||||||||
|
- |
-- |
-
|
-
-
-
-
|
-
-
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
|
-
-
|
-![]() |
-
-
|
-
-
|
-
-
|
- -- - |
- ||||||||||||||||||||||||||||
| - |
-
|
-
. ()
+ +, . ( , ) . . , . .
+ +. ()
+ +, ( , ) . .
+ +, . .
+. ()
+ +, . ( , ) . .
+ +, (-7). , ( : л)
+ +. ()
+ +, ( , ) . .
+ +, (-7). , ( : л)
+ +
. ()
+ +, . ( , ) . . , (-7). , , л.
+ +. ()
+ +, ( , ) . .
+ +, (-7). , , л
+. ()
+ +, . ( , ) .
+ +( ) ( ). , ( ) - . .
+ +. ()
+ +, ( , ) .
+ +( ) ( ). , ( ) - . .
+. ()
+ +, . ( , ) . .
+ +, ( , ).
+ +. ()
+ +, ( , ) . .
+ +, ( , ).
+. ()
+ +, . ( , ) .
+ +, . - .
+ +. ()
+ +, ( , ) .
+ +, . - .
+. ()
+ +, . ( , ) . .
+ +, ( ). - .
+ +. ()
+ +, ( , ) . .
+ +, ( ). - .
+
. ()
- -, . ( , ) . . , . .
- -. ()
- -, ( , ) . .
- -, . .
-. ()
- -, . ( , ) . .
- -, (-7). , ( : л)
- -. ()
- -, ( , ) . .
- -, (-7). , ( : л)
- -
. ()
- -, . ( , ) . . , (-7). , , л.
- -. ()
- -, ( , ) . .
- -, (-7). , , л
-. ()
- -, . ( , ) .
- -( ) ( ). , ( ) - . .
- -. ()
- -, ( , ) .
- -( ) ( ). , ( ) - . .
-. ()
- -, . ( , ) . .
- -, ( , ).
- -. ()
- -, ( , ) . .
- -, ( , ).
-. ()
- -, . ( , ) .
- -, . - .
- -. ()
- -, ( , ) .
- -, . - .
-. ()
- -, . ( , ) . .
- -, ( ). - .
- -. ()
- -, ( , ) . .
- -, ( ). - .
-| Quick map | +Google Map | +Custom maps | +
+ Quick map+This is a map of the area around the venues highlighting tube and rail stations and walking routes in green. Click the map to see additonal information. You can also download a print quality map with train and airport connections here. + |
+ + + + |
+
We know that you often need to print maps. There's a selection below. If you have any problems just let us know on 020 7385 1200.
+|
+
+ + + +
|
+ |
|
+ + This is a simple, close-up map of the area around Earls Court venues. + + + |
+ |
![]() |
+
+ This is a useful map for exhibitors, of the area around Earls Court. + + |
+
+

EXPO VENUE TECHNICAL DATA | |||
ITEM | EXPO HALL 1/F | ITEM | EXPO HALL 1/F |
Freight Entrance (Exhibits Entering Hall) | Four Rolling Doors (W*H): West: 3m*2.37m East:5.33m*4.32m Northwest:5.17m*4.42m Northeast:5.2m*4.7m | Exhibition Hall Area | 5250SQM |
Exhibits Transporting to Booth | Forklift, Hydraulic Cart (1.5ton), Handcart (1ton) and so on | Pillar Size | Various Sizes (Please See the Attached Pictures) |
Exhibition Hall Flooring | Anti-skid Flooring | Escalator | 4/Floor(Total 16/1-4F), 2 Up and 2 Down, 1.2m(W), 9000person/hr, 0.5m/s |
Floor Loading | 1500kg/SQM | Power Supply 380V 3 phases | 1460KW |
Ceiling Height/Minimum | 8m/6.5m | Fire Control | Auto-Shower System, Smoke-Alarming System, Fire Hydrant, Fire Extinguisher |
Compressed--Air | 7kg/cm2,total amount 3m3/min | Air-condition | 夏天25°C,冬天18°C |
Water Supply | 17 Outlets, DN20, 5.5kg | Fresh Air | 41000CBM/HR |
Drainage | 19 Offtakes,100mm Diameter | Internet | Cable Broadband Network、 Wireless Broadband Network |
Telephone | International and Domestic Available | Broadcasting | Information Desk, North Lobby, 1F |
Security | 24 Hours Safe-Security Service | Tea Service | 2 Places |
Emergency Lighting | Lobby and Exhibition Hall | Male/Female Toilet | 2 Places |
Business Center | North Lobby, 1F | | |
| + + + + + + + | +
+
+ |
+ + + Follow us + | +
+ WeChat
+
+ |
+ + + | +