@app.route('/w/<name:string>')
async def wiki_read(request, name):
    async with aiofiles.open('data/setting.json', encoding='utf8') as f:
        setting_data = json.loads((await f.read()))
        db = (await aiosqlite.connect((setting_data['db_name'] + '.db')))
    data = (await db.execute('select data from doc where title = ?', [name]))
    data = (await data.fetchall())
    if data:
        return jinja.render('index.html', request, wiki_set=(await wiki_set(request, name)), data=(await namumark(data[0][0])), title=name, sub=0, menu=[[('edit/' + name), '편집'], [('discuss/' + name), '토론'], [('backlink/' + name), '역링크'], [('history/' + name), '역사'], [('acl/' + name), 'ACL']])
    else:
        return jinja.render('index.html', request, wiki_set=(await wiki_set(request, name)), data='해당 문서를 찾을 수 없습니다.', title=name, sub=0, menu=[[('edit/' + name), '편집'], [('discuss/' + name), '토론'], [('backlink/' + name), '역링크'], [('history/' + name), '역사'], [('acl/' + name), 'ACL']])
@app.route('/w/<name:string>')
async def wiki_read(request, name):
    async with aiofiles.open('data/setting.json', encoding='utf8') as f:
        setting_data = json.loads((await f.read()))
        db = (await aiosqlite.connect((setting_data['db_name'] + '.db')))
    data = (await db.execute('select data from doc where title = ?', [name]))
    data = (await data.fetchall())
    if data:
        return jinja.render('index.html', request, wiki_set=(await wiki_set(request, name)), data=(await namumark(data[0][0])), title=name, sub=0, menu=[[('edit/' + name), '편집'], [('discuss/' + name), '토론'], [('backlink/' + name), '역링크'], [('history/' + name), '역사'], [('acl/' + name), 'ACL']])
    else:
        return jinja.render('index.html', request, wiki_set=(await wiki_set(request, name)), data='해당 문서를 찾을 수 없습니다.', title=name, sub=0, menu=[[('edit/' + name), '편집'], [('discuss/' + name), '토론'], [('backlink/' + name), '역링크'], [('history/' + name), '역사'], [('acl/' + name), 'ACL']])