Re: Dynamic ModelAdmin Field
El jueves, 14 de julio de 2016, 17:29:38 (UTC+2), Bernat Bonet escribió: > > I need to add dynamic fields to ModelAdmin that are not part of the Model. > > Models: > > product: cod, des > product_categories: cat, val > > I want to add val1, val2 in ProductAdmin > > Thanks > > > -- 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/3f832300-33aa-4b99-8e6c-8ff82550dd59%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Dynamic ModelAdmin Field
Why not use custom methods on your model? These can effectively act as extra properties: *https://docs.djangoproject.com/en/1.9/topics/db/models/#model-methods*(this is assuming you do not want to store any data of course... otherwise you will need to give a more concrete example of what you want to do) On Thursday, 14 July 2016 17:29:38 UTC+2, Bernat Bonet wrote: > > I need to add dynamic fields to ModelAdmin that are not part of the Model. > > Models: > > product: cod, des > product_categories: cat, val > > I want to add val1, val2 in ProductAdmin > > Thanks > > > -- 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/ce318181-d3a5-45eb-96e5-70219a001810%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Dynamic ModelAdmin Field
I need to add dynamic fields to ModelAdmin that are not part of the Model. Models: product: cod, des product_categories: cat, val I want to add val1, val2 in ProductAdmin Thanks -- 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/47fa72e8-5954-4a20-989b-f8e99ad4a9b2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.