Yes I have. But it didn't work. Basically my product has many ingredients 
and on ingredient is contained in many products so all I need is just 
display product with all the ingredients it contains on admin site.

On Tuesday, April 3, 2018 at 12:48:34 PM UTC-4, Julio Biason wrote:
>
> It seems your `get_ingredients()` is expecting the Product itself and 
> another object (for some reason).
>
> Have you tried to remove `obj` from the parameters and use `self` in that 
> function?
>
> On Tue, Apr 3, 2018 at 12:22 PM, mansi thakkar <mansith...@gmail.com 
> <javascript:>> wrote:
>
>> Hello ,
>>
>> In my database, there is one table named Product and the other table is 
>> Ingredient. Both are related with ManyToMany Relationship using bridge 
>> entity (table) named ProductIngredient. 
>>
>> I am trying to display Many To Many field named ingredient in my Django 
>> admin site. 
>>
>> Here is the attached code and screen shot of the error.
>>
>> I would like to know the solution of this error and also any other way to 
>> display  the list of ingredients for each product. 
>>
>> 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/63c89597-39c0-4765-ab43-4df41e729f4b%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/63c89597-39c0-4765-ab43-4df41e729f4b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> *Julio Biason*, Sofware Engineer
> *AZION*  |  Deliver. Accelerate. Protect.
> Office: +55 51 3083 8101  |  Mobile: +55 51 *99907 0554*
>

-- 
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/fd1fc0fe-a997-46f2-b9bf-96c7041e7108%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to