Please help two dependent list check boxes

22 views
Skip to first unread message

farah_...@hotmail.com

unread,
May 29, 2017, 5:43:41 AM5/29/17
to Django users
I am a beginner with django.
I don't have any idea how to create a two dependent list of check boxes. I mean when i check a box a second list on checkbox appears.
When I click on a second checkbox a new list of checkbox appears. 
I didn't find anything related on google. 
I don't know how to create the models.py in this case or anything related.

Jani Tiainen

unread,
May 29, 2017, 8:20:10 AM5/29/17
to django...@googlegroups.com

Actually this is not exactly Django problem.

Well, model wise this is parent - child relation (first checkbox is a parent, second one is/are child(ren))

UI side is Javascript - more common way to do it is "dependent selects" but it could be done with checkboxes as well.

Since you're beginner I suggest that try first with dependent selects, and once you got it working, try to apply what you
learn with checkboxes.
--
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...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f9802a16-4750-49f0-b01c-cea513d0cfe3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Jani Tiainen

carlos

unread,
May 29, 2017, 10:53:10 AM5/29/17
to django...@googlegroups.com
maybe this app https://github.com/digi604/django-smart-selects help you see the js work dependent selects

cheers

On Mon, May 29, 2017 at 6:18 AM, Jani Tiainen <red...@gmail.com> wrote:

Actually this is not exactly Django problem.

Well, model wise this is parent - child relation (first checkbox is a parent, second one is/are child(ren))

UI side is Javascript - more common way to do it is "dependent selects" but it could be done with checkboxes as well.

Since you're beginner I suggest that try first with dependent selects, and once you got it working, try to apply what you
learn with checkboxes.


On 29.05.2017 12:43, farah_...@hotmail.com wrote:
I am a beginner with django.
I don't have any idea how to create a two dependent list of check boxes. I mean when i check a box a second list on checkbox appears.
When I click on a second checkbox a new list of checkbox appears. 
I didn't find anything related on google. 
I don't know how to create the models.py in this case or anything related.

--
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.

-- 
Jani Tiainen

--
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...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

For more options, visit https://groups.google.com/d/optout.



--
att.
Carlos Rocha
Reply all
Reply to author
Forward
0 new messages