Get the list of documentation versions out of the database

Instead of having to update this list manually in multiple places when
releasing new versions, just take the information out of the database
where it has to be anyway.

Fixes #90
Closes #93

Also make the code automatically pick up wich PDF files exist in the
static checkout, and auto-detect their size, both A4 and US sizes. This
removes yet one more manual step, yay!

Fixes #163
This commit is contained in:
Magnus Hagander
2013-08-17 17:28:36 +02:00
parent 8e458731cb
commit fdd1404f37
7 changed files with 69 additions and 229 deletions

View File

@ -27,6 +27,13 @@ class Version(PgModel, models.Model):
else:
return "%sbeta%s" % (self.tree, self.latestminor)
@property
def treestring(self):
if not self.beta:
return self.tree
else:
return "%s beta" % self.tree
def save(self):
# Make sure only one version at a time can be the current one.
# (there may be some small race conditions here, but the likelyhood