summaryrefslogtreecommitdiffstats
path: root/main/models.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-08 10:50:55 -0500
committerDan McGee <dan@archlinux.org>2010-09-08 10:50:55 -0500
commit5c78ad746942cafa03ed4834eefac98832021558 (patch)
treea6989046fc294ac1f6b0b0d917e562adb26d7e33 /main/models.py
parente0bf193c555c2a07be2f37defb1270e9a1acb39c (diff)
downloadarchweb-5c78ad746942cafa03ed4834eefac98832021558.tar.gz
archweb-5c78ad746942cafa03ed4834eefac98832021558.zip
Add metadata to Arch table
Add a column flagging whether this architecture is agnostic (e.g. 'any') or not. This will remove the hardcoded name checks we have all over the place and replace it with a boolean. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main/models.py')
-rw-r--r--main/models.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/models.py b/main/models.py
index d357ef14..70ab4bd6 100644
--- a/main/models.py
+++ b/main/models.py
@@ -59,8 +59,12 @@ class Donor(models.Model):
class Arch(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField(max_length=255, unique=True)
+ agnostic = models.BooleanField(default=False,
+ help_text="Is this architecture non-platform specific?")
+
def __unicode__(self):
return self.name
+
class Meta:
db_table = 'arches'
ordering = ['name']
@@ -78,6 +82,7 @@ class Repo(models.Model):
def __unicode__(self):
return self.name
+
class Meta:
db_table = 'repos'
ordering = ['name']