applegrew / django-select2

This is a Django integration for Select2
MIT License
710 stars 316 forks source link

Add support for GenericForeignKey #587

Closed shawara closed 4 years ago

codecov-io commented 4 years ago

Codecov Report

Merging #587 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #587   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      2           
  Lines           8      8           
=====================================
  Hits            8      8

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 39ab326...9c2dd71. Read the comment docs.

codingjoe commented 4 years ago

Hi @shawara,

thanks for the contribution, though I would have wish if you reached out, before submitting a patch. The implementation might make sense for your specific project, but in reality a generic foreign key can point to any table. So a queryset with options would need to contain all querysets combined, which doesn't make sense. Another reason why there is no input for generic foreign keys in Django forms. Considering that there is not generic way to deal with this problem, I can not accept this patch, since it would probably serve only you and cause confusion among other users. I am sure you understand.

Best -Joe