Groups
Groups
Sign in
Groups
Groups
Django users
Conversations
About
Send feedback
Help
Dynamic ModelAdmin Field
30 views
Skip to first unread message
Bernat Bonet
unread,
Jul 14, 2016, 11:29:38 AM
7/14/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
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
Derek
unread,
Jul 15, 2016, 9:46:44 AM
7/15/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
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)
Reply all
Reply to author
Forward
Message has been deleted
0 new messages