معرفی شرکت ها


django-yamlconf-1.4.0


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Define Django settings in local YAML (or JSON) files
ویژگی مقدار
سیستم عامل -
نام فایل django-yamlconf-1.4.0
نام django-yamlconf
نسخه کتابخانه 1.4.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Michael Rohan
ایمیل نویسنده mrohan@vmware.com
آدرس صفحه اصلی https://github.com/vmware/django-yamlconf
آدرس اینترنتی https://pypi.org/project/django-yamlconf/
مجوز BSD-2
django-yamlconf =============== ``django_yamlconf`` is part of VMware's support of open source development and community. Handle YAML based Django settings: load Django settings from YAML files based on a Django project name. The YAML files loaded start with a YAML file in the directory containing the Django settings file and then loads any other YAMLCONF files up the directory tree from the initial file. Values from files higher up the directory tree over-ride lower in the tree. The contents of the YAML file simply defines values that over-ride (or add to) attributes of the standard Django settings file, e.g., for the project "buildaudit", the settings.py file could contain: .. code:: python DEBUG = True i.e., the value for development. This can be redefined via a ``buildaudit.yaml`` file using the definition: .. code:: python DEBUG: false If the environment variable ``YAMLCONF_CONFFILE`` is defined, it uses as the final YAML file loaded (in this case, the file name does not need to match the project name and it can be located anywhere in the file system). Quick Start ----------- The YAMLCONF definitions are added to the Django settings file by including a call to the ``load`` function in the settings file. This would normally be towards the end of the settings file. The simplest, and likely normal usage is to call without arguments. YAMLCONF will infer the project information from the call stack. For a standard Django application structure, the settings file:: myproject/myproject/settings.py would contain the development oriented definitions, e.g., database definitions for user and password for a development database. The settings file would then end with a call the the ``load`` function. Additional definitions could be defined after the ``load`` function to update conditional definitions, e.g., if ``DEBUG`` is enabled. .. code:: python import django_yamlconf ... DATABASES = { 'default': { 'NAME': 'example', 'USER': 'example', 'PASSWORD': 'example', 'HOST': 'localhost', ... } } ... django_yamlconf.load() On a production server, for this example, a ``myproject.yaml`` would be put in place containing the host name for the production database and the password for the example user (assuming production is using the same database name and username). In this example, a random ``pwgen`` password is used: .. code:: yaml DATABASES.default.PASSWORD: 'zibiemohjuD6foh0' DATABASES.default.HOST: 'myproject-db.eng.vmware.com' See the ``load`` function for more information on other optional arguments. License ------- ``django-yamlconf`` is release under the BSD-2 license, see the LICENSE file. SPDX-License-Identifier: BSD-2-Clause


نحوه نصب


نصب پکیج whl django-yamlconf-1.4.0:

    pip install django-yamlconf-1.4.0.whl


نصب پکیج tar.gz django-yamlconf-1.4.0:

    pip install django-yamlconf-1.4.0.tar.gz