当前位置: 首页>>代码示例>>Python>>正文


Python Path.rsplit方法代码示例

本文整理汇总了Python中unipath.Path.rsplit方法的典型用法代码示例。如果您正苦于以下问题:Python Path.rsplit方法的具体用法?Python Path.rsplit怎么用?Python Path.rsplit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在unipath.Path的用法示例。


在下文中一共展示了Path.rsplit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Path

# 需要导入模块: from unipath import Path [as 别名]
# 或者: from unipath.Path import rsplit [as 别名]
"""
Django settings for eventex project.

For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
from dj_database_url import parse as db_url
from unipath import Path
from decouple import config
BASE_DIR = Path(__file__).parent
PROJECT_NAME = BASE_DIR.rsplit('/', 1)[-1]

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = config('SECRET_KEY')

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = config('DEBUG', default=False, cast=bool)

SOUTH_TESTS_MIGRATE = False

TEMPLATE_DEBUG = DEBUG

ALLOWED_HOSTS = ['.localhost', '127.0.0.1', '.herokuapp.com']

开发者ID:eltonplima,项目名称:wttd,代码行数:31,代码来源:settings.py


注:本文中的unipath.Path.rsplit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。