diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-21 02:49:16 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-21 02:49:16 -0400 |
commit | a22557811a24b68ef85d4271787c48d8d1e4fc99 (patch) | |
tree | a93ddda92409a6229b5bf38eadff6f9685602d7f | |
parent | 8ff271216f421594970631eec1ba156a8a35e561 (diff) |
catch a few more instances of archlinux
-rw-r--r-- | README.BRANDING | 7 | ||||
-rw-r--r-- | devel/forms.py | 3 | ||||
-rw-r--r-- | devel/utils.py | 4 | ||||
-rw-r--r-- | feeds.py | 2 | ||||
-rw-r--r-- | settings.py | 2 | ||||
-rw-r--r-- | templates/news/list.html | 2 | ||||
-rw-r--r-- | templates/packages/removed.html | 2 | ||||
-rw-r--r-- | templates/packages/search.html | 2 | ||||
-rw-r--r-- | templates/public/developer_list.html | 2 | ||||
-rw-r--r-- | templates/public/download.html | 2 | ||||
-rw-r--r-- | templates/releng/release_detail.html | 2 | ||||
-rw-r--r-- | templates/releng/release_list.html | 4 |
12 files changed, 22 insertions, 12 deletions
diff --git a/README.BRANDING b/README.BRANDING index 00d2d1b0..e438ccc1 100644 --- a/README.BRANDING +++ b/README.BRANDING @@ -25,6 +25,9 @@ Files with minor Arch stuff that's just easier to patch `templates/packages/flag.html` * link to "arch-general" mailing list +`templates/packages/removed.html` + * link to AUR + `templates/packages/search.html` * link to AUR @@ -32,6 +35,10 @@ Files with minor Arch stuff that's just easier to patch * links to AUR * links to feeds on `bugs.archlinux.org` +`urls.py` +`releng/views.py` +`releng/models.py` + Files with a significant amount of Arch-specific content: --------------------------------------------------------- diff --git a/devel/forms.py b/devel/forms.py index 861a576c..7f7c281e 100644 --- a/devel/forms.py +++ b/devel/forms.py @@ -2,6 +2,7 @@ import random from string import ascii_letters, digits from django import forms +from django.conf import settings from django.contrib.auth.models import User, Group from django.contrib.sites.models import Site from django.core.mail import send_mail @@ -92,7 +93,7 @@ class NewUserForm(forms.ModelForm): send_mail("Your new archweb account", template.render(ctx), - 'Arch Website Notification <nobody@archlinux.org>', + settings.BRANDING_EMAIL, [user.email], fail_silently=False) diff --git a/devel/utils.py b/devel/utils.py index 340841f5..7dd64972 100644 --- a/devel/utils.py +++ b/devel/utils.py @@ -1,5 +1,6 @@ import re +from django.conf import settings from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from django.db import connection @@ -74,9 +75,8 @@ class UserFinder(object): if email and '@' in email: # split email addr at '@' symbol, ensure domain matches # or is a subdomain of archlinux.org - # TODO: configurable domain/regex somewhere? username, domain = email.split('@', 1) - if re.match(r'^(.+\.)?archlinux.org$', domain): + if re.match(settings.DOMAIN_RE, domain): return User.objects.get(username=username) return None @@ -160,7 +160,7 @@ class NewsFeed(Feed): class ReleaseFeed(Feed): feed_type = GuidNotPermalinkFeed - title = 'Arch Linux: Releases' + title = settings.BRANDING_DISTRONAME+': Releases' link = '/download/' description = 'Release ISOs' subtitle = description diff --git a/settings.py b/settings.py index 49ef1898..1cb85fc1 100644 --- a/settings.py +++ b/settings.py @@ -177,6 +177,8 @@ TORRENT_TRACKERS = ( 'http://tracker.archlinux.org:6969/announce', ) +DOMAIN_RE = r'^(.+\.)?archlinux.org$' + BRANDING_APPNAME = 'archweb' BRANDING_DISTRONAME = 'Arch Linux' BRANDING_SHORTNAME = 'Arch' diff --git a/templates/news/list.html b/templates/news/list.html index 0ddf3b5e..3cd460ae 100644 --- a/templates/news/list.html +++ b/templates/news/list.html @@ -2,7 +2,7 @@ {% block title %}{{ BRANDING_DISTRONAME }} - News{% endblock %} {% block head %} -<link rel="alternate" type="application/rss+xml" title="Arch Linux News Updates" href="/feeds/news/" /> +<link rel="alternate" type="application/rss+xml" title="{{BRANDING_DISTRONAME}} News Updates" href="/feeds/news/" /> {% endblock %} {% block content %} diff --git a/templates/packages/removed.html b/templates/packages/removed.html index f188b6db..2d730130 100644 --- a/templates/packages/removed.html +++ b/templates/packages/removed.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load package_extras %} -{% block title %}Arch Linux - Not Available - {{ name }} {{ version }} ({{ arch.name }}){% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Not Available - {{ name }} {{ version }} ({{ arch.name }}){% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block content %} diff --git a/templates/packages/search.html b/templates/packages/search.html index b5b08268..e1be4256 100644 --- a/templates/packages/search.html +++ b/templates/packages/search.html @@ -6,7 +6,7 @@ {% block head %} {% if is_paginated and page_obj.number > 1 %}<meta name="robots" content="noindex, nofollow"/>{% endif %} -<link rel="alternate" type="application/rss+xml" title="Arch Linux Package Updates" href="/feeds/packages/" /> +<link rel="alternate" type="application/rss+xml" title="{{BRANDING_DISTRONAME}} Package Updates" href="/feeds/packages/" /> {% endblock %} {% block content %} diff --git a/templates/public/developer_list.html b/templates/public/developer_list.html index 4401d97b..15a6c8bb 100644 --- a/templates/public/developer_list.html +++ b/templates/public/developer_list.html @@ -23,7 +23,7 @@ <meta itemprop="familyName" content="{{ dev.last_name|escape }}"/> <meta itemprop="jobTitle" content="{{ user_title|escape }}"/> <div style="display:none" itemprop="memberOf" itemscope itemtype="http://schema.org/Organization"> - <meta itemprop="name" content="Arch Linux"/> + <meta itemprop="name" content="{{ BRANDING_DISTRONAME }}"/> </div> <h3>{{ dev.get_full_name }}{% if prof.latin_name %} ({{ prof.latin_name}}){% endif %} <a class="headerlink" name="{{ dev.username }}" id="{{ dev.username }}" href="#{{ dev.username }}" title="Permalink">ΒΆ</a></h3> diff --git a/templates/public/download.html b/templates/public/download.html index 01e46f66..274d6cfd 100644 --- a/templates/public/download.html +++ b/templates/public/download.html @@ -29,7 +29,7 @@ {% if release.version %}<li><strong>Current Release:</strong> {{ release.version }}</li>{% endif %} {% if release.kernel_version %}<li><strong>Included Kernel:</strong> {{ release.kernel_version }}</li>{% endif %} {% if release.file_size %}<li><strong>ISO Size:</strong> {{ release.file_size|filesizeformat }}</li>{% endif %} - <li><a href="https://wiki.archlinux.org/index.php/Installation_Guide">Installation Guide</a></li> + <li><a href="{% wiki_url 'Installation_Guide' %}">Installation Guide</a></li> <li><strong>Resources:</strong> <ul> <li><a href="https://bugs.archlinux.org/index.php?project=6" diff --git a/templates/releng/release_detail.html b/templates/releng/release_detail.html index 09507536..547f82b8 100644 --- a/templates/releng/release_detail.html +++ b/templates/releng/release_detail.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block title %}Arch Linux - Release: {{ release.version }}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Release: {{ release.version }}{% endblock %} {% block content %} <div class="release box"> diff --git a/templates/releng/release_list.html b/templates/releng/release_list.html index 7197cc8d..eb6f1d2c 100644 --- a/templates/releng/release_list.html +++ b/templates/releng/release_list.html @@ -1,10 +1,10 @@ {% extends "base.html" %} {% load static from staticfiles %} -{% block title %}Arch Linux - Releases{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Releases{% endblock %} {% block head %} -<link rel="alternate" type="application/rss+xml" title="Arch Linux News Updates" href="/feeds/releases/" /> +<link rel="alternate" type="application/rss+xml" title="{{BRANDING_DISTRONAME}} News Updates" href="/feeds/releases/" /> {% endblock %} {% block content %} |