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}

[((5, 1, 5, 51), 'pyramid.view.view_config', 'view_config', (), '', False, 'from pyramid.view import view_config\n'), ((14, 1, 14, 67), 'pyramid.view.view_config', 'view_config', (), '', False, 'from pyramid.view import view_config\n'), ((7, 15, 7, 40), 'os.path.dirname', 'os.path.dirname', ({(7, 31, 7, 39): '__file__'}, {}), '(__file__)', False, 'import os\n'), ((8, 15, 8, 69), 'os.path.join', 'os.path.join', ({(8, 28, 8, 36): 'dir_path', (8, 38, 8, 68): '"""static/faq_with_indexes.html"""'}, {}), "(dir_path, 'static/faq_with_indexes.html')", False, 'import os\n'), ((16, 15, 16, 40), 'os.path.dirname', 'os.path.dirname', ({(16, 31, 16, 39): '__file__'}, {}), '(__file__)', False, 'import os\n'), ((17, 23, 17, 72), 'os.path.join', 'os.path.join', ({(17, 36, 17, 44): 'dir_path', (17, 46, 17, 71): '"""static/conventions.html"""'}, {}), "(dir_path, 'static/conventions.html')", False, 'import os\n')]