I got it and tried as you said but still couldn't get the output as I want. It is still showing ingredient object.
On Tuesday, March 13, 2018 at 12:09:36 PM UTC-4, Avraham Serour wrote: > > it seems you wrote def_str_, if should be def (space) then the function > name > > also the function str should probably be named with double underscores > like this: __str__ not _str_ > > On Tue, Mar 13, 2018 at 5:27 PM, mansi thakkar <mansith...@gmail.com > <javascript:>> wrote: > >> Hello , >> Here is the attached files of my output and my error and my models.py >> file. I have database residing in aws cloud platform. What I have done is I >> have used inspectdb command and created models using that command. Then >> have registered my model into admin site and then model has been displayed >> (Ingredient in my case.) Now it is showing Ingredient object for each and >> every entry as shown in pic I would like to display master_name instead og >> ingredient_name. How can I do that? >> Please reply me as soon as possible. >> Thank you. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users...@googlegroups.com <javascript:>. >> To post to this group, send email to django...@googlegroups.com >> <javascript:>. >> Visit this group at https://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/d9fe676d-9988-4f59-a97f-fdc5db777e39%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-users/d9fe676d-9988-4f59-a97f-fdc5db777e39%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/147bd8b6-503e-46dc-93ab-1b75ea288ecb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.