summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-03-06 15:29:43 -0600
committerDan McGee <dan@archlinux.org>2010-03-06 15:29:43 -0600
commit05d0b8232e03ed223ab109d72d9cdf770818e2ed (patch)
treed65e0fc21d961a52e711cbdbefae58e6ee4e2e04
parent65990ccebebd0e7b8beab488a486ef4cab739271 (diff)
downloadarchweb-05d0b8232e03ed223ab109d72d9cdf770818e2ed.tar.gz
archweb-05d0b8232e03ed223ab109d72d9cdf770818e2ed.zip
Fix get_depends() method description
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--main/models.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/main/models.py b/main/models.py
index a214ad7e..b8ca28f2 100644
--- a/main/models.py
+++ b/main/models.py
@@ -61,14 +61,14 @@ TIER_CHOICES = (
class Mirror(models.Model):
name = models.CharField(max_length=255)
tier = models.SmallIntegerField(default=2, choices=TIER_CHOICES)
- upstream = models.ForeignKey('self', null=True, blank=True)
+ upstream = models.ForeignKey('self', null=True)
country = models.CharField(max_length=255, db_index=True)
admin_email = models.EmailField(max_length=255, blank=True)
public = models.BooleanField(default=True)
active = models.BooleanField(default=True)
isos = models.BooleanField(default=True)
- rsync_user = models.CharField(max_length=50, null=True, blank=True)
- rsync_password = models.CharField(max_length=50, null=True, blank=True)
+ rsync_user = models.CharField(max_length=50, null=True)
+ rsync_password = models.CharField(max_length=50, null=True)
notes = models.TextField(blank=True)
def __unicode__(self):
return self.name
@@ -226,13 +226,9 @@ class Package(models.Model):
def get_depends(self):
"""
- Returns a list of tuples(3).
-
- Each tuple in the list is one of:
- - (packageid, dependname, depend compare string) if a matching
- package is found.
- - (None, dependname, None) if no matching package is found, eg
- it is a virtual dep.
+ Returns a list of dicts. Each dict contains ('pkg' and 'dep').
+ If it represents a found package both vars will be available;
+ else pkg will be None if it is a 'virtual' dependency.
"""
# object level cache. Doesn't last long, but helps for items rendered
# twice in the same template.