43:d9569e15bcc3
Anton Shestakov <av6@dwimlabs.net>, 2015-09-27
viewer: compute a weak entity tag from db and repo mtime This saves running a subprocess with hg -Tjson and rendering pages when there weren't any updates to the testhg repo or to the database. Maybe ETag is not the perfect place for this (Last-Modified?), but it works.

previous change 1:cb057921cd8c

settings.py

Permissions: -rw-r--r--

Other formats: Feeds:
0
0:3ddb9df55b5d update and deployment scripts
Anton Shestakov <engored@ya.ru>
previous changes:
line | diff
import os
0:3ddb9df55b5d update and deployment scripts
Anton Shestakov <engored@ya.ru>
previous changes:
line | diff
0:3ddb9df55b5d update and deployment scripts
Anton Shestakov <engored@ya.ru>
previous changes:
line | diff
0:3ddb9df55b5d update and deployment scripts
Anton Shestakov <engored@ya.ru>
previous changes:
line | diff
os.environ['HGPLAIN'] = '1'
0:3ddb9df55b5d update and deployment scripts
Anton Shestakov <engored@ya.ru>
previous changes:
line | diff
0:3ddb9df55b5d update and deployment scripts
Anton Shestakov <engored@ya.ru>
previous changes:
line | diff
0:3ddb9df55b5d update and deployment scripts
Anton Shestakov <engored@ya.ru>
previous changes:
line | diff
rel = lambda *x: os.path.abspath(os.path.join(os.path.dirname(__file__), *x))
0:3ddb9df55b5d update and deployment scripts
Anton Shestakov <engored@ya.ru>
previous changes:
line | diff
0:3ddb9df55b5d update and deployment scripts
Anton Shestakov <engored@ya.ru>
previous changes:
line | diff
0:3ddb9df55b5d update and deployment scripts
Anton Shestakov <engored@ya.ru>
previous changes:
line | diff
DBPATH = rel('data', 'db.sqlite')
0:3ddb9df55b5d update and deployment scripts
Anton Shestakov <engored@ya.ru>
previous changes:
line | diff
HG = rel('data', 'newesthg', 'hg')
0:3ddb9df55b5d update and deployment scripts
Anton Shestakov <engored@ya.ru>
previous changes:
line | diff
LOCKFILE = rel('data', 'bench.lock')
0:3ddb9df55b5d update and deployment scripts
Anton Shestakov <engored@ya.ru>
previous changes:
line | diff
TESTHGREPO = rel('data', 'testhg')
0:3ddb9df55b5d update and deployment scripts
Anton Shestakov <engored@ya.ru>
previous changes:
line | diff
TESTREPO = rel('data', 'testrepo')
1
1:cb057921cd8c viewer webapp
Anton Shestakov <engored@ya.ru>
previous changes: 0:3ddb9df55b5d
line | diff
1:cb057921cd8c viewer webapp
Anton Shestakov <engored@ya.ru>
previous changes: 0:3ddb9df55b5d
line | diff
# webapp templates
1:cb057921cd8c viewer webapp
Anton Shestakov <engored@ya.ru>
previous changes: 0:3ddb9df55b5d
line | diff
TEMPLATES = rel('templates')