例如,在我的web应用程序中,我有一个网址www.example.com/profile?name=name的链接。当我单击该链接时,我将得到一个页面,在该页面中,我可以更改配置文件的信息,但是在单击该链接后,入口栏中的url将变成www.example.com/profile&name=name。
更有趣的是:当我做一些更改并单击SAVE - url返回到www.example.com/profile?name=name。
如果不单击“保存”,只需刷新页面,就会得到错误404。
怎么可能呢?
P.S .我的视图函数
@check_document_access_permission()
def notebook(request, is_embeddable=False):
if not SHOW_NOTEBOOKS.get():
return serve_403_error(request)
notebook_id = request.GET.get('notebook', request.GET.get('editor'))
is_yarn_mode = False
try:
from spark.conf import LIVY_SERVER_SESSION_KIND
is_yarn_mode = LIVY_SERVER_SESSION_KIND.get()
except:
LOG.exception('Spark is not enabled')
return render('notebook.mako', request, {
'editor_id': notebook_id or None,
'notebooks_json': '{}',
'is_embeddable': request.GET.get('is_embeddable', False),
'options_json': json.dumps({
'languages': get_ordered_interpreters(request.user),
'session_properties': SparkApi.get_properties(),
'is_optimizer_enabled': has_optimizer(),
'is_navigator_enabled': has_navigator(request.user),
'editor_type': 'notebook'
}),
'is_yarn_mode': is_yarn_mode,
})发布于 2017-11-17 08:20:17
我发现了错误。
在前端是JS函数,它错误地更改了url。
https://stackoverflow.com/questions/47331551
复制相似问题