Saturday, February 27, 2016

Provide way to add an item during "Selecting a ForeignKey"

I use django-select2 for easy ForeignKey picking. Works nice.


But how can I add a new item in the ForeignKey table?


I would like to have a big [+] button and then a dialog should open.


AFAIK django-select2 does not help here. Is there a different library which can help here?


The result should look like this "create user" example: https://jqueryui.com/dialog/#modal-form


I don't care how the pop-up works.


Via ajax, browser pop-up, or like in django admin, ...


It should work and be re-usable. I don't want to invent this common pattern again and again.

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bb9f73b4-dec1-42bd-b3a3-81ecfe044bd7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment