本文整理汇总了Python中environ.Env.email_url方法的典型用法代码示例。如果您正苦于以下问题:Python Env.email_url方法的具体用法?Python Env.email_url怎么用?Python Env.email_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类environ.Env
的用法示例。
在下文中一共展示了Env.email_url方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: vars
# 需要导入模块: from environ import Env [as 别名]
# 或者: from environ.Env import email_url [as 别名]
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'
TIME_ZONE = 'Europe/Helsinki'
USE_I18N = True
USE_L10N = True
USE_TZ = True
WSGI_APPLICATION = 'tallessa_backend.wsgi.application'
# TODO
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly',
],
'DEFAULT_VERSIONING_CLASS': 'rest_framework.versioning.NamespaceVersioning',
}
TALLESSA_INSTALLATION_SLUG = env.str('TALLESSA_INSTALLATION_SLUG', default='tallessa')
TALLESSA_DEFAULT_TEAM_SLUG = env.str(
'TALLESSA_DEFAULT_TEAM_SLUG',
default=('hukassa' if DEBUG else None),
)
TALLESSA_HOSTNAME_SUFFIX = env.str(
'TALLESSA_HOSTNAME_SUFFIX',
default='tallessa.eu',
)
vars().update(env.email_url(
default=('consolemail://' if DEBUG else 'smtp://localhost:25'),
))
示例2: env
# 需要导入模块: from environ import Env [as 别名]
# 或者: from environ.Env import email_url [as 别名]
ADMIN_EMAIL = env('ADMIN_EMAIL', default='[email protected]%s.com' % PROJECT_NAME)
ADMIN_NAME = env('ADMIN_NAME', default=ADMIN_EMAIL.split('@')[0])
# See: https://docs.djangoproject.com/en/dev/ref/settings/#admins
ADMINS = (
(ADMIN_EMAIL, ADMIN_NAME),
)
# See: https://docs.djangoproject.com/en/dev/ref/settings/#managers
MANAGERS = ADMINS
# See: https://docs.djangoproject.com/en/dev/ref/settings/#default-from-email
DEFAULT_FROM_EMAIL = env('DEFAULT_FROM_EMAIL', default=ADMIN_EMAIL)
# See: https://docs.djangoproject.com/en/1.9/ref/settings/#email-backend
EMAIL_CONFIG = env.email_url(
'EMAIL_URL', default='consolemail://')
vars().update(EMAIL_CONFIG)
########## END MANAGER CONFIGURATION
########## DATABASE CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#databases
DATABASES = {
'default': env.db(default='sqlite:///{0}'.format(normpath(join(RESOURCES_PATH, 'db', 'database.db'))))
}
########## END DATABASE CONFIGURATION
########## GENERAL CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#time-zone