Thx for the explanation. I thought as much but as a beginner am always worried about some unforseen consequence.
On Tuesday, December 9, 2014 1:26:47 AM UTC-8, Daniel Roseman wrote: > > On Tuesday, 9 December 2014 01:37:44 UTC, T Kwn wrote: >> >> I'm created a form where a user can add or remove other users from a >> group. Because the number of available users is unknown beforehand, I >> needed to create a checkbox form where the number of elements is dynamic. >> However, I couldn't figure out how to do it so I just used an html form and >> some <input type="checkbox">. I then processed the result in my view. I do >> not have any form defined in forms.py. >> >> I presume this is poor django practice but I'd like to know more details >> on why. Obviously I'm not getting the built-in form validation but with >> checkboxes it doesn't seem very necessary. Anything else? >> >> My view can be seen here: >> >> https://gist.github.com/anonymous/d1e8bd43c20eced9e4ce >> >> The template code is pretty basic such as: >> >> {% for myuser in members %} >> {{ myuser.username }} >> <input type="checkbox" value="{{ myuser.username }}" name="delete_me"/> >> <br> >> {% endfor %} >> >> >> > There's nothing wrong with doing that, of course. Just as you can write > raw SQL to talk to your database, and even raw WSGI to power your web app. > But Django provides utilities like the ORM, and the forms framework, to > make it easier for you. If you find they don't help for your use case, then > feel free not to use them. > -- > DR. > -- 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 [email protected]. To post to this group, send email to [email protected]. 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/3e6d5ef4-ed66-46d1-9906-f2de823fb311%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

