diff options
-rw-r--r-- | devel/views.py | 5 | ||||
-rw-r--r-- | feeds.py | 9 | ||||
-rw-r--r-- | packages/management/commands/signoff_report.py | 3 | ||||
-rw-r--r-- | packages/views/flag.py | 2 | ||||
-rw-r--r-- | public/views.py | 6 | ||||
-rw-r--r-- | settings.py | 5 |
6 files changed, 19 insertions, 11 deletions
diff --git a/devel/views.py b/devel/views.py index d2ce65db..7be3dc17 100644 --- a/devel/views.py +++ b/devel/views.py @@ -6,6 +6,7 @@ from string import ascii_letters, digits import time from django import forms +from django.conf import settings from django.http import HttpResponseRedirect from django.contrib.auth.decorators import \ login_required, permission_required, user_passes_test @@ -319,9 +320,9 @@ class NewUserForm(forms.ModelForm): 'password': password, }) - send_mail("Your new archweb account", + send_mail("Your new "+settings.BRANDING_APPNAME+" account", template.render(ctx), - 'Arch Website Notification <nobody@archlinux.org>', + settings.BRANDING_EMAIL, [user.email], fail_silently=False) @@ -1,6 +1,7 @@ import hashlib import pytz +from django.conf import settings from django.contrib.sites.models import Site from django.contrib.syndication.views import Feed from django.db.models import Q @@ -68,7 +69,7 @@ class PackageFeed(Feed): return obj def title(self, obj): - s = 'Arch Linux: Recent package updates' + s = settings.BRANDING_DISTRONAME+': Recent package updates' if 'repo' in obj: s += ' (%s [%s])' % (obj['arch'].name, obj['repo'].name.lower()) elif 'arch' in obj: @@ -76,7 +77,7 @@ class PackageFeed(Feed): return s def description(self, obj): - s = 'Recently updated packages in the Arch Linux package repositories' + s = 'Recently updated packages in the '+settings.BRANDING_DISTRONAME+' package repositories' if 'arch' in obj: s += ' for the \'%s\' architecture' % obj['arch'].name.lower() if not obj['arch'].agnostic: @@ -117,9 +118,9 @@ def news_last_modified(request, *args, **kwargs): class NewsFeed(Feed): feed_type = GuidNotPermalinkFeed - title = 'Arch Linux: Recent news updates' + title = settings.BRANDING_DISTRONAME+': Recent news updates' link = '/news/' - description = 'The latest and greatest news from the Arch Linux distribution.' + description = 'The latest and greatest news from the '+settings.BRANDING_DISTRONAME+' distribution.' subtitle = description title_template = 'feeds/news_title.html' description_template = 'feeds/news_description.html' diff --git a/packages/management/commands/signoff_report.py b/packages/management/commands/signoff_report.py index ddf930db..498bb533 100644 --- a/packages/management/commands/signoff_report.py +++ b/packages/management/commands/signoff_report.py @@ -8,6 +8,7 @@ repository. Usage: ./manage.py signoff_report <email> <repository> """ +from django.conf import settings from django.core.mail import send_mail from django.core.urlresolvers import reverse from django.core.management.base import BaseCommand, CommandError @@ -120,7 +121,7 @@ def generate_report(email, repo_name): 'old_days': old_days, 'leaders': leaders, }) - from_addr = 'Arch Website Notification <nobody@archlinux.org>' + from_addr = settings.BRANDING_EMAIL send_mail(subject, t.render(c), from_addr, [email]) # vim: set ts=4 sw=4 et: diff --git a/packages/views/flag.py b/packages/views/flag.py index 0d2f9009..760bdd94 100644 --- a/packages/views/flag.py +++ b/packages/views/flag.py @@ -98,7 +98,7 @@ def flag(request, name, repo, arch): }) send_mail(subject, tmpl.render(ctx), - 'Arch Website Notification <nobody@archlinux.org>', + settings.BRANDING_EMAIL, toemail, fail_silently=True) diff --git a/public/views.py b/public/views.py index 3ea8f841..c2c42f5a 100644 --- a/public/views.py +++ b/public/views.py @@ -26,15 +26,15 @@ def index(request): USER_LISTS = { 'devs': { 'user_type': 'Developers', - 'description': "This is a list of the current Arch Linux Developers. They maintain the [core] and [extra] package repositories in addition to doing any other developer duties.", + 'description': "This is a list of the current "+settings.BRANDING_DISTRONAME+" Developers. They maintain the [core] and [extra] package repositories in addition to doing any other developer duties.", }, 'tus': { 'user_type': 'Trusted Users', - 'description': "Here are all your friendly Arch Linux Trusted Users who are in charge of the [community] repository.", + 'description': "Here are all your friendly "+settings.BRANDING_DISTRONAME+" Trusted Users who are in charge of the [community] repository.", }, 'fellows': { 'user_type': 'Fellows', - 'description': "Below you can find a list of ex-developers (aka project fellows). These folks helped make Arch what it is today. Thanks!", + 'description': "Below you can find a list of ex-developers (aka project fellows). These folks helped make "+settings.BRANDING_SHORTNAME+" what it is today. Thanks!", }, } diff --git a/settings.py b/settings.py index 52339c53..998eefbd 100644 --- a/settings.py +++ b/settings.py @@ -156,3 +156,8 @@ if DEBUG_TOOLBAR: INSTALLED_APPS = list(INSTALLED_APPS) + [ 'debug_toolbar' ] # vim: set ts=4 sw=4 et: + +BRANDING_APPNAME = 'archweb' +BRANDING_DISTRONAME = 'Arch Linux' +BRANDING_SHORTNAME = 'Arch' +BRANDING_EMAIL = 'Arch Website Notification <nobody@archlinux.org>' |