Metadata-Version: 2.4
Name: tms-django-config
Version: 1.0.1
Summary: Simple config table with admin management
Author-email: Franck COUTOULY <franck.coutouly@tms-software.ch>
License: MIT
Project-URL: Homepage, https://github.com/tms-software/django-config
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: django
Provides-Extra: dev
Requires-Dist: black; extra == "dev"

# Django Log Shortcut

Install the package

```bash
pip install tms_django_config
```

Add the application in the `INSTALLE_APPS`:

```python
INSTALLED_APPS = [
    ...
    'django.contrib.admin',
    'django.contrib.contenttypes',
    'tms_django_config',
    ...
]
```

Apply migrations

```python
python manage.py migrate
```

Then use the shortcut
```python
from tms_django_config.models import Config, ConfigType

my_config, _ = Config.objects.get_or_create(key="my-config-key", defaults=dict(type=ConfigType.TEXT, value="My default value"))

config_value = my_config.to_value()
```

