Hi treyd,
I think idea of updating the model and storing it in the db is a bit
overkill, however you could create an @propery on the model that will do
that logic for you and return the css class for you.
e.g.
@property
def css_class(self):
if self.state is SUCHANDSUCH:
return "label-soan
Hi all,
I came across this ticket in stack overflow to try to find a solution for the
issue of calling a signal only when a particular field on a model was updated.
https://stackoverflow.com/questions/39034798/django-signals-for-models-value-change-condition
I didn't want to use any third party
2 matches
Mail list logo