[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
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.

Any help would greatly be appreciated.
Reply all
Reply to author
Forward
0 new messages