#NEWLINE# def show( request , project_url_path ) : #NEWLINE# #INDENT# resp = force_url_paths ( 'dashboard.views.projects.show' , project_url_path ) #NEWLINE# if resp : #NEWLINE# #INDENT# return resp #NEWLINE# #UNINDENT# project = get_object_or_404 ( Project , url_path = project_url_path ) #NEWLINE# paginator = None #NEWLINE# screenshots = Screenshot . objects . filter ( project = project ) #NEWLINE# if ( screenshots . count > 0 ) : #NEWLINE# #INDENT# paginator = ListPaginator ( screenshots . order_by ( 'id' ) . reverse ( ) , 3 ) #NEWLINE# #UNINDENT# commits = Commit . objects . filter ( repository = project . repository ) #NEWLINE# commits = commits . order_by ( 'date' ) . reverse ( ) [ : SHOW_COMMIT_COUNT ] #NEWLINE# contributors = Contributor . objects . filter ( projects__id__exact = project . id ) #NEWLINE# for user in project . authors . all ( ) : #NEWLINE# #INDENT# contributors = contributors . exclude ( user = user ) #NEWLINE# #UNINDENT# show_add_remove_author = True #NEWLINE# if ( request . user is not None ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# AuthorRequest . objects . get ( project = project , user = request . user ) #NEWLINE# show_add_remove_author = False #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# blogposts = BlogPost . objects . filter ( blog = project . blog ) #NEWLINE# blogposts = blogposts . order_by ( 'date' ) . reverse ( ) [ : SHOW_BLOGPOST_COUNT ] #NEWLINE# return render_to_response ( 'projects/show.html' , { #NEWLINE# #INDENT# 'project' : project , #NEWLINE# 'paginator' : paginator , #NEWLINE# 'authors' : project . authors . all ( ) , #NEWLINE# 'default_page' : 1 , #NEWLINE# 'has_screenshots' : ( len ( screenshots ) > 0 ) , #NEWLINE# 'screenshot_pages_width' : ( len ( screenshots ) * 790 ) , #NEWLINE# 'js_page_id' : 'show_project' , #NEWLINE# 'blogposts' : blogposts , #NEWLINE# 'commits' : commits , #NEWLINE# 'contributors' : contributors , #NEWLINE# 'show_add_remove_author' : show_add_remove_author , #NEWLINE# #UNINDENT# } , context_instance = RequestContext ( request ) )