Example #1
0
        'console': {
            'class': 'logging.StreamHandler',
        },
    },
    'root': {
        'handlers': ['console'],
        'level': 'WARNING',
    },
    'loggers': {
        'django': {
            'handlers': ['console'],
            'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),
            'propagate': False,
        },
    },
}

# Custom settings
SITE_NAME = gettext_noop("Jerry's songs")
PDF_FILE_DIR = 'pdfs'
CACHE_TIMEOUT = 86400

# Slug for category to be used on index page, if the category is not found it will return category with lowest id
DEFAULT_CATEGORY = None

# If true, it will prerender all markdowns on create/update and then use them in fetch requests
USE_PRERENDERED_MARKDOWN = False
# This settings will prerender markdown on fetch request and save it for future use, if it is empty
# might incur performance penalties on production, for production deployment use
USE_DYNAMIC_PRERENDER = False
Example #2
0
        'name_local': '简体中文',
    },
}
# Add custom languages not provided by Django
# LANG_INFO = dict(django.conf.locale.LANG_INFO.items() + EXTRA_LANG_INFO.items())
django.conf.locale.LANG_INFO = LANG_INFO

# Languages using BiDi (right-to-left) layout
# LANGUAGES_BIDI = global_settings.LANGUAGES_BIDI + tuple(EXTRA_LANG_INFO.keys())
LANGUAGES_BIDI = tuple(EXTRA_LANG_INFO.keys())
# LANGUAGES = sorted(global_settings.LANGUAGES + tuple([
#     (k, v['name']) for k, v in EXTRA_LANG_INFO.items()
#     ]), key=lambda x: x[0])

LANGUAGES = (
    ('en', global_settings.gettext_noop('English')),
    ('zh',global_settings.gettext_noop('Simplified Chinese')),
)
#--------------------------------------------------
# DEBUG TOOLBAR
#--------------------------------------------------
INTERNAL_IPS = ('127.0.0.1', '192.168.0.1', '10.1.0.0', '10.1.4.0',)
DEBUG_TOOLBAR_PATCH_SETTINGS = False

# -------------------------------------- #
# THEMES
# -------------------------------------- #
THEMES_DIR = os.path.join(TENDENCI_ROOT, 'themes')

# ORIGINAL_THEMES_DIR is used when USE_S3_STORAGE==True
ORIGINAL_THEMES_DIR = THEMES_DIR
Example #3
0
RELATE_ADMIN_EMAIL_LOCALE = "en-us"

RELATE_EDITABLE_INST_ID_BEFORE_VERIFICATION = True

RELATE_SIGN_IN_BY_USERNAME_ENABLED = True
RELATE_SHOW_INST_ID_FORM = True
RELATE_SHOW_EDITOR_FORM = True

# }}}

for name, val in local_settings.items():
    if not name.startswith("_"):
        globals()[name] = val

RELATE_SITE_NAME = gettext_noop("RELATE")
RELATE_CUTOMIZED_SITE_NAME = local_settings.get("RELATE_CUTOMIZED_SITE_NAME")
if RELATE_CUTOMIZED_SITE_NAME is not None and RELATE_CUTOMIZED_SITE_NAME.strip(
):
    RELATE_SITE_NAME = RELATE_CUTOMIZED_SITE_NAME

# {{{ celery config

if "CELERY_BROKER_URL" not in globals():
    from warnings import warn
    warn(
        "CELERY_BROKER_URL not set in local_settings.py: defaulting to amqp://. "
        "If there is no queue server installed, long-running tasks will "
        "appear to hang.")

    CELERY_BROKER_URL = 'amqp://'
Example #4
0
        'NAME':
        'django.contrib.auth.password_validation.CommonPasswordValidator',
    },
    {
        'NAME':
        'django.contrib.auth.password_validation.NumericPasswordValidator',
    },
]

AUTH_USER_MODEL = 'common.User'

# Internationalization
# https://docs.djangoproject.com/en/3.0/topics/i18n/

LANGUAGES = [
    ('en', gettext_noop('English')),
    ('pl', gettext_noop('Polish')),
]

LANGUAGE_CODE = 'pl'

TIME_ZONE = 'Europe/Warsaw'

USE_I18N = True

USE_L10N = True

USE_TZ = True

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.0/howto/static-files/
Example #5
0
            'level': 'ERROR',
            'handlers': ['console'],
            'propagate': False,
        },
        'django.utils.autoreload': {
            'level': 'INFO',
            'handlers': ['console'],
            'propagate': False
        }
    },
}

# Internationalization
# https://docs.djangoproject.com/en/1.11/topics/i18n/

LANGUAGES = (('fr', gettext_noop('French')), )
DATE_FORMAT = "d/m/Y"
DATE_INPUT_FORMATS = ("%d/%m/%Y", )
SHORT_DATETIME_FORMAT = "d/m/Y"
LANGUAGE_CODE = 'fr-FR'

TIME_ZONE = 'Europe/Paris'

USE_I18N = True

USE_L10N = True

USE_TZ = False  # Important, toujours False

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.11/howto/static-files/
Example #6
0
RELATE_ADMIN_EMAIL_LOCALE = "en-us"

RELATE_EDITABLE_INST_ID_BEFORE_VERIFICATION = True

RELATE_SIGN_IN_BY_USERNAME_ENABLED = True
RELATE_SHOW_INST_ID_FORM = True
RELATE_SHOW_EDITOR_FORM = True

# }}}

for name, val in local_settings.items():
    if not name.startswith("_"):
        globals()[name] = val

RELATE_SITE_NAME = gettext_noop("RELATE")
RELATE_CUTOMIZED_SITE_NAME = local_settings.get("RELATE_CUTOMIZED_SITE_NAME")
if RELATE_CUTOMIZED_SITE_NAME is not None and RELATE_CUTOMIZED_SITE_NAME.strip():
    RELATE_SITE_NAME = RELATE_CUTOMIZED_SITE_NAME

# {{{ celery config

if "BROKER_URL" not in globals():
    BROKER_URL = 'django://'

CELERY_ACCEPT_CONTENT = ['pickle']
CELERY_TASK_SERIALIZER = 'pickle'
CELERY_RESULT_SERIALIZER = 'pickle'
CELERY_TRACK_STARTED = True

if "CELERY_RESULT_BACKEND" not in globals():
Example #7
0
        'django.contrib.auth.password_validation.MinimumLengthValidator',
    },
    {
        'NAME':
        'django.contrib.auth.password_validation.CommonPasswordValidator',
    },
    {
        'NAME':
        'django.contrib.auth.password_validation.NumericPasswordValidator',
    },
]

LANGUAGE_CODE = 'ru'

LANGUAGES = [
    ('en', gettext_noop('English')),
    ('ru', gettext_noop('Russian')),
    ('be', gettext_noop('Belarusian')),
    ('uk', gettext_noop('Ukrainian')),
    ('pl', gettext_noop('Polish')),
]

TIME_ZONE = 'Europe/Moscow'

USE_I18N = True

USE_L10N = True

USE_TZ = True

STATIC_URL = '/static/'