testing interface, more work on backend

This commit is contained in:
j 2009-10-05 00:00:08 +02:00
commit 88c5c3d9ac
20 changed files with 1883 additions and 311 deletions

0
app/__init__.py Normal file
View file

3
app/models.py Normal file
View file

@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

23
app/tests.py Normal file
View 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
"""}

10
app/views.py Normal file
View file

@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404
from django.template import RequestContext
def index(request):
context = RequestContext(request, {})
return render_to_response('index.html', context)