From c8fc941d73d0f013fc9c5a175c29eb1023486732 Mon Sep 17 00:00:00 2001 From: sanj Date: Mon, 6 Dec 2010 23:34:49 +0100 Subject: [PATCH] forgot to add bestpractices --- itf/bestpractices/__init__.py | 0 itf/bestpractices/models.py | 13 +++++++++++++ itf/bestpractices/tests.py | 23 +++++++++++++++++++++++ itf/bestpractices/views.py | 1 + 4 files changed, 37 insertions(+) create mode 100644 itf/bestpractices/__init__.py create mode 100644 itf/bestpractices/models.py create mode 100644 itf/bestpractices/tests.py create mode 100644 itf/bestpractices/views.py diff --git a/itf/bestpractices/__init__.py b/itf/bestpractices/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/itf/bestpractices/models.py b/itf/bestpractices/models.py new file mode 100644 index 0000000..56aeeaa --- /dev/null +++ b/itf/bestpractices/models.py @@ -0,0 +1,13 @@ +from django.db import models +from tagging.fields import TagField + +class BestPractice(models.Model): + title = models.CharField(max_length=512) + story = models.TextField() + guideline = models.TextField(blank=True) + law = models.TextField(blank=True) + theatre = models.TextField(blank=True, help_text="Spotlight on Theatre text") + tags = TagField(blank=True, help_text="Enter as many tags as you like, separated by commas.") + + def __unicode__(self): + return self.title diff --git a/itf/bestpractices/tests.py b/itf/bestpractices/tests.py new file mode 100644 index 0000000..2247054 --- /dev/null +++ b/itf/bestpractices/tests.py @@ -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 +"""} + diff --git a/itf/bestpractices/views.py b/itf/bestpractices/views.py new file mode 100644 index 0000000..60f00ef --- /dev/null +++ b/itf/bestpractices/views.py @@ -0,0 +1 @@ +# Create your views here.