# Path: gap/template.py
# def get_template(template_path):
#     return JINJA_ENVIRONMENT.get_template(template_path)


from utils.decorators import as_view
from gap.template import get_template
from StringIO import StringIO
    from gap.conf import settings
        from routes import routes


@as_view
def welcome_screen(request, response):
    return get_template("homepage.html").render({
        'project_name': 'Example project',
    })


@as_view
def not_found(request, response, *args, **kwargs):
    response.set_status(404)
    text = 'The page you are requesting was not found on this server.'

    if settings['DEBUG']:
        buffer = StringIO()
        dump_routes(buffer)
        buffer.seek(0)
        return text + '<br>The known rotes are...<br><pre>' + buffer.read() + '</pre>'

# Path: gap/template.py
# def get_template(template_path):
#     return JINJA_ENVIRONMENT.get_template(template_path)


# Path: gap/views.py
from utils.decorators import as_view
from gap.template import get_template
from StringIO import StringIO
    from gap.conf import settings
        from routes import routes



@as_view
def welcome_screen(request, response):
    return get_template("homepage.html").render({
        'project_name': 'Example project',
    })


@as_view
def not_found(request, response, *args, **kwargs):
    response.set_status(404)
    text = 'The page you are requesting was not found on this server.'

    if settings['DEBUG']:
        buffer = StringIO()
        dump_routes(buffer)
        buffer.seek(0)
        return text + '<br>The known rotes are...<br><pre>' + buffer.read() + '</pre>'

    else: