Ravenports generated: 08 Jan 2019 16:45
[ravenports.git] / bucket_89 / python-django-appconf
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-django-appconf
4 VERSION=                1.0.2
5 KEYWORDS=               python devel
6 VARIANTS=               py36 py37
7 SDESC[py36]=            Django configure defaults helper class (PY 36)
8 SDESC[py37]=            Django configure defaults helper class (PY 37)
9 HOMEPAGE=               http://django-appconf.readthedocs.org/
10 CONTACT=                Python_Automaton[python@ironwolf.systems]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PYPI/d/django-appconf
14 DISTFILE[1]=            django-appconf-1.0.2.tar.gz:main
15 DF_INDEX=               1
16 SPKGS[py36]=            single
17 SPKGS[py37]=            single
18
19 OPTIONS_AVAILABLE=      PY36 PY37
20 OPTIONS_STANDARD=       none
21 VOPTS[py36]=            PY36=ON PY37=OFF
22 VOPTS[py37]=            PY36=OFF PY37=ON
23
24 DISTNAME=               django-appconf-1.0.2
25
26 GENERATED=              yes
27
28 [PY36].USES_ON=                         python:py36
29
30 [PY37].USES_ON=                         python:py37
31
32 [FILE:3329:descriptions/desc.single]
33 django-appconf
34 ==============
35
36 .. image::
37 http://codecov.io/github/django-compressor/django-appconf/coverage.svg?bran
38 ch=develop
39     :alt: Code Coverage
40     :target:
41 http://codecov.io/github/django-compressor/django-appconf?branch=develop
42
43 .. image::
44 https://secure.travis-ci.org/django-compressor/django-appconf.png?branch=de
45 velop
46     :alt: Build Status
47     :target: http://travis-ci.org/django-compressor/django-appconf
48
49 A helper class for handling configuration defaults of packaged Django
50 apps gracefully.
51
52 .. note::
53
54     This app precedes Django's own AppConfig_ classes that act as
55     "objects [to] store metadata for an application" inside Django's
56     app loading mechanism. In other words, they solve a related but
57     different use case than django-appconf and can't easily be used
58     as a replacement. The similarity in name is purely coincidental.
59
60 .. _AppConfig:
61 https://docs.djangoproject.com/en/stable/ref/applications/#django.apps.AppC
62 onfig
63
64 Overview
65 --------
66
67 Say you have an app called ``myapp`` with a few defaults, which you want
68 to refer to in the app's code without repeating yourself all the time.
69 ``appconf`` provides a simple class to implement those defaults. Simply add
70 something like the following code somewhere in your app files::
71
72     from appconf import AppConf
73
74     class MyAppConf(AppConf):
75         SETTING_1 = "one"
76         SETTING_2 = (
77             "two",
78         )
79
80 .. note::
81
82     ``AppConf`` classes depend on being imported during startup of the
83 Django
84     process. Even though there are multiple modules loaded automatically,
85     only the ``models`` modules (usually the ``models.py`` file of your
86     app) are guaranteed to be loaded at startup. Therefore it's recommended
87     to put your ``AppConf`` subclass(es) there, too.
88
89 The settings are initialized with the capitalized app label of where the
90 setting is located at. E.g. if your ``models.py`` with the ``AppConf``
91 class
92 is in the ``myapp`` package, the prefix of the settings will be ``MYAPP``.
93
94 You can override the default prefix by specifying a ``prefix`` attribute of
95 an inner ``Meta`` class::
96
97     from appconf import AppConf
98
99     class AcmeAppConf(AppConf):
100         SETTING_1 = "one"
101         SETTING_2 = (
102             "two",
103         )
104
105         class Meta:
106             prefix = 'acme'
107
108 The ``MyAppConf`` class will automatically look at Django's global settings
109 to determine if you've overridden it. For example, adding this to your
110 site's
111 ``settings.py`` would override ``SETTING_1`` of the above ``MyAppConf``::
112
113     ACME_SETTING_1 = "uno"
114
115 In case you want to use a different settings object instead of the default
116 ``'django.conf.settings'``, set the ``holder`` attribute of the inner
117 ``Meta`` class to a dotted import path::
118
119     from appconf import AppConf
120
121     class MyAppConf(AppConf):
122         SETTING_1 = "one"
123         SETTING_2 = (
124             "two",
125         )
126
127         class Meta:
128             prefix = 'acme'
129             holder = 'acme.conf.settings'
130
131 If you ship an ``AppConf`` class with your reusable Django app, it's
132 recommended to put it in a ``conf.py`` file of your app package and
133 import ``django.conf.settings`` in it, too::
134
135     from django.conf import settings
136     from appconf import AppConf
137
138     class MyAppConf(AppConf):
139         SETTING_1 = "one"
140         SETTING_2 = (
141             "two",
142         )
143
144
145 [FILE:106:distinfo]
146 6a4d9aea683b4c224d97ab8ee11ad2d29a37072c0c6c509896dd9857466fb261        14515 django-appconf-1.0.2.tar.gz
147