mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-22 04:11:09 -05:00
okay fine
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
Christopher Grebs
|
||||
Jannis Leidel
|
||||
Matthew Tretter
|
||||
Rafal Stozek
|
||||
Chris Streeter
|
||||
Patrick Altman
|
||||
@@ -0,0 +1 @@
|
||||
pip
|
||||
@@ -0,0 +1,27 @@
|
||||
Copyright (c) 2011-2013, Jannis Leidel and individual contributors.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of django-appconf nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,162 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: django-appconf
|
||||
Version: 1.0.6
|
||||
Summary: A helper class for handling configuration defaults of packaged apps gracefully.
|
||||
Home-page: https://django-appconf.readthedocs.io/
|
||||
Author: Jannis Leidel
|
||||
Author-email: jannis@leidel.info
|
||||
License: BSD
|
||||
Project-URL: Source, https://github.com/django-compressor/django-appconf
|
||||
Classifier: Development Status :: 5 - Production/Stable
|
||||
Classifier: Environment :: Web Environment
|
||||
Classifier: Framework :: Django
|
||||
Classifier: Framework :: Django :: 3.2
|
||||
Classifier: Framework :: Django :: 4.0
|
||||
Classifier: Framework :: Django :: 4.1
|
||||
Classifier: Framework :: Django :: 4.2
|
||||
Classifier: Framework :: Django :: 5.0
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: License :: OSI Approved :: BSD License
|
||||
Classifier: Operating System :: OS Independent
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3.7
|
||||
Classifier: Programming Language :: Python :: 3.8
|
||||
Classifier: Programming Language :: Python :: 3.9
|
||||
Classifier: Programming Language :: Python :: 3.10
|
||||
Classifier: Programming Language :: Python :: 3.11
|
||||
Classifier: Programming Language :: Python :: 3.12
|
||||
Classifier: Programming Language :: Python :: 3 :: Only
|
||||
Classifier: Topic :: Utilities
|
||||
Requires-Python: >=3.7
|
||||
License-File: LICENSE
|
||||
License-File: AUTHORS
|
||||
Requires-Dist: django
|
||||
|
||||
django-appconf
|
||||
==============
|
||||
|
||||
.. image:: http://codecov.io/github/django-compressor/django-appconf/coverage.svg?branch=develop
|
||||
:alt: Code Coverage
|
||||
:target: http://codecov.io/github/django-compressor/django-appconf?branch=develop
|
||||
|
||||
.. image:: https://secure.travis-ci.org/django-compressor/django-appconf.svg?branch=develop
|
||||
:alt: Build Status
|
||||
:target: http://travis-ci.org/django-compressor/django-appconf
|
||||
|
||||
A helper class for handling configuration defaults of packaged Django
|
||||
apps gracefully.
|
||||
|
||||
.. note::
|
||||
|
||||
This app precedes Django's own AppConfig_ classes that act as
|
||||
"objects [to] store metadata for an application" inside Django's
|
||||
app loading mechanism. In other words, they solve a related but
|
||||
different use case than django-appconf and can't easily be used
|
||||
as a replacement. The similarity in name is purely coincidental.
|
||||
|
||||
.. _AppConfig: https://docs.djangoproject.com/en/stable/ref/applications/#django.apps.AppConfig
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
Say you have an app called ``myapp`` with a few defaults, which you want
|
||||
to refer to in the app's code without repeating yourself all the time.
|
||||
``appconf`` provides a simple class to implement those defaults. Simply add
|
||||
something like the following code somewhere in your app files:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from appconf import AppConf
|
||||
|
||||
class MyAppConf(AppConf):
|
||||
SETTING_1 = "one"
|
||||
SETTING_2 = (
|
||||
"two",
|
||||
)
|
||||
|
||||
.. note::
|
||||
|
||||
``AppConf`` classes depend on being imported during startup of the Django
|
||||
process. Even though there are multiple modules loaded automatically,
|
||||
only the ``models`` modules (usually the ``models.py`` file of your
|
||||
app) are guaranteed to be loaded at startup. Therefore it's recommended
|
||||
to put your ``AppConf`` subclass(es) there, too.
|
||||
|
||||
The settings are initialized with the capitalized app label of where the
|
||||
setting is located at. E.g. if your ``models.py`` with the ``AppConf`` class
|
||||
is in the ``myapp`` package, the prefix of the settings will be ``MYAPP``.
|
||||
|
||||
You can override the default prefix by specifying a ``prefix`` attribute of
|
||||
an inner ``Meta`` class:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from appconf import AppConf
|
||||
|
||||
class AcmeAppConf(AppConf):
|
||||
SETTING_1 = "one"
|
||||
SETTING_2 = (
|
||||
"two",
|
||||
)
|
||||
|
||||
class Meta:
|
||||
prefix = 'acme'
|
||||
|
||||
The ``MyAppConf`` class will automatically look at Django's global settings
|
||||
to determine if you've overridden it. For example, adding this to your site's
|
||||
``settings.py`` would override ``SETTING_1`` of the above ``MyAppConf``:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
ACME_SETTING_1 = "uno"
|
||||
|
||||
Since django-appconf completes Django's global settings with its default values
|
||||
(like "one" above), the standard ``python manage.py diffsettings`` will show
|
||||
these defaults automatically.
|
||||
|
||||
In case you want to use a different settings object instead of the default
|
||||
``'django.conf.settings'``, set the ``holder`` attribute of the inner
|
||||
``Meta`` class to a dotted import path:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from appconf import AppConf
|
||||
|
||||
class MyAppConf(AppConf):
|
||||
SETTING_1 = "one"
|
||||
SETTING_2 = (
|
||||
"two",
|
||||
)
|
||||
|
||||
class Meta:
|
||||
prefix = 'acme'
|
||||
holder = 'acme.conf.settings'
|
||||
|
||||
If you ship an ``AppConf`` class with your reusable Django app, it's
|
||||
recommended to put it in a ``conf.py`` file of your app package and
|
||||
import ``django.conf.settings`` in it, too:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from django.conf import settings
|
||||
from appconf import AppConf
|
||||
|
||||
class MyAppConf(AppConf):
|
||||
SETTING_1 = "one"
|
||||
SETTING_2 = (
|
||||
"two",
|
||||
)
|
||||
|
||||
In the other files of your app you can easily make sure the settings
|
||||
are correctly loaded if you import Django's settings object from that
|
||||
module, e.g. in your app's ``views.py``:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from django.http import HttpResponse
|
||||
from myapp.conf import settings
|
||||
|
||||
def index(request):
|
||||
text = 'Setting 1 is: %s' % settings.MYAPP_SETTING_1
|
||||
return HttpResponse(text)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
appconf/__init__.py,sha256=z-[AWS-SECRET-REMOVED]U,57
|
||||
appconf/__pycache__/__init__.cpython-312.pyc,,
|
||||
appconf/__pycache__/base.cpython-312.pyc,,
|
||||
appconf/__pycache__/utils.cpython-312.pyc,,
|
||||
appconf/base.py,sha256=OXbq5lZZIjqO2WwRiAuyyhcTy-shBvc4zZQebtp5Fs0,5181
|
||||
appconf/utils.py,[AWS-SECRET-REMOVED]QFVnTZLwt4,861
|
||||
django_appconf-1.0.6.dist-info/AUTHORS,sha256=KgKdSgPfLMSqMUqQc3RNn_h-dTnlNt4VdrzFycfQQ_M,91
|
||||
django_appconf-1.0.6.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
django_appconf-1.0.6.dist-info/LICENSE,sha256=6qakda-uSYdYv8og71A0zIQpji4p3VKUE7PwdzCgmvE,1549
|
||||
django_appconf-1.0.6.dist-info/METADATA,sha256=puaEejKaGEl3cUE191bz8zn2bThWL6_PgSOEwJMZKWg,5373
|
||||
django_appconf-1.0.6.dist-info/RECORD,,
|
||||
django_appconf-1.0.6.dist-info/WHEEL,[AWS-SECRET-REMOVED]8nu9FGlvMA,92
|
||||
django_appconf-1.0.6.dist-info/top_level.txt,sha256=bLxw3ktn3j66DebFZ7hmrFEcUZSJzHz_cnhL16WnN7k,8
|
||||
@@ -0,0 +1,5 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.37.1)
|
||||
Root-Is-Purelib: true
|
||||
Tag: py3-none-any
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
appconf
|
||||
Reference in New Issue
Block a user