mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-03 15:38:59 +00:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user