#NEWLINE# def url_map( self , for_user = None , **kwargs ) : #NEWLINE# #INDENT# '\n        Returns a dictionary of urls mapped to Displayable subclass\n        instances, including a fake homepage instance if none exists.\n        Used in ``mezzanine.core.sitemaps``.\n        ' #NEWLINE# class Home ( ) : #NEWLINE# #INDENT# title = _ ( 'Home' ) #NEWLINE# #UNINDENT# home = Home ( ) #NEWLINE# setattr ( home , 'get_absolute_url' , home_slug ) #NEWLINE# items = { #NEWLINE# #INDENT# home . get_absolute_url ( ) : home , #NEWLINE# #UNINDENT# } #NEWLINE# for model in apps . get_models ( ) : #NEWLINE# #INDENT# if issubclass ( model , self . model ) : #NEWLINE# #INDENT# for item in model . objects . published ( for_user = for_user ) . filter ( ** kwargs ) . exclude ( slug__startswith = 'http://' ) . exclude ( slug__startswith = 'https://' ) : #NEWLINE# #INDENT# items [ item . get_absolute_url ( ) ] = item #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return items