Django admin model form dropdown value instead of Object


from django.contrib import admin
from . import models
from django.contrib.auth.models import Group, User
from .models import Product
from .forms import ForumForm

class ForumArea(admin.AdminSite):
    site_header = "User Forums"

class ForumLists(admin.ModelAdmin):
    list_display = ['id','sno','customer_name','date','weight','touch','percent','owner', 'product_data']    
    list_per_page = 20
    list_filter = ['sno','customer_name','date']
    search_fields = ['sno','customer_name','date']
    form = ForumForm
    def owner(self, obj):
         subject_object = User.objects.get(
         return str(subject_object)
    def product_data(self, obj):
         subject_object = Product.objects.get(
         return str(subject_object)

    fieldsets = (
            (("Basic Details"), {"fields": ("sno", "user", "customer_name", "date")}),
                ("Touch Details"),
                    "fields": (
forum_site = ForumArea(name="ForumSite")



from django import forms
from django.forms import ModelChoiceField
from .models import *
class ForumForm(forms.ModelForm):

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        product_type = forms.ModelChoiceField(queryset=Product.objects.all())

    class Meta:
        fields = ('id','sno', 'user', 'customer_name', 'date', 'product_type', 'weight', 'touch', 'paisa', 'percent', 'mark')

The foreign key dropdown for product_key is showing “Product Object(1)” value I need to show it’s object value like name instead of object. I’m new to django please support.

You’re using ModelChoiceField, from the forms module.
Searching for forms on the docs, on the API Reference there’s this topic about ModelChoiceField.
Read this section.