Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 31 lines (20 sloc) 0.685 kB
e428a00 @evildmp committing all files (I hope)
authored
1 from django.db import models
2
3 class Category(models.Model):
4 name = models.CharField(max_length=255)
5
6 class Meta:
7 verbose_name_plural = 'Categories'
8
8fa1af8 @ojii My stab at making the code style more consistent, and more PEP8 compl…
ojii authored
9 def __unicode__(self):
10 return self.name
11
e428a00 @evildmp committing all files (I hope)
authored
12 class SubCategory(models.Model):
13 category = models.ForeignKey('Category')
14 name = models.CharField(max_length=255)
15
16 class Meta:
17 verbose_name = 'Sub-Category'
18 verbose_name_plural = 'Sub-Categories'
19
8fa1af8 @ojii My stab at making the code style more consistent, and more PEP8 compl…
ojii authored
20 def __unicode__(self):
21 return self.name
22
e428a00 @evildmp committing all files (I hope)
authored
23
24 class Product(models.Model):
25 name = models.SlugField(max_length=255)
26 subcategory = models.ForeignKey(SubCategory)
8fa1af8 @ojii My stab at making the code style more consistent, and more PEP8 compl…
ojii authored
27
e428a00 @evildmp committing all files (I hope)
authored
28 def __unicode__(self):
29 return self.name.title()
30
Something went wrong with that request. Please try again.