Use a proper database field for beta releases

This replaces the previous ugly hack where beta versions had a negative number
as latestminor, giving a much cleaner model.

Requires SQL:
ALTER TABLE core_version ADD COLUMN beta boolean NOT NULL DEFAULT 'f';
ALTER TABLE core_version ALTER COLUMN beta DROP DEFAULT;

(Yes, we really need to move to something that can do automatic migrations)
This commit is contained in:
Magnus Hagander
2013-08-17 15:35:42 +02:00
parent 8fc39d7359
commit 8be717d99d
5 changed files with 18 additions and 7 deletions

View File

@ -13,7 +13,7 @@ class VersionFeed(Feed):
title_template = 'core/version_rss_title.html'
def items(self):
return Version.objects.filter(tree__gt=0).filter(latestminor__gte=0)
return Version.objects.filter(tree__gt=0).filter(beta=False)
def item_link(self, obj):
return "http://www.postgresql.org/docs/%s/static/%s" % (obj.tree, obj.relnotes)