Django: can't override get_FOO_display() -


i have field called status. want pluralize status, write

def get_status_display(self):     return dict(status_choices).get(self.status) + 's' 

in template write {{ object.get_status_display }} function not invoked.

what doing wrong?


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -