1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Some improvements for appsettings app

This commit is contained in:
Real-Gecko 2020-06-17 15:15:58 +06:00
parent 7eee811e65
commit bb8f95be14
5 changed files with 43 additions and 3 deletions

18
appsettings/settings.py Normal file
View file

@ -0,0 +1,18 @@
from .models import AppSettings
class Settings(object):
pass
app_settings = Settings()
def get_settings():
try:
entries = AppSettings.objects.all()
except:
pass
for entry in entries:
setattr(app_settings, entry.key, entry.val)