使用Django向导的动态步数 [英] Dynamic number of Steps using Django Wizard

查看:102
本文介绍了使用Django向导的动态步数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能是向导的步骤是动态的吗?例如,第二步重复出现n次?

Is possible that the steps of the wizard are dynamic? For example, the second step occur repeatedly n times?

推荐答案

我有同样的问题,表单向导(即使在Django 1.4)刚刚没有为我工作。这是一个很自定义的东西,有些事情开始出错,调试很糟糕。

I had the same issue, and the form wizard (even in Django 1.4) just didn't work for me. It was so much customization that some things started to go wrong and debugging was awful.

我根据现有的分类编写了一些代码。请看我的主意,在那里我发布了一个非常适合我的解决方案。如果您有任何意见或建议(包括课程名称),请发贴。

I did write some code based on the existing clases. Please see my gists where I posted a solutions that worked great for me. If you have any comments or suggestions (including the name of the class), please post them.


  • 多页表单管理员,以动态路径(下一个形式取决于实际状态和用户输入)和表单数量(数学)图形排列。处理存储和验证。基于Django-1.4的 django.contrib.formtools.wizard.views.SessionWizardView
    https://gist.github.com/3098817

自定义Django SessionStorage。删除了处理文件的所有功能。基于Django-1.4的 django.contrib.formtools.wizard.storage.base.BaseStorage django.contrib.formtools.wizard.storage。 session.SessionStorage
https://gist.github.com/3080251

Custom Django SessionStorage. Removed all the functionality that dealt with files. Based on Django-1.4's django.contrib.formtools.wizard.storage.base.BaseStorageand django.contrib.formtools.wizard.storage.session.SessionStorage. https://gist.github.com/3080251

这篇关于使用Django向导的动态步数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆