X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Fpatchwork%2Fmodels.py;fp=apps%2Fpatchwork%2Fmodels.py;h=9129aabddbc7dae5e57bd03df03f3f0d9832356a;hb=5d0140ef04ababd93c45b5126ee1b412bd778da5;hp=86a5266cff2d2177f682c57e6fcea8897b616b66;hpb=627f5aca263da2513fe6d592becd3b505d97dd21;p=patchwork diff --git a/apps/patchwork/models.py b/apps/patchwork/models.py index 86a5266..9129aab 100644 --- a/apps/patchwork/models.py +++ b/apps/patchwork/models.py @@ -363,12 +363,19 @@ class Bundle(models.Model): return None site = Site.objects.get_current() return 'http://%s%s' % (site.domain, - reverse('patchwork.views.bundle.public', + reverse('patchwork.views.bundle.bundle', kwargs = { 'username': self.owner.username, 'bundlename': self.name })) + @models.permalink + def get_absolute_url(self): + return ('patchwork.views.bundle.bundle', (), { + 'username': self.owner.username, + 'bundlename': self.name, + }) + def mbox(self): return '\n'.join([p.mbox().as_string(True) for p in self.ordered_patches()])