
[英]Django Allauth executes request.POST on signup, but no redirect or email sent?
[英]Django Form: Redirect to the page which sent the post request
我曾经遇到过类似的问题,并且通过URL解决了。 假设您有两个页面foo和bar,我将以下内容添加到url中。
/(?P<source>(foo|bar))/
然后在页面foo / bar上将source ='foo'/'bar'添加到POST URL。 然后,您可以使用
if source == 'foo':
return redirect(reverse('foo'))
else:
return redirect(reverse('bar'))
在您看来。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.