#NEWLINE# def twitter_inbox( ) : #NEWLINE# #INDENT# '\n        RESTful CRUD controller for the Twitter Inbox\n        - all Inbound Tweets (Directed Messages) are visible here\n    ' #NEWLINE# if ( not auth . s3_logged_in ( ) ) : #NEWLINE# #INDENT# session . error = T ( 'Requires Login!' ) #NEWLINE# redirect ( URL ( c = 'default' , f = 'user' , args = 'login' ) ) #NEWLINE# #UNINDENT# tablename = 'msg_twitter' #NEWLINE# table = s3db . msg_twitter #NEWLINE# s3 . filter = ( table . inbound == True ) #NEWLINE# table . inbound . readable = False #NEWLINE# s3 . crud_strings [ tablename ] = Storage ( title_display = T ( 'Tweet Details' ) , title_list = T ( 'Twitter InBox' ) , label_list_button = T ( 'View Twitter InBox' ) , label_delete_button = T ( 'Delete Tweet' ) , msg_record_deleted = T ( 'Tweet deleted' ) , msg_list_empty = T ( 'No Tweets currently in InBox' ) ) #NEWLINE# s3db . configure ( table , editable = False , insertable = False , list_fields = [ 'id' , 'date' , 'from_address' , 'body' ] ) #NEWLINE# return s3_rest_controller ( module , 'twitter' )