Skip to content

Instantly share code, notes, and snippets.

@marcgibbons
Created May 16, 2013 18:53
Show Gist options
  • Save marcgibbons/5594120 to your computer and use it in GitHub Desktop.
Save marcgibbons/5594120 to your computer and use it in GitHub Desktop.
Model example
class Cigar(models.Model):
name = models.CharField(max_length=25)
colour = models.CharField(max_length=30)
gauge = models.IntegerField()
length = models.IntegerField()
price = models.DecimalField(decimal_places=2, max_digits=5)
notes = models.TextField()
manufacturer = models.ForeignKey('Manufacturer')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment