-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.py
38 lines (31 loc) · 965 Bytes
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# -*- coding: utf-8 -*- #
import os, sys
PROJECT_DIR = os.path.dirname(__file__)
# TODO: integrate media to application logic, for instance in a db table
# media sites or client separation
MEDIA_RE = 'telesur|vtv|cienciasalud|rsur|rnv'
# MySQL database connection
DB = {
'host': 'localhost',
'name': 'omads_data',
'user': 'root',
'pass': 'pass',
}
# Zone configuration bassed on banners' size
ZONES = (
('A', 300, 600),
('B', 300, 250),
('C', 468, 60),
('D', 728, 90),
('E', 234, 60),
('F', 300, 50),
('G', 220, 70),
('H', 800, 600),
)
IMAGE_FILE_EXTENSIONS = ['.jpg', '.jpeg', '.png', '.gif']
VIDEO_FILE_EXTENSIONS = ['.flv', '.mp4', '.mpg', '.avi', '.mov']
FLASH_FILE_EXTENSIONS = ['.swf']
# time to cache banner query. A higher value improves performance but reduces randomness
BANNER_CACHE_SECONDS = 4
# time interval to store banner views count from memory to database.
SOTRE_VIEWS_INTERVAL_SECONDS = 30