Open algomaster99 opened 3 years ago
@pradumangoyal told me about an existing package which does this. However, while skimming through the codebase, I could not find functionality for pagination or search. But I may be wrong and in that case, feel free to close the ticket.
Is your feature request related to a problem? Please describe. A long standing issue in Django had a direct consequence on our project. Contenttype fields,
entity_content_type
andentity_object_id
, (default names suggested by the Django framework) did not have a good widget attached to them so one had to manually query the database to find the instance ID in order to populate the fields.In 2019, a PR was submitted and merged which added a workaround to select
entity_content_type
using a dropdown list and theentity_object_id
from a popup window. Being a workaround, it also brought some limitations with it.persona_content_type
.Describe the solution you'd like To convert this workaround into a concrete solution, I suggest making a Django Widget or a model field in a different repository (let's keep it under @IMGIITRoorkee only). Further, we can publish the package to PyPI. Eventually, solving both of the problems listed above.
The widget or the model field should add the following functionality:
entity_content_type
(the name can by anything) field from a text field to dropdown list.entity_object_id
(again, name can be anything) field.There can be more features or the implementation might be different but that is subjected to the discussion under this ticket.
Additional context PRs related to the previous work on this.
Want to take up? Definitely up for reviewing or answering more questions.