Thank you for the answers. The link provided by George is an excellent resource and I should thank him for that.
However my task is a bit simpler. Let's say I own a car company and I have dealers in various cities. By clicking on each city name I get a list of cars this city's dealer sells. This list varies from city to city. Also, this list comes as a form where I (as the car company owner) need to write the minimum and maximum selling price for each car and submit it. It is a hypothetical scenario, but my project deals with a very similar problem. in this example is the django's form class approach "better" than the "classic" one (i.e. the one where I use a {% for car in citycars %} loop and attach a car.id and the dealer.id to each input field and process accordingly in the view)? I am new to django, so bear with me if I ask something trivial. Thanks for your time, Chris On 23 Απρ, 11:46, George Sakkis <george.sak...@gmail.com> wrote: > On Apr 23, 9:52 am, xpanta <xpa...@gmail.com> wrote: > > > Hi, > > > I wanted to ask if I am somehow "obliged" to use the form class > > provided by Django framework. I can see its use on "static" forms (eg. > > registration forms or account forms) but most of the forms I write are > > "dynamic" (forms that are dynamically created depending on the user, > > whith input fields like <input type="text" > > name="user_product_{{product_id}}">) > > > I am new to Django, so I carry some old habits with me. Does the > > django's form class provide solutions for more complicated forms? > > Should I study it, further? > > You don't *have to* use forms, you can hand-code all the html to be > rendered and do the validation manually. However django forms are not > limited to static ones; for an example of how to generate dynamic > forms check outhttp://jacobian.org/writing/dynamic-form-generation/. > > HTH, > George > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.