фикс для бага админки с sites

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
Index: django/forms/widgets.py
===================================================================
--- django/forms/widgets.py (revision 8129)
+++ django/forms/widgets.py (working copy)
@@ -359,6 +359,8 @@
escape(option_value), selected_html,
conditional_escape(force_unicode(option_label)))
# Normalize to strings.
+ if not hasattr(selected_choices, '__iter__'):
+ selected_choices = [selected_choices]
selected_choices = set([force_unicode(v) for v in selected_choices])
output = []
for option_value, option_label in chain(self.choices, choices):