1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
3 NAMEBASE= python-django-appconf
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]
13 SITES[main]= PYPI/d/django-appconf
14 DISTFILE[1]= django-appconf-1.0.2.tar.gz:main
19 OPTIONS_AVAILABLE= PY36 PY37
20 OPTIONS_STANDARD= none
21 VOPTS[py36]= PY36=ON PY37=OFF
22 VOPTS[py37]= PY36=OFF PY37=ON
24 DISTNAME= django-appconf-1.0.2
28 [PY36].USES_ON= python:py36
30 [PY37].USES_ON= python:py37
32 [FILE:3329:descriptions/desc.single]
37 http://codecov.io/github/django-compressor/django-appconf/coverage.svg?bran
41 http://codecov.io/github/django-compressor/django-appconf?branch=develop
44 https://secure.travis-ci.org/django-compressor/django-appconf.png?branch=de
47 :target: http://travis-ci.org/django-compressor/django-appconf
49 A helper class for handling configuration defaults of packaged Django
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.
61 https://docs.djangoproject.com/en/stable/ref/applications/#django.apps.AppC
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::
72 from appconf import AppConf
74 class MyAppConf(AppConf):
82 ``AppConf`` classes depend on being imported during startup of the
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.
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``
92 is in the ``myapp`` package, the prefix of the settings will be ``MYAPP``.
94 You can override the default prefix by specifying a ``prefix`` attribute of
95 an inner ``Meta`` class::
97 from appconf import AppConf
99 class AcmeAppConf(AppConf):
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
111 ``settings.py`` would override ``SETTING_1`` of the above ``MyAppConf``::
113 ACME_SETTING_1 = "uno"
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::
119 from appconf import AppConf
121 class MyAppConf(AppConf):
129 holder = 'acme.conf.settings'
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::
135 from django.conf import settings
136 from appconf import AppConf
138 class MyAppConf(AppConf):
146 6a4d9aea683b4c224d97ab8ee11ad2d29a37072c0c6c509896dd9857466fb261 14515 django-appconf-1.0.2.tar.gz