Skip to content

Instantly share code, notes, and snippets.

View lizadaly's full-sized avatar

Liza Daly lizadaly

View GitHub Profile
>>> # I'm going to set the variable 'items' first just for this demo
>>> items = 0
>>> if items > 5:
... print "Shipping is free" # This is going to cause a problem because it's not indented
File "<stdin>", line 2
print "Shipping is free"
^
IndentationError: expected an indented block
>>> # Oops, I wanted to indent that second line!
class LibraryItem(models.Model):
owner = models.ForeignKey(Member)
class Status(models.Model):
name = models.CharField(max_length=50)
class ItemStatus(models.Model):
item = models.ForeignKey(LibraryItem)
status = models.ForeignKey(Status)