This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> # 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! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
NewerOlder