Skip to content

Commit a192734

Browse files
author
Jason R. Coombs
committed
Restore jinja2 renderer
1 parent 575ff99 commit a192734

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

launch.py

+2
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,7 @@
4040
.format(host, port))
4141
website = website.Website(
4242
www_root='www',
43+
renderer_default='jinja2',
44+
project_root='.',
4345
)
4446
make_server(host, port, website).serve_forever()

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
pando
22
pymongo
3+
aspen-jinja2

www/index.html.spt

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
import os
22

3-
servers_txt = os.path.join(website.project_root, 'servers.txt')
3+
servers = sorted(os.environ.get('SERVERS', 'localhost').split())
44

55
[----]
66

7-
try:
8-
servers = open(servers_txt).read().splitlines()
9-
except IOError:
10-
servers = ['localhost']
11-
servers.sort()
12-
137
[----]
8+
149
{% extends "base.html" %}
1510
{% block content %}
1611
<table>

0 commit comments

Comments
 (0)