mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-03 15:38:59 +00:00

Contains basic functionality, and an import of most of the static content from the old site. There is still plenty more to do...
24 lines
609 B
Python
24 lines
609 B
Python
from django.contrib.syndication.feeds import Feed
|
|
|
|
from models import Version
|
|
|
|
from datetime import datetime, time
|
|
|
|
class VersionFeed(Feed):
|
|
title = "PostgreSQL latest versions"
|
|
link = "http://www.postgresql.org/"
|
|
description = "PostgreSQL latest versions"
|
|
|
|
description_template = 'core/version_rss_description.html'
|
|
title_template = 'core/version_rss_title.html'
|
|
|
|
def items(self):
|
|
return Version.objects.all()
|
|
|
|
def item_link(self, obj):
|
|
return "http://www.postgresql.org/docs/%s/static/%s" % (obj.tree, obj.relnotes)
|
|
|
|
def item_pubdate(self, obj):
|
|
return datetime.combine(obj.reldate,time.min)
|
|
|