diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-23 14:54:14 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-23 14:54:14 -0400 |
commit | 141581458bd5fe787652478e533f687c23227568 (patch) | |
tree | a8fcb2afbb8ccbf886a44fe03736d21362eecb30 | |
parent | f524897389bb113fa16beb52ab01a9c85a1cbd78 (diff) |
introduce BRANDING_SLUG for releng
-rw-r--r-- | README.BRANDING | 2 | ||||
-rw-r--r-- | releng/models.py | 4 | ||||
-rw-r--r-- | releng/views.py | 2 | ||||
-rw-r--r-- | settings.py | 1 |
4 files changed, 4 insertions, 5 deletions
diff --git a/README.BRANDING b/README.BRANDING index 37180c4b..a3855f77 100644 --- a/README.BRANDING +++ b/README.BRANDING @@ -26,8 +26,6 @@ Files with minor Arch stuff that's just easier to patch * link to AUR `urls.py` -`releng/views.py` -`releng/models.py` Files with a significant amount of Arch-specific content: --------------------------------------------------------- diff --git a/releng/models.py b/releng/models.py index a7d3c337..47803a36 100644 --- a/releng/models.py +++ b/releng/models.py @@ -142,11 +142,11 @@ class Release(models.Model): return "iso/%s/" % self.version def iso_url(self): - return "iso/%s/parabola-%s-dual.iso" % (self.version, self.version) + return "iso/%s/%s-%s-dual.iso" % (self.version, settings.BRANDING_SLUG, self.version) def magnet_uri(self): query = [ - ('dn', "parabola-%s-dual.iso" % self.version), + ('dn', "%s-%s-dual.iso" % (settings.BRANDING_SLUG, self.version)), ] if settings.TORRENT_TRACKERS: query.extend(('tr', uri) for uri in settings.TORRENT_TRACKERS) diff --git a/releng/views.py b/releng/views.py index 37f19273..bc7ddb34 100644 --- a/releng/views.py +++ b/releng/views.py @@ -234,7 +234,7 @@ def release_torrent(request, version): data = b64decode(release.torrent_data.encode('utf-8')) response = HttpResponse(data, content_type='application/x-bittorrent') # TODO: this is duplicated from Release.iso_url() - filename = 'parabola-%s-dual.iso.torrent' % release.version + filename = '%s-%s-dual.iso.torrent' % (settings.BRANDING_SLUG, release.version) response['Content-Disposition'] = 'attachment; filename=%s' % filename return response diff --git a/settings.py b/settings.py index 54881f3d..a6be4610 100644 --- a/settings.py +++ b/settings.py @@ -189,6 +189,7 @@ DOMAIN_RE = r'^(.+\.)?parabolagnulinux.org$' BRANDING_APPNAME = 'parabolaweb' BRANDING_DISTRONAME = 'Parabola GNU/Linux-libre' BRANDING_SHORTNAME = 'Parabola' +BRANDING_SLUG = 'parabola' BRANDING_WIKINAME = 'ParabolaWiki' BRANDING_EMAIL = 'Parabola Website Notification <nobody@parabolagnulinux.org>' BRANDING_OSEARCH_TAGS = 'gnu linuxlibre parabola package software' |