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, 'pyramid.view.view_config', 'view_config', False, 'from pyramid.view import view_config\n'), (14, 'pyramid.view.view_config', 'view_config', False, 'from pyramid.view import view_config\n'), (7, 'os.path.dirname', 'os.path.dirname', False, 'import os\n'), (8, 'os.path.join', 'os.path.join', False, 'import os\n'), (16, 'os.path.dirname', 'os.path.dirname', False, 'import os\n'), (17, 'os.path.join', 'os.path.join', False, 'import os\n')]