stuff
This commit is contained in:
parent
f1473cf641
commit
97a1a32648
5 changed files with 16 additions and 8 deletions
Binary file not shown.
|
|
@ -123,6 +123,7 @@ INSTALLED_APPS = (
|
||||||
# 'django.contrib.admin',
|
# 'django.contrib.admin',
|
||||||
# Uncomment the next line to enable admin documentation:
|
# Uncomment the next line to enable admin documentation:
|
||||||
# 'django.contrib.admindocs',
|
# 'django.contrib.admindocs',
|
||||||
|
'record',
|
||||||
)
|
)
|
||||||
|
|
||||||
# A sample logging configuration. The only tangible logging
|
# A sample logging configuration. The only tangible logging
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,3 +1,13 @@
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
# Create your models here.
|
class Record(models.Model):
|
||||||
|
metadata = models.TextField(blank=True)
|
||||||
|
title = models.TextField()
|
||||||
|
|
||||||
|
related = models.ManyToManyField('Record', through='Link')
|
||||||
|
|
||||||
|
class Link(models.Model):
|
||||||
|
link_from = models.ForeignKey(Record, related_name='+')
|
||||||
|
link_to = models.ForeignKey(Record, related_name='+')
|
||||||
|
label = models.TextField()
|
||||||
|
pass
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,8 @@ Replace this with more appropriate tests for your application.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
from record.models import Record, Link
|
||||||
|
|
||||||
|
class RecordTests(TestCase):
|
||||||
class SimpleTest(TestCase):
|
def test_boring(self):
|
||||||
def test_basic_addition(self):
|
pass
|
||||||
"""
|
|
||||||
Tests that 1 + 1 always equals 2.
|
|
||||||
"""
|
|
||||||
self.assertEqual(1 + 1, 2)
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue