Permalink
Browse files

Fix config wire-up.

  • Loading branch information...
1 parent 2caaab9 commit fc5363b1e9045e2468f60f528d2431128a248932 @joeyespo committed Dec 1, 2012
Showing with 4 additions and 4 deletions.
  1. +3 −3 grip/renderer.py
  2. +1 −1 grip/server.py
View
@@ -1,8 +1,8 @@
-from .config import STYLE_URLS
from jinja2 import Environment, PackageLoader
import requests
+# Get jinja templates
env = Environment(loader=PackageLoader('grip', 'templates'))
index_template = env.get_template('index.html')
@@ -14,6 +14,6 @@ def render_content(text):
return r.text
-def render_page(text, filename=None):
+def render_page(text, filename=None, style_urls=[]):
"""Renders the specified markup text to an HTML page."""
- return index_template.render(content=render_content(text), filename=filename, style_urls=STYLE_URLS)
+ return index_template.render(content=render_content(text), filename=filename, style_urls=style_urls)
View
@@ -23,7 +23,7 @@ def serve(directory='.', readme_file='README', port=None):
# Views
@app.route('/')
def index():
- return render_page(read_file(filename), filename)
+ return render_page(read_file(filename), filename, app.config['STYLE_URLS'])
# Run local server
app.run(app.config['HOST'], app.config['PORT'], debug=app.config['DEBUG'], use_reloader=app.config['DEBUG_GRIP'])

0 comments on commit fc5363b

Please sign in to comment.