summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-04-23 15:03:23 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-04-23 15:03:23 -0400
commit4ddc952c7720e95a6ec74dcded14cc403585ceab (patch)
tree79e02937f3a55591f44f2416e4d6077267cf7924
parentdfc054126b834df116522993f4a5bbd7837111eb (diff)
introduce BRANDING_SLUG for releng
-rw-r--r--README.BRANDING2
-rw-r--r--releng/models.py4
-rw-r--r--releng/views.py2
-rw-r--r--settings.py1
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 5ee2f325..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/archlinux-%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', "archlinux-%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 ca0a7dd2..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 = 'archlinux-%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 0bdc3162..dda8f74a 100644
--- a/settings.py
+++ b/settings.py
@@ -187,6 +187,7 @@ DOMAIN_RE = r'^(.+\.)?archlinux.org$'
BRANDING_APPNAME = 'archweb'
BRANDING_DISTRONAME = 'Arch Linux'
BRANDING_SHORTNAME = 'Arch'
+BRANDING_SLUG = 'archlinux'
BRANDING_WIKINAME = 'ArchWiki'
BRANDING_EMAIL = 'Arch Website Notification <nobody@archlinux.org>'
BRANDING_OSEARCH_TAGS = 'linux archlinux package software'