I'm using StatusModel from models_utils :
class MetaData(TimeStampedModel, StatusModel, SoftDeletableModel):
STATUS = Choices(('draft', _('Draft')),
('submitted', _('Submitted')),
('underreview', _('Underreview')),
)
Forms using STATUS work as expected, but when I load an object from the DB, I can't access the human readable data in my templates.
a.status => draft
a.get_status_display => draft
instead of
a.status => draft
a.get_status_display => DraftThanks for any hep on this !
-- You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d7a06913-39a8-4e55-9799-ebc46cb5cde4%40googlegroups.com.
No comments:
Post a Comment