addons-server/apps/zadmin/models.py

17 строки
312 B
Python

import json
from django.db import models
class Config(models.Model):
"""Sitewide settings."""
key = models.CharField(max_length=255, primary_key=True)
value = models.TextField()
class Meta:
db_table = u'config'
@property
def json(self):
return json.loads(self.value)