From eef1ee7051093b9f6e74ab5669af8c57983872d9 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 19 May 2012 16:32:17 -0500 Subject: Add RSS links to /news/ and /packages/ URLs These were available only from the home page, but it makes sense to advertise them on the corresponding index pages too. Signed-off-by: Dan McGee --- templates/news/list.html | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'templates/news/list.html') diff --git a/templates/news/list.html b/templates/news/list.html index a72a2dda..e85ceced 100644 --- a/templates/news/list.html +++ b/templates/news/list.html @@ -1,6 +1,10 @@ {% extends "base.html" %} {% block title %}Arch Linux - News{% endblock %} +{% block head %} + +{% endblock %} + {% block content %}
-- cgit v1.2.3-54-g00ecf From a22557811a24b68ef85d4271787c48d8d1e4fc99 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 21 Apr 2013 02:49:16 -0400 Subject: catch a few more instances of archlinux --- README.BRANDING | 7 +++++++ devel/forms.py | 3 ++- devel/utils.py | 4 ++-- feeds.py | 2 +- settings.py | 2 ++ templates/news/list.html | 2 +- templates/packages/removed.html | 2 +- templates/packages/search.html | 2 +- templates/public/developer_list.html | 2 +- templates/public/download.html | 2 +- templates/releng/release_detail.html | 2 +- templates/releng/release_list.html | 4 ++-- 12 files changed, 22 insertions(+), 12 deletions(-) (limited to 'templates/news/list.html') 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 @@ 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 @@ def save(self, commit=True): send_mail("Your new archweb account", template.render(ctx), - 'Arch Website Notification ', + 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 @@ def username_email(name, email): 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 diff --git a/feeds.py b/feeds.py index 9c103b8c..e96c2ca4 100644 --- a/feeds.py +++ b/feeds.py @@ -160,7 +160,7 @@ def item_author_name(self, item): 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 @@ '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 %} - + {% 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 %}{% endif %} - + {% 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 @@
- +

{{ dev.get_full_name }}{% if prof.latin_name %} ({{ prof.latin_name}}){% endif %} ΒΆ

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 @@

Release Info

{% if release.version %}
  • Current Release: {{ release.version }}
  • {% endif %} {% if release.kernel_version %}
  • Included Kernel: {{ release.kernel_version }}
  • {% endif %} {% if release.file_size %}
  • ISO Size: {{ release.file_size|filesizeformat }}
  • {% endif %} -
  • Installation Guide
  • +
  • Installation Guide
  • Resources: