applegrew / django-select2

This is a Django integration for Select2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

multi model select field

psk007 opened this issue · comments

Goal
Using select box on multi django model .
Problem
I'm using django select2 for selecting my users in template and everything work perfect .
For more flexibility, I want give more choices to viewers and i want to they have options like :Users Group1 , that Group 1 is one of the django groups that already created. in other word in want combine Use model and Group model in select queryset .
Are have any idea?

Hi @psk007,

hm... interesting idea. How would you go about the HTTP part? Would you submit inconsistent values for the same attribute name? If you use integer PKs, how would you know if a group or a user was selected?

Should you only want to select users, but want to group them. You can always use option groups. Those work in Select2 as well.

If hope that helps a bit. A mock up would really help my understand what you are trying to achive.

Best
-Joe