<s> import json <EOL> from django . http import HttpResponse <EOL> from django . views . decorators . http import require_GET <EOL> from custom . up_nrhm . sql_data import ASHAAFChecklistData <EOL> from dimagi . utils . dates import force_to_datetime <EOL> @ require_GET <EOL> def asha_af_report ( request , domain ) : <EOL> report = ASHAAFChecklistData ( <EOL> config = dict ( <EOL> doc_id = request . GET . get ( '<STR_LIT>' ) , <EOL> date = force_to_datetime ( request . GET . get ( '<STR_LIT:date>' ) ) , <EOL> domain = domain <EOL> ) <EOL> ) <EOL> return HttpResponse ( <EOL> json . dumps ( report . rows ) , <EOL> content_type = '<STR_LIT:application/json>' <EOL> ) </s>
