# Path: render_utils.py
# def make_context(asset_depth=0):
#     """
#     Create a base-context for rendering views.
#     Includes app_config and JS/CSS includers.
# 
#     `asset_depth` indicates how far into the url hierarchy
#     the assets are hosted. If 0, then they are at the root.
#     If 1 then at /foo/, etc.
#     """
#     context = flatten_app_config()
# 
#     #context['COPY'] = copytext.Copy(app_config.COPY_PATH)
#     context['JS'] = JavascriptIncluder(asset_depth=asset_depth)
#     context['CSS'] = CSSIncluder(asset_depth=asset_depth)
# 
#     return context
# 
# def smarty_filter(s):
#     """
#     Filter to smartypants strings.
#     """
#     if type(s) == 'Markup':
#         s = s.unescape()
# 
#     # Evaulate COPY elements
#     if type(s) is not unicode:
#         s = unicode(s)
# 
#     s = s.encode('utf-8')
#     s = smartypants(s)
# 
#     return Markup(s)
# 
# def urlencode_filter(s):
#     """
#     Filter to urlencode strings.
#     """
#     if type(s) == 'Markup':
#         s = s.unescape()
# 
#     # Evaulate COPY elements
#     if type(s) is not unicode:
#         s = unicode(s)
# 
#     s = s.encode('utf8')
#     s = urllib.quote_plus(s)
# 
#     return Markup(s)


import json
import app_config
import static
from flask import Flask, make_response, render_template
from werkzeug.debug import DebuggedApplication
from render_utils import make_context, smarty_filter, urlencode_filter
#!/usr/bin/env python




app = Flask(__name__)
app.debug = app_config.DEBUG

app.add_template_filter(smarty_filter, name='smarty')

# Path: render_utils.py
# def make_context(asset_depth=0):
#     """
#     Create a base-context for rendering views.
#     Includes app_config and JS/CSS includers.
# 
#     `asset_depth` indicates how far into the url hierarchy
#     the assets are hosted. If 0, then they are at the root.
#     If 1 then at /foo/, etc.
#     """
#     context = flatten_app_config()
# 
#     #context['COPY'] = copytext.Copy(app_config.COPY_PATH)
#     context['JS'] = JavascriptIncluder(asset_depth=asset_depth)
#     context['CSS'] = CSSIncluder(asset_depth=asset_depth)
# 
#     return context
# 
# def smarty_filter(s):
#     """
#     Filter to smartypants strings.
#     """
#     if type(s) == 'Markup':
#         s = s.unescape()
# 
#     # Evaulate COPY elements
#     if type(s) is not unicode:
#         s = unicode(s)
# 
#     s = s.encode('utf-8')
#     s = smartypants(s)
# 
#     return Markup(s)
# 
# def urlencode_filter(s):
#     """
#     Filter to urlencode strings.
#     """
#     if type(s) == 'Markup':
#         s = s.unescape()
# 
#     # Evaulate COPY elements
#     if type(s) is not unicode:
#         s = unicode(s)
# 
#     s = s.encode('utf8')
#     s = urllib.quote_plus(s)
# 
#     return Markup(s)


# Path: app.py
import json
import app_config
import static
from flask import Flask, make_response, render_template
from werkzeug.debug import DebuggedApplication
from render_utils import make_context, smarty_filter, urlencode_filter

#!/usr/bin/env python




app = Flask(__name__)
app.debug = app_config.DEBUG

app.add_template_filter(smarty_filter, name='smarty')

app.add_template_filter(urlencode_filter, name='urlencode')