Author: sevein Date: Mon Oct 11 05:22:21 2010 New Revision: 32 Log: Add some custom methods to Call class.
Modified: trunk/chk4upd/models.py Modified: trunk/chk4upd/models.py ============================================================================== --- trunk/chk4upd/models.py Sun Oct 10 08:24:53 2010 (r31) +++ trunk/chk4upd/models.py Mon Oct 11 05:22:21 2010 (r32) @@ -12,3 +12,11 @@ version_offered = models.CharField(max_length=8) created_at = models.DateTimeField(auto_now_add=True) check_method = models.CharField(max_length=128) + + def get_full_version(self): + return "%s %s (offered %s)" % (self.distribution, self.version, self.version_offered) + + def get_hostname(self): + from urlparse import urlparse + url = urlparse(self.address) + return url.netloc -- You received this message because you are subscribed to the Google Groups "Qubit Toolkit Commits" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/qubit-commits?hl=en.
