<s> from telegrambot . bot_views . generic . base import TemplateCommandView <EOL> class ListDetailCommandView ( TemplateCommandView ) : <EOL> list_view_class = None <EOL> detail_view_class = None <EOL> @ classmethod <EOL> def as_command_view ( cls , ** initkwargs ) : <EOL> def view ( bot , update , ** kwargs ) : <EOL> command_args = update . message . text . split ( '<STR_LIT:U+0020>' ) <EOL> if len ( command_args ) > <NUM_LIT:1> : <EOL> self = cls . detail_view_class ( command_args [ <NUM_LIT:1> ] ) <EOL> else : <EOL> self = cls . list_view_class ( ) <EOL> return self . handle ( bot , update , ** kwargs ) <EOL> return view </s>
