mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-06 09:57:57 +00:00
Only get the current version for docs pages if we need it
This commit is contained in:
@ -24,11 +24,8 @@ from .forms import DocCommentForm
|
|||||||
@content_sources('style', "'unsafe-inline'")
|
@content_sources('style', "'unsafe-inline'")
|
||||||
def docpage(request, version, filename):
|
def docpage(request, version, filename):
|
||||||
loaddate = None
|
loaddate = None
|
||||||
# Get the current version both to map the /current/ url, and to later
|
|
||||||
# determine if we allow comments on this page.
|
|
||||||
currver = Version.objects.filter(current=True)[0].tree
|
|
||||||
if version == 'current':
|
if version == 'current':
|
||||||
ver = currver
|
ver = Version.objects.filter(current=True)[0].tree
|
||||||
elif version == 'devel':
|
elif version == 'devel':
|
||||||
ver = Decimal(0)
|
ver = Decimal(0)
|
||||||
loaddate = Version.objects.get(tree=Decimal(0)).docsloaded
|
loaddate = Version.objects.get(tree=Decimal(0)).docsloaded
|
||||||
|
Reference in New Issue
Block a user