<s> from django . contrib . sitemaps import Sitemap <EOL> from models import Entry <EOL> class BlogSitemap ( Sitemap ) : <EOL> changefreq = "<STR_LIT>" <EOL> priority = <NUM_LIT:0.5> <EOL> def __init__ ( self , blog = None , * args , ** kwargs ) : <EOL> super ( BlogSitemap , self ) . __init__ ( * args , ** kwargs ) <EOL> if blog : <EOL> self . queryset = Entry . objects . filter ( blog = blog , status = Entry . STATUS_ONLINE ) . order_by ( '<STR_LIT>' ) <EOL> else : <EOL> self . queryset = Entry . objects . filter ( status = Entry . STATUS_ONLINE ) . order_by ( '<STR_LIT>' ) <EOL> def items ( self ) : <EOL> return self . queryset <EOL> def lastmod ( self , obj ) : <EOL> return obj . modification_date </s>
