#NEWLINE# def index( request ) : #NEWLINE# #INDENT# '\n    View for main page (lists recent and popular links)\n    ' #NEWLINE# values = default_values ( request ) #NEWLINE# values [ 'recent_links' ] = Link . objects . all ( ) . order_by ( '-date_submitted' ) [ 0 : 10 ] #NEWLINE# values [ 'most_popular_links' ] = Link . objects . all ( ) . order_by ( '-usage_count' ) [ 0 : 10 ] #NEWLINE# return render_to_response ( 'shortener/index.html' , values , context_instance = RequestContext ( request ) )