You are writing a comment about Two-Faced Django Part 2: Models and Django Testing, here is a quick summary:

In the second part of this series we put together our models for this project, and also introduce the Django testing framework.


You are responding to this comment written by Amit Upadhyay on January 3rd 2008, 23:33.

In your updated setup method, you have lines like:

    wl = User(name="Will Larson")
    jb = User(name="Jack Bauer")
    bc = User(name="Bill Clinton")
    Poll(question="Did you vote for me?", creator=bc)
    Poll(question="Am I human?", creator=jb)
    Poll(question="Are you still reading?", creator=wl)

There is no .save() on them, so nothing will go to database. Will bite someone new coming to django, please use User.objects.create(...) instead of just User(...) and Poll.objects.create(...) instead of Poll(...).


Please be aware that comment forms go stale after one hour.





Comments may make use of LifeFlow MarkDown. Raw html will be escaped.


Quick Introduction to LifeFlow MarkDown Syntax

A highlighted code block:

@@ ruby
def a (b, c):
  b * c
end
@@

Other common languages work as well: scheme, python, java, html, etc.

Other markdown syntax:

 ### This is an h3 title
#### This is an h4 title
**this is bold**
*this is italics*

1. This is an
2. ordered list

* And an unordered
* list too

[this is a link](http://www.lethain.com/ "Lethain")