Exemple #1
0
    TEMPLATE_CONTEXT_PROCESSORS.append(
        "upy.contrib.customadmin.template_context.context_processors.customadmin_context"
    )
if USE_UPY_ADMIN:
    TEMPLATE_CONTEXT_PROCESSORS.append("upy.template_context.context_processors.use_upy_admin")

GLOBAL_TEMPLATES_DIR = "../templates"
TEMPLATE_DIRS = [GLOBAL_TEMPLATES_DIR]
if USE_GLOBAL_TEMPLATES_DIR:
    list_dirs = ["%s/%s" % (GLOBAL_TEMPLATES_DIR, tdir) for tdir in os.listdir(GLOBAL_TEMPLATES_DIR)]
    if list_dirs:
        TEMPLATE_DIRS.extend(list_dirs)
if USE_UPY_ADMIN:
    TEMPLATE_DIRS.extend([upy_templates(), upy_tpl()])

LOCALE_PATHS = [upy_locale()]

if USE_UPY_TREE:
    INSTALLED_APPS.append("upy.contrib.tree")
    if USE_UPY_SEO:
        INSTALLED_APPS.append("upy.contrib.seo")

if USE_FULLHD_SUPPORT:
    PIL_IMAGEFILE_MAXBLOCK = 256 * 2 ** 13  # 2MB
    UPYIMAGE_LIMIT_AREA = 2073700  # 1920*1080px +
else:
    PIL_IMAGEFILE_MAXBLOCK = 256 * 2 ** 10  # 260KB
    UPYIMAGE_LIMIT_AREA = 1049188  # 1366*768px +

if USE_UPY_COLOR:
    INSTALLED_APPS.append("upy.contrib.colors")
Exemple #2
0
GLOBAL_TEMPLATES_DIR = '../templates'
TEMPLATE_DIRS = [GLOBAL_TEMPLATES_DIR]
if USE_GLOBAL_TEMPLATES_DIR:
    list_dirs = [ "%s/%s" % (GLOBAL_TEMPLATES_DIR,tdir) for tdir in os.listdir(GLOBAL_TEMPLATES_DIR)]
    if list_dirs:
        TEMPLATE_DIRS.extend(list_dirs)
if USE_UPY_ADMIN:
    TEMPLATE_DIRS.extend(
        [upy_templates(),upy_tpl(),]
    )
TEMPLATE_DIRS.extend(
    PROJ_TEMPLATE_DIRS
)
LOCALE_PATHS = []
LOCALE_PATHS.extend(
        [upy_locale()]
    )
LOCALE_PATHS.extend(PROJ_LOCALE_PATHS)
INSTALLED_APPS = [
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.admin',
    'django.contrib.sitemaps',
    'mptt',  
    'imagekit',
    'upy',
    'upy.contrib.cked',
    'upy.contrib.inspect',
    'upy.contrib.image',
Exemple #3
0
TEMPLATE_DIRS = [GLOBAL_TEMPLATES_DIR]
if USE_GLOBAL_TEMPLATES_DIR:
    list_dirs = [
        "%s/%s" % (GLOBAL_TEMPLATES_DIR, tdir)
        for tdir in os.listdir(GLOBAL_TEMPLATES_DIR)
    ]
    if list_dirs:
        TEMPLATE_DIRS.extend(list_dirs)
if USE_UPY_ADMIN:
    TEMPLATE_DIRS.extend([
        upy_templates(),
        upy_tpl(),
    ])
TEMPLATE_DIRS.extend(PROJ_TEMPLATE_DIRS)
LOCALE_PATHS = []
LOCALE_PATHS.extend([upy_locale()])
LOCALE_PATHS.extend(PROJ_LOCALE_PATHS)
INSTALLED_APPS = [
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.admin',
    'django.contrib.sitemaps',
    'mptt',
    'imagekit',
    'upy',
    'upy.contrib.ckeditor',
]
if USE_UPY_G11N:
    INSTALLED_APPS.append('upy.contrib.g11n')
Exemple #4
0
    )
if USE_UPY_ADMIN:
    TEMPLATE_CONTEXT_PROCESSORS.append("upy.template_context.context_processors.use_upy_admin")

TEMPLATE_CONTEXT_PROCESSORS.extend(PROJ_TEMPLATE_CONTEXT_PROCESSORS)
GLOBAL_TEMPLATES_DIR = "../templates"
TEMPLATE_DIRS = [GLOBAL_TEMPLATES_DIR]
if USE_GLOBAL_TEMPLATES_DIR:
    list_dirs = ["%s/%s" % (GLOBAL_TEMPLATES_DIR, tdir) for tdir in os.listdir(GLOBAL_TEMPLATES_DIR)]
    if list_dirs:
        TEMPLATE_DIRS.extend(list_dirs)
if USE_UPY_ADMIN:
    TEMPLATE_DIRS.extend([upy_templates(), upy_tpl()])
TEMPLATE_DIRS.extend(PROJ_TEMPLATE_DIRS)
LOCALE_PATHS = []
LOCALE_PATHS.extend([upy_locale()])
LOCALE_PATHS.extend(PROJ_LOCALE_PATHS)
INSTALLED_APPS = [
    "django.contrib.auth",
    "django.contrib.contenttypes",
    "django.contrib.sessions",
    "django.contrib.messages",
    "django.contrib.admin",
    "django.contrib.sitemaps",
    "mptt",
    "imagekit",
    "upy",
    "upy.contrib.cked",
    "upy.contrib.inspect",
]
if USE_UPY_G11N: