def author_details(request,id): try: authorins = authors.objects.get(pk=id) except: authorins = [] journalpaps = journalarticle.objects.filter(AUs = authorins) journalpapshtml = [] for paper in journalpaps: journalpapshtml.append(publication_label_html(paper.label)) return render_to_response('author_detail.html',{'author':authorins, 'journalpaps':journalpapshtml, },context_instance=RequestContext(request))