#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import datetime, os

SERVER_TYPE = os.environ.get('DJANGO_SETTINGS_MODULE')
print(SERVER_TYPE)

OAUTH_ACCESS_TOKEN_SECRET = 'a+jbnw%@1%zy^=@dn62%'
OAUTH_REFRESH_TOKEN_SECRET = 'r+jbnw%@1%zy^=@dn62%'

# access_token超时
# OAUTH_ACCESS_TOKEN_TIME = datetime.timedelta(hours=1)
OAUTH_ACCESS_TOKEN_TIME = datetime.timedelta(days=30)
# refresh_token超时
OAUTH_REFRESH_TOKEN_TIME = datetime.timedelta(days=30)

SERVER_HOST = 'localhost'

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

UNICODE_ASCII_CHARACTER_SET = ('abcdefghijklmnopqrstuvwxyz'
                               'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
                               '0123456789')

# 不同环境配置
# if SERVER_TYPE == 'AnsjerUIDManage.local_settings':
#     from AnsjerUIDManage.config_local import *
# elif SERVER_TYPE == 'AnsjerUIDManage.test_settings':
#     from AnsjerUIDManage.config_test import *
# elif SERVER_TYPE == 'AnsjerUIDManage.formal_settings':
#     from AnsjerUIDManage.config_formal import *

ONLINE_DEVICE = 1000000

SALES = {
    2020: [
        {
            'name': 'United States',
            'value': [3768901, 23.337, '美国']
        },
        {
            'name': 'Japan',
            'value': [1886988, 9.027, '日本']
        },
        {
            'name': 'Russia',
            'value': [1940038, 7.923, '俄国']
        },
        {
            'name': 'Germany',
            'value': [1319651, 6.253, '德国']
        },
        {
            'name': 'France',
            'value': [1291157, 5.825, '法国']
        },
        {
            'name': 'United Kingdom',
            'value': [1041917, 4.567, '英国']
        },
        {
            'name': 'Italy',
            'value': [859811, 3.875, '意大利']
        }
    ],
    2019: [
        {
            'name': 'United States',
            'value': [2768900, 37.374, '美国']
        },
        {
            'name': 'Japan',
            'value': [1086988, 14.672, '日本']
        },
        {
            'name': 'Russia',
            'value': [940038, 12.689, '俄国']
        },
        {
            'name': 'Germany',
            'value': [919651, 12.413, '德国']
        },
        {
            'name': 'France',
            'value': [691157, 9.329, '法国']
        },
        {
            'name': 'United Kingdom',
            'value': [541917, 7.315, '英国']
        },
        {
            'name': 'Italy',
            'value': [459811, 6.206, '意大利']
        }
    ],
    2018: [
        {
            'name': 'United States',
            'value': [2068912, 32.329, '美国']
        },
        {
            'name': 'Japan',
            'value': [1007988, 15.751, '日本']
        },
        {
            'name': 'Germany',
            'value': [909653, 14.214, '德国']
        },
        {
            'name': 'Russia',
            'value': [900038, 14.064, '俄国']
        },

        {
            'name': 'France',
            'value': [601158, 9.394, '法国']
        },
        {
            'name': 'United Kingdom',
            'value': [501920, 7.843, '英国']
        },
        {
            'name': 'Italy',
            'value': [409813, 6.404, '意大利']
        }
    ],
    2017: [
        {
            'name': 'United States',
            'value': [1668900, 30.914, '美国']
        },
        {
            'name': 'Japan',
            'value': [906988, 16.800, '日本']
        },
        {
            'name': 'Germany',
            'value': [809651, 14.998, '德国']
        },
        {
            'name': 'Russia',
            'value': [800038, 14.820, '俄国']
        },
        {
            'name': 'France',
            'value': [501157, 9.283, '法国']
        },
        {
            'name': 'United Kingdom',
            'value': [401920, 7.445, '英国']
        },
        {
            'name': 'Italy',
            'value': [309822, 5.739, '意大利']
        }
    ],
    2016: [
        {
            'name': 'United States',
            'value': [1468900, 31.943, '美国']
        },
        {
            'name': 'Japan',
            'value': [806988, 17.549, '日本']
        },
        {
            'name': 'Germany',
            'value': [709651, 15.432, '德国']
        },
        {
            'name': 'Russia',
            'value': [700038, 15.223, '俄国']
        },

        {
            'name': 'France',
            'value': [401157, 8.724, '法国']
        },
        {
            'name': 'United Kingdom',
            'value': [301917, 6.566, '英国']
        },
        {
            'name': 'Italy',
            'value': [209811, 4.562, '意大利']
        }
    ]

}
