mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-01 15:54:53 +00:00
Add concept of supported versions
Also, only index docs for supported versions...
This commit is contained in:
@ -10,6 +10,7 @@ class Version(models.Model):
|
||||
reldate = models.DateField(null=False, blank=False)
|
||||
relnotes = models.CharField(max_length=32, null=False, blank=False)
|
||||
current = models.BooleanField(null=False, blank=False, default=False)
|
||||
supported = models.BooleanField(null=False, blank=False, default=True)
|
||||
|
||||
def __unicode__(self):
|
||||
return self.versionstring
|
||||
|
@ -6,7 +6,7 @@ def get_struct():
|
||||
now = date.today()
|
||||
currentversion = Version.objects.get(current=True)
|
||||
|
||||
for d in DocPage.objects.all():
|
||||
for d in DocPage.objects.all().extra(where=['version in (select tree from core_version where supported)']):
|
||||
yield ('docs/%s/static/%s' % (d.version, d.file),
|
||||
None)
|
||||
#FIXME ^ do something smart with priorities on older
|
||||
|
Reference in New Issue
Block a user