<s> from django . shortcuts import render_to_response , get_object_or_404 <EOL> from django . template import RequestContext <EOL> from dnd . menu import menu_item , submenu_item <EOL> from dnd . mobile . dnd_paginator import DndMobilePaginator <EOL> from dnd . filters import DeityFilter <EOL> from dnd . models import Deity <EOL> @ menu_item ( "<STR_LIT>" ) <EOL> def deity_list_mobile ( request ) : <EOL> f = DeityFilter ( request . GET , queryset = Deity . objects . all ( ) ) <EOL> form_submitted = <NUM_LIT:1> if '<STR_LIT>' in request . GET else <NUM_LIT:0> <EOL> paginator = DndMobilePaginator ( f . qs , request ) <EOL> return render_to_response ( '<STR_LIT>' , <EOL> { <EOL> '<STR_LIT>' : request , <EOL> '<STR_LIT>' : paginator . items ( ) , <EOL> '<STR_LIT>' : paginator , <EOL> '<STR_LIT>' : f , <EOL> '<STR_LIT>' : form_submitted , <EOL> } , context_instance = RequestContext ( request ) , ) <EOL> @ menu_item ( "<STR_LIT>" ) <EOL> def deity_detail_mobile ( request , deity_slug ) : <EOL> deity = get_object_or_404 ( Deity . objects . select_related ( '<STR_LIT>' , '<STR_LIT>' ) , slug = deity_slug ) <EOL> return render_to_response ( '<STR_LIT>' , <EOL> { <EOL> '<STR_LIT>' : deity , <EOL> '<STR_LIT>' : request , <EOL> '<STR_LIT>' : request . build_absolute_uri ( ) , <EOL> '<STR_LIT>' : request . build_absolute_uri ( ) , <EOL> } , context_instance = RequestContext ( request ) , ) </s>
