mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-05-30 17:09:37 +00:00
Some improvements for appsettings app
This commit is contained in:
18
appsettings/settings.py
Normal file
18
appsettings/settings.py
Normal 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)
|
||||
Reference in New Issue
Block a user