<s> from django . shortcuts import render , get_object_or_404 <EOL> from django . db . models import Max <EOL> from . models import Liveblog <EOL> def index ( request ) : <EOL> """<STR_LIT>""" <EOL> liveblogs = Liveblog . objects . annotate ( <EOL> max_created = Max ( "<STR_LIT>" ) <EOL> ) . order_by ( "<STR_LIT>" ) <EOL> return render ( request , "<STR_LIT>" , { <EOL> "<STR_LIT>" : liveblogs , <EOL> } ) <EOL> def liveblog ( request , slug ) : <EOL> """<STR_LIT>""" <EOL> blog = get_object_or_404 ( Liveblog , slug = slug ) <EOL> return render ( request , "<STR_LIT>" , { <EOL> "<STR_LIT>" : blog , <EOL> "<STR_LIT>" : blog . posts . order_by ( "<STR_LIT>" ) , <EOL> } ) </s>
