utils update: moving some parameters to settings

This commit is contained in:
tmshv committed 2016-08-04 23:35:39 +03:00
1 parent 8143e21388
commit 24b28e6e4d
5 files changed
+106 -69

No files matched your search

+17 -7
View File
@@ -1,3 +1,5 @@
import os
__author__ = 'Roman Timashev'
root_dir_gallery = './Gallery'
@@ -5,7 +7,7 @@ root_dir_schedule = './Schedules'
default_description_version = 1
database_uri = 'mongodb://localhost/hudozka'
database_uri = os.environ['MONGO_URI']
CYR_LOWER = 'йцукенгшщзхъфывапролджэячсмитьбю'
CYR_UPPER = 'ЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ'
@@ -14,7 +16,6 @@ EN_UPPER = 'QWERTYUIOPASDFGHJKLZXCVBNM'
DIGITS = '0123456789'
description_available_chars = CYR_LOWER + CYR_UPPER + EN_LOWER + EN_UPPER + DIGITS + ' _-'
translit_table = (
['а', 'б', 'в', 'г', 'д', 'е', 'ё', 'ж', 'з', 'и', 'й', 'к', 'л', 'м', 'н', 'о', 'п', 'р', 'с', 'т', 'у', 'ф', 'х', 'ц', 'ч', 'ш', 'щ', 'ъ', 'ы', 'ь', 'э', 'ю', 'я', 'А', 'Б', 'В', 'Г', 'Д', 'Е', 'Ё', 'Ж', 'З', 'И', 'Й', 'К', 'Л', 'М', 'Н', 'О', 'П', 'Р', 'С', 'Т', 'У', 'Ф', 'Х', 'Ц', 'Ч', 'Ш', 'Щ', 'Ъ', 'Ы', 'Ь', 'Э', 'Ю', 'Я', '̆'],
['a', 'b', 'v', 'g', 'd', 'e', 'e', 'zh', 'z', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'r', 's', 't', 'u', 'f', 'h', 'z', 'ch', 'sh', 'sch', '_', 'y', '_', 'e', 'yu', 'ya', 'A', 'B', 'V', 'G', 'D', 'E', 'E', 'ZH', 'Z', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'R', 'S', 'T', 'U', 'F', 'H', 'Z', 'CH', 'SH', 'SCH', '_', 'Y', '_', 'E', 'YU', 'YA', '_']
@@ -27,15 +28,11 @@ teachers_names = {
'В.А.Саржин': 'va-sarzhin',
'Р.К.Тимашев': 'rk-timashev',
'А.С.Тимашева': 'as-timasheva',
# '': '',
}
image_processing = True
image_save_dir = './static_images'
image_base_url = 'https://static.shburg.org/art/images/'
image_output = '/Users/tmshv/Desktop/Hudozka Static/images'
album_html_img_class = 'hudozka-product'
image_ext = '.jpg'
@@ -90,4 +87,17 @@ date_formats_reverse = [
'%Y',
'%Y.%m',
'%Y.%m.%d'
]
]
dir_documents = '/Users/tmshv/Yandex.Disk/Hudozka/Site/Documents'
dir_events = '/Users/tmshv/Yandex.Disk/Hudozka/Site/Events'
dir_news = '/Users/tmshv/Yandex.Disk/Hudozka/Site/News'
dir_static_uploads = '/Users/tmshv/Desktop/Hudozka Static/uploads'
dir_static_images = '/Users/tmshv/Desktop/Hudozka Static/images'
url_base_preview = 'https://static.shburg.org/art/images/{id}-{size}{ext}'
url_base_document = 'https://static.shburg.org/art/uploads/{file}'
image_base_url = 'https://static.shburg.org/art/images/'
image_name_format = '{type}-{id}-{img}-{size}{ext}'
image_output = '/Users/tmshv/Desktop/Hudozka Static/images'