Skip to content

tms-software/django-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Log Shortcut

Install the package

pip install tms_django_config

Add the application in the INSTALLE_APPS:

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

Apply migrations

python manage.py migrate

Then use the shortcut

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()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages