def get_publications(context, template='<STR_LIT>'):
types = Type.objects.filter(hidden=False)<EOL>publications = Publication.objects.select_related()<EOL>publications = publications.filter(external=False, type__in=types)<EOL>publications = publications.order_by('<STR_LIT>', '<STR_LIT>', '<STR_LIT>')<EOL>if not publications:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>populate(publications)<EOL>return render_template(template, context['<STR_LIT>'], {'<STR_LIT>': publications})<EOL>
Get all publications.