<s> from lifeflow . models import Entry , Flow , RecommendedSite , Author , Flow , Language <EOL> from django . contrib . sites . models import Site <EOL> from django . conf import settings <EOL> def blog ( request ) : <EOL> def make_slug ( str ) : <EOL> return str . lower ( ) . replace ( "<STR_LIT:U+0020>" , "<STR_LIT:->" ) <EOL> recent = Entry . current . all ( ) [ : <NUM_LIT:5> ] <EOL> random = Entry . current . all ( ) . order_by ( '<STR_LIT:?>' ) [ : <NUM_LIT:5> ] <EOL> blog_roll = RecommendedSite . objects . all ( ) <EOL> flows = Flow . objects . all ( ) <EOL> site = Site . objects . get ( pk = settings . SITE_ID ) <EOL> analytics_id = getattr ( settings , '<STR_LIT>' , None ) <EOL> use_projects = getattr ( settings , '<STR_LIT>' , True ) <EOL> keywords = getattr ( settings , '<STR_LIT>' , "<STR_LIT>" ) <EOL> description = getattr ( settings , '<STR_LIT>' , "<STR_LIT>" ) <EOL> author = getattr ( settings , '<STR_LIT>' , None ) <EOL> template_author = getattr ( settings , '<STR_LIT>' , "<STR_LIT>" ) <EOL> template_author_url = getattr ( settings , '<STR_LIT>' , "<STR_LIT>" ) <EOL> if author is None : <EOL> try : <EOL> author = Author . objects . get ( pk = <NUM_LIT:1> ) . name <EOL> except : <EOL> author = "<STR_LIT>" <EOL> author_slug = make_slug ( author ) <EOL> blog_name = getattr ( settings , '<STR_LIT>' , "<STR_LIT>" ) <EOL> custom_css = getattr ( settings , '<STR_LIT>' , None ) <EOL> custom_js_header = getattr ( settings , '<STR_LIT>' , None ) <EOL> custom_js_footer = getattr ( settings , '<STR_LIT>' , None ) <EOL> return { <EOL> '<STR_LIT>' : blog_roll , <EOL> '<STR_LIT>' : analytics_id , <EOL> '<STR_LIT>' : blog_name , <EOL> '<STR_LIT>' : custom_css , <EOL> '<STR_LIT>' : custom_js_header , <EOL> '<STR_LIT>' : custom_js_footer , <EOL> '<STR_LIT>' : flows , <EOL> '<STR_LIT>' : keywords , <EOL> '<STR_LIT>' : description , <EOL> '<STR_LIT>' : author , <EOL> '<STR_LIT>' : author_slug , <EOL> '<STR_LIT>' : use_projects , <EOL> '<STR_LIT>' : template_author , <EOL> '<STR_LIT>' : template_author_url , <EOL> '<STR_LIT>' : recent , <EOL> '<STR_LIT>' : random , <EOL> '<STR_LIT>' : site , <EOL> } </s>
