def xmodule_js_files(request):
 urls = get_xmodule_urls()
 return HttpResponse(json.dumps(urls), content_type='application/json')

def xmodule_js_files ( request ) : urls = get_xmodule_urls ( ) return HttpResponse ( json . dumps ( urls ) , content_type = 'application/json' )
view function that returns xmodule urls as a json list; meant to be used as an api .