saveload_backend/charts/models.py

16 lines
427 B
Python
Raw Normal View History

2014-10-07 06:07:00 -07:00
from django.db import models
from jsonfield import JSONField
class Chart(models.Model):
ownerSource = models.CharField(max_length=200)
ownerId = models.CharField(max_length=200)
name = models.CharField(max_length=200)
lastModified = models.DateTimeField()
content = JSONField()
def __str__(self):
return self.ownerSource + ":" + self.ownerId
def setContent(self, _content):
self.content = _content