Django FormWizard 和视图
基本上,我只是想能够获取参数community_name,这可以通过
(r'^(?P<community_name>\w+)/matches/submit/$', MatchWizard([MatchStep1Form, MatchStep2Form, MatchStep3Form])),
还是我需要一个视图来完成? 如果我有一个视图,我可以像这样使用 URLConf
(r'^(?P<community_name>\w+)/matches/submit/$', "matches.views.submit_form"),
并执行正常的视图过程, def Submit_form(request, Community_name):
有什么想法吗?谢谢
Basically, I just want to be able to get the parameter community_name, can this be done with
(r'^(?P<community_name>\w+)/matches/submit/
or do I need a view?
If I have a view, I can have the URLConf like
(r'^(?P<community_name>\w+)/matches/submit/
and do the normal view procedure, def submit_form(request, community_name):
Any idea? Thanks
, MatchWizard([MatchStep1Form, MatchStep2Form, MatchStep3Form])),
or do I need a view?
If I have a view, I can have the URLConf like
and do the normal view procedure, def submit_form(request, community_name):
Any idea? Thanks
, "matches.views.submit_form"),
and do the normal view procedure, def submit_form(request, community_name):
Any idea? Thanks
, MatchWizard([MatchStep1Form, MatchStep2Form, MatchStep3Form])),or do I need a view?
If I have a view, I can have the URLConf like
and do the normal view procedure, def submit_form(request, community_name):
Any idea? Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发布我发现的解决方案。查看
FormWizard
的源代码后,我注意到变量community_name可以在parse_params
的kwargs
处找到posting the solution I found out. After taking a look at the source code of
FormWizard
, I noticed the variable community_name is available atkwargs
ofparse_params