 from __future__ import absolute_import , print_function , unicode_literals 
 from cms . utils import get_language_list 
 from __future__ import absolute_import , print_function , unicode_literals <EOL> from cms . utils import get_language_list <EOL> from django . contrib . sitemaps import Sitemap <EOL> from parler . utils . context import smart_override <EOL> from . . models import Post <EOL> from . . settings import get_setting <EOL> class BlogSitemap ( Sitemap ) : <EOL> def priority ( self , obj ) : <EOL> if obj and obj . app_config : <EOL> return obj . app_config . sitemap_priority <EOL> return get_setting ( '<STR_LIT>' ) <EOL> def changefreq ( self , obj ) : <EOL> if obj and obj . app_config : <EOL> return obj . app_config . sitemap_changefreq <EOL> return get_setting ( '<STR_LIT>' ) <EOL> def location ( self , obj ) : <EOL> with smart_override ( obj . get_current_language ( ) ) : <EOL> return obj . get_absolute_url ( obj . get_current_language ( ) ) <EOL> def items ( self ) : <EOL> items = [ ] <EOL> for lang in get_language_list ( ) : <EOL> items . extend ( Post . objects . translated ( lang ) . language ( lang ) . published ( ) ) <EOL> return items <EOL> def lastmod ( self , obj ) : <EOL> return obj . date_modified </s>
