Django Book 翻译
菜单>:
TOC
返回
原文:
If the user successfully logs in, he or she will be redirected to ``/accounts/profile/`` by default. You can override this by providing a hidden field called ``next`` with the URL to redirect to after logging in. You can also pass this value as a ``GET`` parameter to the login view and it will be automatically added to the context as a variable called ``next`` that you can insert into that hidden field.
翻译:
如果用户登录成功,缺省会重定向到 ``/accounts/profile`` 。表单中有一个hidden字段叫 ``next`` ,可以用在登录后指定url。也可以把这个值(指定的url)作为 ``GET`` 参数传递给login视图,这个参数会成为Context中名为 ``next`` 的变量,你可以把这个变量设置给表单中对应的隐含字段。
备注:
译者: