X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=blobdiff_plain;f=htsworkflow%2Ffrontend%2Fexperiments%2Fadmin.py;fp=htsworkflow%2Ffrontend%2Fexperiments%2Fadmin.py;h=0882fc45d835a8d27763a6c89f0048d8a293172d;hp=23c8098400643c402d302f1a4c3668f2988529d2;hb=53ebb47e86e81ce349d4ef4e16aef94be93486ea;hpb=4262586d10cc0cc227390873b301b55244204c11 diff --git a/htsworkflow/frontend/experiments/admin.py b/htsworkflow/frontend/experiments/admin.py index 23c8098..0882fc4 100644 --- a/htsworkflow/frontend/experiments/admin.py +++ b/htsworkflow/frontend/experiments/admin.py @@ -151,13 +151,13 @@ class SequencerSelect(Select): output = [] for option_value, option_label in chain(self.choices, choices): if isinstance(option_label, (list, tuple)): - output.append(u'' % escape(force_unicode(option_value))) + output.append('' % escape(force_unicode(option_value))) for option in option_label: output.append(self.render_option(selected_choices, *option)) - output.append(u'') + output.append('') else: output.append(self.render_option(selected_choices, option_value, option_label)) - return u'\n'.join(output) + return '\n'.join(output) # render_options blatently grabbed from 1.3.1 as the 1.2 version # has render_option, which is what I needed to overload as a @@ -168,21 +168,21 @@ class SequencerSelect(Select): output = [] for option_value, option_label in chain(self.choices, choices): if isinstance(option_label, (list, tuple)): - output.append(u'' % escape(force_unicode(option_value))) + output.append('' % escape(force_unicode(option_value))) for option in option_label: output.append(self.render_option(selected_choices, *option)) - output.append(u'') + output.append('') else: output.append(self.render_option(selected_choices, option_value, option_label)) - return u'\n'.join(output) + return '\n'.join(output) def render_option(self, selected_choices, option_value, option_label): - disabled_sequencers = [ unicode(s.id) for s in self.queryset.filter(active=False) ] - option_value = unicode(option_value) - selected_html = (option_value in selected_choices) and u' selected="selected"' or '' + disabled_sequencers = [ str(s.id) for s in self.queryset.filter(active=False) ] + option_value = str(option_value) + selected_html = (option_value in selected_choices) and ' selected="selected"' or '' cssclass = "strikeout" if option_value in disabled_sequencers else '' - return u'' % ( + return '' % ( cssclass, escape(option_value), selected_html, conditional_escape(force_unicode(option_label)))