Tuesday, March 31, 2015

Re: Multiple Django Forms

Hi Stephanie,

Maybe you are french ? I'm sorry, but I've no time to make a screencast video. But the django doc is very good and in multiple languages : french is available if you change /en/ > /fr/ in the doc url.

1/ For generic views : https://docs.djangoproject.com/en/1.7/topics/class-based-views/

2/ For formsets : https://docs.djangoproject.com/en/1.7/topics/forms/formsets/

3/ For templates, you'd better to get a custom base_form.html. I use this one :

https://gist.github.com/frague59/5c5450bf4d02643bc547

The code snippets depends on other templates, but they are not difficult to figure out.

Bye and good luck
François

Le lundi 30 mars 2015 19:43:50 UTC+2, Stephanie Socias a écrit :
Thank you for your suggestions!

Unfortunately, as I am verrrrry green at the moment, I nee more help to implement all of these new techniques. Given that what I'm trying to accomplish requires more extensive Django and javascript knowledge, is there anyone who would be willing to do a video screen share with me to help me out?? I can pay you!

Thank you,
Stephanie

On Monday, March 30, 2015 at 7:47:48 AM UTC-4, François GUÉRIN wrote:
1/ use generic views : ProcessFormView by example
2/ use prefixes in your forms with there name (it's a param in form cctor)
3/ in your template, use the <form>{%for form in forms %}{% form.as_p %}{%endfor %}<button type='submit'/></form> if you put your forms into a list form forms

Good coding !
 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f7f76f5b-e5ac-4040-8e50-9cc62f989fdd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment