Commits

Stephan Jaekel  committed 69fa47c

fixed bug in charfield with choices thanks to redcoelho

  • Participants
  • Parent commits d4e3d76

Comments (0)

Files changed (1)

File django_readonlywidget/widgets.py

 
     def get_charfield_value(self, field_name, value):
         if self.db_field.choices:
-            for choice in self.field.choices:
+            for choice in self.db_field.choices:
                 if value == choice[0]:
                     return conditional_escape(force_unicode(choice[1]))
         else: