Module Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareNotEq AttributeLoad NameLoad attr Num body Print Call AttributeLoad Str attr NameLoad Return Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad Call NameLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Print Call AttributeLoad Str attr Call NameLoad NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Print Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Print Call AttributeLoad Str attr Call NameLoad AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A N/A re N/A os N/A requests urllib.parse urlparse django.core.management.base BaseCommand django.conf settings django.core.files File models Page Image page_image_path Command N/A BaseCommand N/A N/A  Fix success story page images  get_success_pages N/A N/A self N/A N/A N/A N/A N/A N/A Page objects filter path__startswith about/success/ N/A image_url N/A N/A self path N/A N/A N/A 
        Given a full filesystem path to an image, return the proper media
        url for it
         N/A new_url N/A N/A path replace N/A settings MEDIA_ROOT N/A settings MEDIA_URL N/A N/A N/A new_url replace // / N/A fix_image N/A N/A self path page N/A N/A N/A url N/A N/A http://legacy.python.org{} format path N/A r N/A N/A requests get url N/A N/A N/A r status_code 200 N/A N/A N/A N/A ERROR Couldn't load {} format url N/A N/A img N/A Image N/A N/A img page page N/A filename N/A N/A N/A os path basename N/A N/A urlparse url path N/A output_path N/A page_image_path img filename N/A directory N/A N/A N/A os path dirname output_path N/A N/A N/A N/A N/A os path exists directory N/A N/A N/A N/A os makedirs directory N/A N/A open output_path wb f N/A N/A N/A N/A f write N/A r content N/A reopen N/A open output_path rb N/A new_file N/A File reopen N/A N/A N/A N/A img image save filename new_file save True N/A N/A N/A self image_url output_path N/A find_image_paths N/A N/A self page N/A N/A N/A content N/A N/A page content raw N/A paths N/A set N/A N/A re findall (/files/success.*)\b content N/A paths N/A N/A N/A N/A Found {} matches in {} format N/A len paths N/A page path N/A paths N/A process_success_story N/A N/A self page N/A N/A N/A  Process an individual success story  N/A image_paths N/A N/A self find_image_paths page N/A path image_paths N/A N/A new_url N/A N/A self fix_image path page N/A N/A N/A     Fixing {} -> {} format path new_url N/A content N/A N/A page content raw N/A new_content N/A N/A content replace path new_url N/A N/A page content new_content N/A N/A N/A page save N/A handle N/A N/A self N/A args kwargs N/A N/A N/A self pages N/A N/A self get_success_pages N/A N/A N/A Found {} success pages format N/A len N/A self pages N/A p N/A self pages N/A N/A N/A N/A self process_success_story p N/A N/A