from pyramid.view import view_config
import os


@view_config(route_name='faq', renderer='faq.mako')
def faq_view(request):
    dir_path = os.path.dirname(__file__)
    faq_file = os.path.join(dir_path, 'static/faq_with_indexes.html')
    with open(faq_file, 'r') as f:
        faq_page = f.read()
    return {'content': faq_page}


@view_config(route_name='conventions', renderer='conventions.mako')
def conventions_view(request):
    dir_path = os.path.dirname(__file__)
    conventions_file = os.path.join(dir_path, 'static/conventions.html')
    with open(conventions_file, 'r') as file:
        conventions_page = file.read().replace('\n', '')
    return {'content': conventions_page}

[((50, 100), 'pyramid.view.view_config', 'view_config', ([], {'route_name': '"""faq"""', 'renderer': '"""faq.mako"""'}), "(route_name='faq', renderer='faq.mako')\n", (61, 100), False, 'from pyramid.view import view_config\n'), ((334, 400), 'pyramid.view.view_config', 'view_config', ([], {'route_name': '"""conventions"""', 'renderer': '"""conventions.mako"""'}), "(route_name='conventions', renderer='conventions.mako')\n", (345, 400), False, 'from pyramid.view import view_config\n'), ((139, 164), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (154, 164), False, 'import os\n'), ((180, 234), 'os.path.join', 'os.path.join', (['dir_path', '"""static/faq_with_indexes.html"""'], {}), "(dir_path, 'static/faq_with_indexes.html')\n", (192, 234), False, 'import os\n'), ((447, 472), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (462, 472), False, 'import os\n'), ((496, 545), 'os.path.join', 'os.path.join', (['dir_path', '"""static/conventions.html"""'], {}), "(dir_path, 'static/conventions.html')\n", (508, 545), False, 'import os\n')]