added files/
This commit is contained in:
parent
a8714599aa
commit
1011b48877
|
@ -28,6 +28,9 @@ class Book(models.Model):
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return self.title
|
return self.title
|
||||||
|
|
||||||
|
def get_title(self):
|
||||||
|
return self.title
|
||||||
|
|
||||||
class ChapterEntry(models.Model):
|
class ChapterEntry(models.Model):
|
||||||
title = models.TextField()
|
title = models.TextField()
|
||||||
synopsis = models.TextField(blank=True)
|
synopsis = models.TextField(blank=True)
|
||||||
|
|
0
index/files/__init__.py
Normal file
0
index/files/__init__.py
Normal file
8
index/files/models.py
Normal file
8
index/files/models.py
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
from django.db import models
|
||||||
|
|
||||||
|
class File(models.Model):
|
||||||
|
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
abstract = True
|
||||||
|
# Create your models here.
|
23
index/files/tests.py
Normal file
23
index/files/tests.py
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
"""
|
||||||
|
This file demonstrates two different styles of tests (one doctest and one
|
||||||
|
unittest). These will both pass when you run "manage.py test".
|
||||||
|
|
||||||
|
Replace these 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.failUnlessEqual(1 + 1, 2)
|
||||||
|
|
||||||
|
__test__ = {"doctest": """
|
||||||
|
Another way to test that 1 + 1 is equal to 2.
|
||||||
|
|
||||||
|
>>> 1 + 1 == 2
|
||||||
|
True
|
||||||
|
"""}
|
||||||
|
|
1
index/files/views.py
Normal file
1
index/files/views.py
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# Create your views here.
|
Loading…
Reference in New Issue
Block a user