= models.IntegerField() from django.db import models class Band(models.Model): name = models.CharField(max_length=100) year_formed = models.IntegerField() def make_musical_awesome(self): # TODO: discover secret to success state
= models.CharField(max_length=100) year_formed = models.IntegerField() members = models.ManyToManyField("Musician") class Musician(models.Model): name = models.CharField(max_length=100)
year_formed = models.IntegerField() members = models.ManyToManyField("Musician") class Musician(models.Model): name = models.CharField(max_length=100) Band.objects.filter(members__name="Keith Moon")
request.GET foo=bar&blee=baz Form data request.POST <form method="POST"> Cookies request.COOKIES key=value HTTP headers request.META Content-type: text/html Logged-in user request.user.name Keyser Söze