1👍
✅
The documentation says
For every field that has choices set, the object will have a get_FOO_display() method
but you don’t have any choices set for notification
. In other words, you need a NOTIFICATION_CHOICES
iterable of lenght two iterables in your class.
1👍
notification = models.CharField(choices=provider_type, max_length=2, default='Em')
remove the arrayfield as it is not allowing you to create and iterate one
- [Answered ]-Creating file and saving in Django model (AttributeError?)
- [Answered ]-I have a list of objects and would like to return an attribute with another attribute
- [Answered ]-Django url dispatcher uses strings to specify function, why?
- [Answered ]-How do you add a unique field (non empty) field to an existing model in Django?
Source:stackexchange.com