Commit 67e2b653 authored by eliott's avatar eliott
Browse files

Removed feeds from devsite

parent 8fcdf0c2
from django.contrib.syndication.feeds import Feed
from archweb_dev.packages.models import Package
from import News
#from datetime import datetime
class PackageFeed(Feed):
title = 'Recent Package Updates'
link = '/packages/'
description = 'Recent Package Updates'
def items(self):
return Package.objects.order_by('-last_update')[:10]
def item_pubdate(self, item):
return item.last_update
def item_categories(self, item):
return (,item.category.category)
class NewsFeed(Feed):
title = 'Recent News Updates'
link = '/news/'
description = 'Recent News Updates'
def items(self):
return News.objects.order_by('-postdate', '-id')[:10]
def item_pubdate(self, item):
return item.postdate
def item_author_name(self, item):
# vim: set ts=4 sw=4 et:
{% extends "base.html" %}
{% 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="Arch Linux Package Updates" href="/feeds/packages/" />
{% endblock %}
{% block content_left %}
<div id="about" class="box">
<h2>Welcome to Arch!</h2>
You've reached the website for <strong>Arch Linux</strong>, a lightweight
and flexible linux distribution that tries to Keep It Simple.
Currently we have official packages optimized for the i686 and x86-64
architectures. We complement our official package sets with a
<a href="">community-operated package repository</a>
that grows in size and quality each and every day.
Our strong community is diverse and helpful, and we pride ourselves on
the range of skillsets and uses for Arch that stem from it. Please
check out our <a href="">forums</a> and
<a href="">mailing lists</a>
to get your feet wet. Also glance through our <a href="">wiki</a>
if you want to learn more about Arch.
</p><p style="text-align: right">
<a href="/about/"><span style="font-size:x-small">Learn more...</span></a>
<br /><br />
<div style="float:right;position:relative;bottom:-25px">
<a href="/feeds/news/"><img src="/media/rss.png" alt="RSS Feed" /></a>
<h2 class="title">Latest News</h2>
{% for news in news_updates %}
......@@ -54,8 +24,7 @@ <h4 class="news"><a href="{{ news.get_absolute_url }}">{{ news.title }}</a></h4>
<div id="updates">
<table width="100%">
<td><h3>Recent Updates</h3></td>
<td style="vertical-align:top;text-align:right"><a href="/feeds/packages/"><img src="/media/rss.png" alt="RSS Feed" /></a></td>
<td colspan="2"><h3>Recent Updates</h3></td>
{% for pkg in pkg_updates %}
from django.conf.urls.defaults import *
from django.conf import settings
from import News
from archweb_dev.feeds import PackageFeed, NewsFeed
from django.views.decorators.cache import cache_page
feeds = {
'packages': PackageFeed,
'news': NewsFeed
urlpatterns = patterns('',
# Dynamic Stuff
(r'^packages/flag/(\d+)/$', 'archweb_dev.packages.views.flag'),
......@@ -45,9 +39,6 @@
(r'^wiki/index/$', ''),
(r'^wiki/$', ''),
# Feeds
(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),
# (mostly) Static Pages
(r'^$', 'archweb_dev.devel.views.siteindex'),
(r'^about/$', 'archweb_dev.devel.views.about'),
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment