一个简单的django应用程序,可以在启动时查看设置。
django-settings-startup的Python项目详细描述
当django以runserver命令开头时,在标准输出上查看您选择的设置 附加的cli选项。
对于django 1.8.5和python 2.7、3.2、3.3、3.4。
最新的python包信息
其他信息
用法
安装后,使用此命令:
python manage.py runserver --config
其他cli选项
--config | Show your settings on standard output. |
有关其他选项的详细信息,请参见python manage.py runserver --help。
安装
下载软件包:
pip install django-settings-startup
将排名第一的“django_settings_startup”添加到已安装的应用程序设置中,如下所示:
INSTALLED_APPS = [ 'django_settings_startup', ... ]
首先(在本地django应用程序之前)安装此应用程序,以覆盖命令runserver,这一点很重要。
版本
见VERSION。
更改日志
pypi:开源python包
travis ci:连续积分
有用链接
- https://github.com/django/django/blob/stable/1.8.x/django/core/management/commands/runserver.py
- https://github.com/django/django/blob/stable/1.8.x/django/core/management/base.py
- https://github.com/django/django/blob/stable/1.8.x/django/core/management/commands/testserver.py
- https://docs.djangoproject.com/en/1.8/howto/custom-management-commands/
- https://docs.djangoproject.com/en/1.8/ref/django-admin/#running-management-commands-from-your-code
许可证
见LICENSE。