django-formwizard

form wizard initial data for edit not loading properly in Django?

牧云@^-^@ 提交于 2019-12-02 10:19:43
I have a three page form-list coming out of a single model. I could save the model first time, but when I want to edit the model, only the first form shows the initial value, subsequent forms does not show the initial data. but when I print the initial_dict from views, I can see all the initial views correctly. I followed this blog on form wizard. Here is my model.py: class Item(models.Model): user=models.ForeignKey(User) price=models.DecimalField(max_digits=8,decimal_places=2) image=models.ImageField(upload_to="assets/", blank=True) description=models.TextField(blank=True) def __unicode__

FormWizard and FileFields (Django 1.4)

点点圈 提交于 2019-11-30 15:52:02
问题 My FormWizard (Django 1.4) allows the user to step back and forth until he completes the wizard. The wizard keeps all the values the user filled in and displays them in case the user goes back to a step he already completed. This works fine i.e. for CharField but does not work for FileFields. In case the user submits a file in a step containing a FileField and later goes back to this step, he has to upload a file again. Is there a way the user won't have to re-upload the file? Please note

FormWizard and FileFields (Django 1.4)

时光总嘲笑我的痴心妄想 提交于 2019-11-30 14:40:18
My FormWizard (Django 1.4) allows the user to step back and forth until he completes the wizard. The wizard keeps all the values the user filled in and displays them in case the user goes back to a step he already completed. This works fine i.e. for CharField but does not work for FileFields. In case the user submits a file in a step containing a FileField and later goes back to this step, he has to upload a file again. Is there a way the user won't have to re-upload the file? Please note that the form data have not yet been saved to the database. I recently run into the same problem, and

Django FormWizard Dynamically Alter form_list

佐手、 提交于 2019-11-30 10:37:10
I'm having some issues with the form wizard, that maybe someone can shed some light on. According docstring in the method process_step: I can "dynamically alter self.form_list". So, based on my project needs, I'm appending forms to the form_list. The forms I'm appending contain questions and answers: http://dpaste.com/hold/152201/ The issue is that when 2 people hit the formwizard at the same time, they start to see each others questions and answers. I guess I don't understand how process_step suggests I can dynamically alter the form_list, when by doing so I'm modifying the form list of

Django FormWizard how to change the form_list dynamically

喜欢而已 提交于 2019-11-30 07:30:08
I'm able to dynamically call one form related to the data I chose from the step ealier . But when I'm in the done method I can see the my form_list is remaining unchanged. here is what I did : def get_form_list(request, form_list=None): if form_list is None: form_list = [ProviderForm, DummyForm, ConsummerForm, DummyForm, \ ServicesDescriptionForm] return UserServiceWizard.as_view(form_list=form_list)(request) class UserServiceWizard(SessionWizardView): instance = None def __init__(self, **kwargs): self.form_list = kwargs.pop('form_list') return super(UserServiceWizard, self).__init__(**kwargs)

django wizard, using form and formset in the same step

﹥>﹥吖頭↗ 提交于 2019-11-30 04:06:27
问题 I have a scenario which I'm trying to plan to start coding and I'm thinking to use django wizard . My plan is to build a django wizard with two steps, the first simple but the second a bit more complicated. The second step will contain a form that will reshape based on value selected from the first step, which I can see myself doing. I already explored all the existing functionality and I think it can be done easily. The challenge I'm facing though, is that in the second step itself. I have a

Django FormWizard how to change the form_list dynamically

人走茶凉 提交于 2019-11-29 09:40:24
问题 I'm able to dynamically call one form related to the data I chose from the step ealier. But when I'm in the done method I can see the my form_list is remaining unchanged. here is what I did : def get_form_list(request, form_list=None): if form_list is None: form_list = [ProviderForm, DummyForm, ConsummerForm, DummyForm, \ ServicesDescriptionForm] return UserServiceWizard.as_view(form_list=form_list)(request) class UserServiceWizard(SessionWizardView): instance = None def __init__(self, *

overriding default templates of django-allauth

ぐ巨炮叔叔 提交于 2019-11-28 21:11:02
I used this social registration/signup library django allauth for a project of mine. How do i customize the default templates and forms to give a better look and feel? the latest version of all-auth on github has its templates outside, however the one on Pypi is not, all you need to do is clone the repo in your project directory and override the templates. As simple as that. Assuming you have set a project level templates directory using the TEMPLATE_DIRS setting like: TEMPLATE_DIRS = (os.path.join(PROJECT_DIR, 'templates'),) You should be able to copy all of the folders shown here into that

Dynamic number of Steps using Django Wizard

浪尽此生 提交于 2019-11-27 04:48:35
问题 Is possible that the steps of the wizard are dynamic? For example, the second step occur repeatedly n times? 回答1: 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),

overriding default templates of django-allauth

依然范特西╮ 提交于 2019-11-27 01:47:25
问题 I used this social registration/signup library django allauth for a project of mine. How do i customize the default templates and forms to give a better look and feel? 回答1: the latest version of all-auth on github has its templates outside, however the one on Pypi is not, all you need to do is clone the repo in your project directory and override the templates. As simple as that. 回答2: Assuming you have set a project level templates directory using the TEMPLATE_DIRS setting like: TEMPLATE_DIRS