[Python-il] Posted this question on SO. Would appreciate any help if possible.
1 view
Skip to first unread message
Tsvi Mostovicz
unread,
Mar 25, 2018, 7:52:43 AM3/25/18
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 python-il
Hi,
Please see the SO question below[1].
Basically I created a hybrid_property in the base class returning str(self), and each of the child classes define their own __str__ which specifies a description of the entry in the database based on some of the fields . I don't mind changing this as long as the solution abides by DRY.
Now I'd like to be able to filter based on that description. Bonus points if I can filter based on a partial description. (Instead of specifying a-b-c-d, just filter on a-b).
This is an internal tool, so I can't really share the code except for excerpts.