projects
/
pgweb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ab63a3
)
Add ordering of product categories
author
Magnus Hagander
<magnus@hagander.net>
Mon, 7 Nov 2011 20:29:47 +0000
(21:29 +0100)
committer
Magnus Hagander
<magnus@hagander.net>
Mon, 7 Nov 2011 20:29:47 +0000
(21:29 +0100)
pgweb/downloads/models.py
patch
|
blob
|
blame
|
history
diff --git
a/pgweb/downloads/models.py
b/pgweb/downloads/models.py
index 24946eb868b33fef27ff13f82184f19e35973dd2..b17963134d877dd803141dd0a53eea7c3ca9bc8b 100644
(file)
--- a/
pgweb/downloads/models.py
+++ b/
pgweb/downloads/models.py
@@
-63,12
+63,18
@@
class Category(models.Model):
def __unicode__(self):
return self.catname
+ class Meta:
+ ordering = ('catname',)
+
class LicenceType(models.Model):
typename = models.CharField(max_length=100, null=False, blank=False)
def __unicode__(self):
return self.typename
+ class Meta:
+ ordering = ('typename',)
+
class Product(PgModel, models.Model):
name = models.CharField(max_length=100, null=False, blank=False, unique=True)
approved = models.BooleanField(null=False, default=False)