Django admin display field of related model in Inline

I want to display the value of a field related to the associated insida inline model. Is it possible?

#models.py GroupInviteTracking
httprequest_data = models.ForeginKey(HTTPRequestData)

#admin.py Inline of GroupInviteTracking
fieldsets = (
    ("HTTPRequestData", {
        'fields': (
            "httprequest_data__user",
            "httprequest_data__ip",
        ),
    }),
)
+4
source share

Source: https://habr.com/ru/post/1547138/


All Articles