This commit is contained in:
Chris Forbes 2013-07-24 19:11:45 +12:00
parent f1473cf641
commit 97a1a32648
5 changed files with 16 additions and 8 deletions

Binary file not shown.

View file

@ -123,6 +123,7 @@ INSTALLED_APPS = (
# 'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'record',
)
# A sample logging configuration. The only tangible logging

Binary file not shown.

View file

@ -1,3 +1,13 @@
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

View file

@ -6,11 +6,8 @@ Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
from record.models import Record, Link
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.assertEqual(1 + 1, 2)
class RecordTests(TestCase):
def test_boring(self):
pass