如何将新的 FormWizard 包装在视图中?

发布于 2024-12-21 08:54:03 字数 260 浏览 2 评论 0原文

使用新的 formwizard 工具(https://github.com/stephrdev/django-formwizard),如何将 Django 表单向导包装在视图中?而不是在 urls.py 中创建它。我需要这样做,以便我可以访问请求和其他内容。

有人有这方面的示例代码吗?

预先感谢,

问候。

Using the new formwizard tool (https://github.com/stephrdev/django-formwizard), How do I wrap the Django Form Wizard in a view? Instead of create it in the urls.py. I need to do this so I can access request and other stuff.

Does anyone have some example code for this?

Thanks in advance,

Greetings.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

雨夜星沙 2024-12-28 08:54:03

当前版本的 django-formwizard 基于 Django 的基于类的视图。

您可以通过重写向导子类中所需的方法并使用 self.request 来访问请求对象。

The current version of django-formwizard is based on Django's class based views.

You can access the request object by overriding the method you want in your wizard subclass and use self.request.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文