@app.route('/raw/<name:string>')
async def wiki_raw(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')))
    args = RequestParameters()
    num = request.args.get('num', '1')
    raw_data = (await db.execute('select data from doc_his where id = ? and title = ?', [num, name]))
    raw_data = (await raw_data.fetchall())
    if raw_data:
        return jinja.render('index.html', request, wiki_set=(await wiki_set(request, 0)), data=(('<textarea class="wiki_textarea" id="wiki_textarea_raw_1" readonly>' + raw_data[0][0]) + '</textarea>'), title=name, sub=(('r' + num) + ' RAW'), menu=[[('w/' + name), '문서']])
    else:
        return response.redirect('/error/')
@app.route('/raw/<name:string>')
async def wiki_raw(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')))
    args = RequestParameters()
    num = request.args.get('num', '1')
    raw_data = (await db.execute('select data from doc_his where id = ? and title = ?', [num, name]))
    raw_data = (await raw_data.fetchall())
    if raw_data:
        return jinja.render('index.html', request, wiki_set=(await wiki_set(request, 0)), data=(('<textarea class="wiki_textarea" id="wiki_textarea_raw_1" readonly>' + raw_data[0][0]) + '</textarea>'), title=name, sub=(('r' + num) + ' RAW'), menu=[[('w/' + name), '문서']])
    else:
        return response.redirect('/error/')