Skip to main content

License: GPL v3 CI codecov PyPI version Openhub

A firefox-like about:config implementation for one-off settings in Django apps.

Compatible Python versions

3.6+

Compatible Django versions

2.0 - 3.0

Installation

You can install aboutconfig either from source or via pip:

pip install django-aboutconfig

The only thing you need to do to configure it is add it to your INSTALLED_APPS like all other django applications:

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    ...
    'aboutconfig',
]

Then just run manage.py migrate and you’re good to go.

Note: aboutconfig relies on having a good caching mechanism to be fast (all configured values are preloaded into cache on start-up). You should ideally have something like memcached configured to avoid slowdowns. See Django documentation for details.

Usage

By default, aboutconfig comes with four supported data-types: integer, boolean, string and decimal. All data types are configurable and you can add your own if necesessary.

To add some configuration values, head over to the django admin and add an instance of the Config model.

Having done this, you can access the configuration value via aboutconfig.get_config() in Python code or the get_config template filter (load config before using).

Python code:

from aboutconfig import get_config

def my_view(request):
    # some code...
    admin_email = get_config('admin.details.email')
    # some more code...

Template code:

{% load config %}

The website admin's email is {{ 'admin.details.email'|get_config }}.

>>> An assignment tag also exists for convenience:

{% get_config 'admin.details.email' as email %}
The website admin's email is <a href="mailto:{{ email }}">{{ email }}</a>.

Release files for django-aboutconfig 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-aboutconfig 1.1.0
File Size Uploaded
django-aboutconfig-1.1.0.tar.gz 24.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-aboutconfig 1.1.0
File Interpreter ABI Platform
django_aboutconfig-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.4 kB

Release files / django-aboutconfig-1.1.0.tar.gz

Download URL django-aboutconfig-1.1.0.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ba52416113030c94a60f4525ed5115d7c9a17cd59d76cc88d53c6372c2dd0112
BLAKE2b-256 checksum
How to use checksums
60549db889308c6daa03fb7656743bedd43803a1243547dde3e3ea9f2a08e003
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

Release files / django_aboutconfig-1.1.0-py3-none-any.whl

Download URL django_aboutconfig-1.1.0-py3-none-any.whl
Size 19.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
602e6f5f15cb29ee57e609e699f406f09be3e91dc582286f00ec25298bf805a6
BLAKE2b-256 checksum
How to use checksums
e9d9afc2f39f33c8c57b112890a2e70926ee2cfc45ae653088a34cf450668887
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

1 release file

0.1.0

1 release file

0.0.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page