#NEWLINE# def __init__( self , request , base_context = None , domain = None , **kwargs ) : #NEWLINE# #INDENT# super ( OdmExportReportView , self ) . __init__ ( request , base_context , domain , ** kwargs ) #NEWLINE# tz = get_timezone_for_user ( None , self . domain ) #NEWLINE# now = datetime . now ( tz ) #NEWLINE# file_oid = now . strftime ( 'CommCare_%Y%m%d%H%M%S%z' ) #NEWLINE# utc_offset = now . strftime ( '%z' ) #NEWLINE# with_colon = ':' . join ( ( utc_offset [ : ( - 2 ) ] , request [ ( - 2 ) : ] ) ) #NEWLINE# self . study_details = { #NEWLINE# #INDENT# 'file_oid' : file_oid , #NEWLINE# 'file_description' : 'Data imported from CommCare' , #NEWLINE# 'creation_datetime' : ( now . strftime ( '%Y-%m-%dT%H:%M:%S' ) + with_colon ) , #NEWLINE# 'study_name' : get_study_constant ( domain , 'study_name' ) , #NEWLINE# 'study_description' : get_study_constant ( domain , 'study_description' ) , #NEWLINE# 'protocol_name' : get_study_constant ( domain , 'protocol_name' ) , #NEWLINE# 'study_oid' : get_study_constant ( domain , 'study_oid' ) , #NEWLINE# 'audit_logs' : AUDIT_LOGS , #NEWLINE# #UNINDENT# }