简体   繁体   中英

Django generic relation admin site

I am using Django 1.9.9 with generic relations and in the admin site, I have to manually type in the Object ID. Is there any method so that I can select an object from a list like a regular foreign key?

Here are two ready to try packages for what you'd like:

  • Django-genericdropdown :

    A simple dropdown the make the hassle of picking to the right object when using generic relations

  • django-gfklookupwidget :

    A widget to replace the object_id in a generic relation with a search link. It will open a popup to select a related item based on the content_type field. It supports inlines.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM