<s> from flask import redirect , session <EOL> from flask . ext . babelpkg import refresh <EOL> from . . baseviews import BaseView , expose <EOL> class LocaleView ( BaseView ) : <EOL> route_base = '<STR_LIT>' <EOL> default_view = '<STR_LIT:index>' <EOL> @ expose ( '<STR_LIT>' ) <EOL> def index ( self , locale ) : <EOL> session [ '<STR_LIT>' ] = locale <EOL> refresh ( ) <EOL> self . update_redirect ( ) <EOL> return redirect ( self . get_redirect ( ) ) </s>
