@app.route('/move/<name:string>', methods=['POST', 'GET'])
async def wiki_move(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_get = (await db.execute('select data from doc where title = ? ', [name]))
    data_get = (await data_get.fetchall())
    if (request.method == 'POST'):
        change_name = request.form.get('wiki_move_textbox_1', '')
        send = request.form.get('wiki_move_textbox_2', '')
        (await db.execute('update doc set title = ? where title = ?', [change_name, name]))
        (await db.execute('update doc_his set title = ? where title = ?', [change_name, name]))
        (await db.commit())
        (await history_add(change_name, '', (await date_time()), (await user_name(request)), send, '0'))
        return response.redirect(('/w/' + change_name))
    if data_get:
        return jinja.render('index.html', request, wiki_set=(await wiki_set(request, name)), data=(('\n                <form method="post">\n                    <input type="text" value="' + name) + '" class="wiki_textbox" name="wiki_move_textbox_1">\n                    <hr class="wiki_hr">\n                    <input type="text" placeholder="요약" class="wiki_textbox" name="wiki_move_textbox_2">\n                    <hr class="wiki_hr">\n                    <button type="submit" class="wiki_button" name="wiki_move_button_1">확인</button>\n                </form>\n            '), title=name, sub='이동', menu=[[('w/' + name), '문서']])
    else:
        return response.redirect('/error/')
@app.route('/move/<name:string>', methods=['POST', 'GET'])
async def wiki_move(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_get = (await db.execute('select data from doc where title = ? ', [name]))
    data_get = (await data_get.fetchall())
    if (request.method == 'POST'):
        change_name = request.form.get('wiki_move_textbox_1', )
        send = request.form.get('wiki_move_textbox_2', )
        (await db.execute('update doc set title = ? where title = ?', [change_name, name]))
        (await db.execute('update doc_his set title = ? where title = ?', [change_name, name]))
        (await db.commit())
        (await history_add(change_name, , (await date_time()), (await user_name(request)), send, '0'))
        return response.redirect(('/w/' + change_name))
    if data_get:
        return jinja.render('index.html', request, wiki_set=(await wiki_set(request, name)), data=(('\n                <form method="post">\n                    <input type="text" value="' + name) + '" class="wiki_textbox" name="wiki_move_textbox_1">\n                    <hr class="wiki_hr">\n                    <input type="text" placeholder="요약" class="wiki_textbox" name="wiki_move_textbox_2">\n                    <hr class="wiki_hr">\n                    <button type="submit" class="wiki_button" name="wiki_move_button_1">확인</button>\n                </form>\n            '), title=name, sub='이동', menu=[[('w/' + name), '문서']])
    else:
        return response.redirect('/error/')