rename: charts -> model
This commit is contained in:
parent
22714a9f9f
commit
4c3bb8c6a4
|
@ -1,4 +1,5 @@
|
||||||
*.pyc
|
*.pyc
|
||||||
*.pyo
|
*.pyo
|
||||||
*sublime*
|
*sublime*
|
||||||
python_environment/*
|
python_environment/*
|
||||||
|
environment/*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from charts import models
|
from model import models
|
||||||
import json
|
import json
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import time
|
import time
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
"""
|
|
||||||
This file demonstrates writing tests using the unittest module. These will pass
|
|
||||||
when you run "manage.py test".
|
|
||||||
|
|
||||||
Replace this with more appropriate tests for your application.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from django.test import TestCase
|
|
||||||
|
|
||||||
|
|
||||||
class SimpleTest(TestCase):
|
|
||||||
def test_basic_addition(self):
|
|
||||||
"""
|
|
||||||
Tests that 1 + 1 always equals 2.
|
|
||||||
"""
|
|
||||||
self.assertEqual(1 + 1, 2)
|
|
0
charts/migrations/0001_initial.py → model/migrations/0001_initial.py
Normal file → Executable file
0
charts/migrations/0001_initial.py → model/migrations/0001_initial.py
Normal file → Executable file
0
charts/migrations/0002_auto_20141007_1601.py → model/migrations/0002_auto_20141007_1601.py
Normal file → Executable file
0
charts/migrations/0002_auto_20141007_1601.py → model/migrations/0002_auto_20141007_1601.py
Normal file → Executable file
0
charts/migrations/0003_auto_20141008_1252.py → model/migrations/0003_auto_20141008_1252.py
Normal file → Executable file
0
charts/migrations/0003_auto_20141008_1252.py → model/migrations/0003_auto_20141008_1252.py
Normal file → Executable file
|
@ -11,6 +11,19 @@ class Chart(models.Model):
|
||||||
lastModified = models.DateTimeField()
|
lastModified = models.DateTimeField()
|
||||||
content = JSONField()
|
content = JSONField()
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.ownerSource + ":" + self.ownerId
|
||||||
|
|
||||||
|
def setContent(self, _content):
|
||||||
|
self.content = _content
|
||||||
|
|
||||||
|
|
||||||
|
class StudyTemplate(models.Model):
|
||||||
|
ownerSource = models.CharField(max_length=200)
|
||||||
|
ownerId = models.CharField(max_length=200)
|
||||||
|
name = models.CharField(max_length=200)
|
||||||
|
content = JSONField()
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.ownerSource + ":" + self.ownerId
|
return self.ownerSource + ":" + self.ownerId
|
||||||
|
|
Loading…
Reference in New Issue