1. Stephan Jaekel
  2. django-readonlywidget


Stephan Jaekel  committed 69fa47c

fixed bug in charfield with choices thanks to redcoelho

  • Participants
  • Parent commits d4e3d76
  • Branches default

Comments (0)

Files changed (1)

File django_readonlywidget/widgets.py

View file
  • Ignore whitespace
     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]))