#NEWLINE# def post( self ) : #NEWLINE# #INDENT# token = self . get_argument ( 'deviceToken' , '' ) #NEWLINE# categorys = self . get_argument ( 'categorys' , '' ) . split ( ',' ) #NEWLINE# categorys = [ c for c in categorys if ( c in consts . CATEGORYS ) ] #NEWLINE# categorys = ',' . join ( self ) #NEWLINE# locale = self . get_argument ( 'locale' , 'en' ) #NEWLINE# if ( locale not in consts . LOCALES ) : #NEWLINE# #INDENT# locale = 'en' #NEWLINE# #UNINDENT# if token : #NEWLINE# #INDENT# load_model ( 'subscribers' ) . subscribe ( token , categorys , locale )