#NEWLINE# @ mobile_template ( 'addons/{mobile/}persona_detail.html' ) #NEWLINE# @ non_atomic_requests #NEWLINE# def persona_detail( request , addon , template = None ) : #NEWLINE# #INDENT# 'Details page for Personas.' #NEWLINE# if ( not ( addon . is_public ( ) or addon . is_pending ( ) ) ) : #NEWLINE# #INDENT# raise http . Http404 #NEWLINE# #UNINDENT# persona = addon . persona #NEWLINE# categories = addon . categories . all ( ) #NEWLINE# category_personas = None #NEWLINE# if categories . exists ( ) : #NEWLINE# #INDENT# qs = Addon . objects . public ( ) . filter ( categories = categories [ 0 ] ) #NEWLINE# category_personas = _category_personas ( qs , limit = 6 ) #NEWLINE# #UNINDENT# data = { #NEWLINE# #INDENT# 'addon' : addon , #NEWLINE# 'persona' : persona , #NEWLINE# 'categories' : categories , #NEWLINE# 'author_personas' : persona . authors_other_addons ( ) [ : 3 ] , #NEWLINE# 'category_personas' : category_personas , #NEWLINE# #UNINDENT# } #NEWLINE# try : #NEWLINE# #INDENT# author = addon . authors . all ( ) [ 0 ] #NEWLINE# #UNINDENT# except IndexError : #NEWLINE# #INDENT# author = None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# author = author . get_url_path ( src = 'addon-detail' ) #NEWLINE# #UNINDENT# data [ 'author_gallery' ] = author #NEWLINE# if ( not request . MOBILE ) : #NEWLINE# #INDENT# ( dev_tags , user_tags ) = addon . tags_partitioned_by_developer #NEWLINE# data . update ( { #NEWLINE# #INDENT# 'dev_tags' : dev_tags , #NEWLINE# 'user_tags' : user_tags , #NEWLINE# 'review_form' : ReviewForm ( ) , #NEWLINE# 'reviews' : Review . objects . valid ( ) . filter ( addon = addon , is_latest = True ) , #NEWLINE# 'get_replies' : Review . get_replies , #NEWLINE# 'search_cat' : 'themes' , #NEWLINE# 'abuse_form' : AbuseForm ( request = request ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# return render ( request , template , data )