@view_config(route_name='<STR_LIT>', request_method='<STR_LIT:GET>',<EOL>renderer='<STR_LIT>',<EOL>permission='<STR_LIT>', http_cache=<NUM_LIT:0>)<EOL>def admin_print_styles_single(request):
style = request.matchdict['<STR_LIT>']<EOL>with db_connect(cursor_factory=DictCursor) as db_conn:<EOL><INDENT>with db_conn.cursor() as cursor:<EOL><INDENT>if style != '<STR_LIT>':<EOL><INDENT>cursor.execute("""<STR_LIT>""", vars=(style,))<EOL>info = cursor.fetchall()<EOL>if len(info) < <NUM_LIT:1>:<EOL><INDENT>current_recipe = None<EOL>recipe_type = None<EOL>status = None<EOL><DEDENT>else:<EOL><INDENT>current_recipe = info[<NUM_LIT:0>]['<STR_LIT>']<EOL>recipe_type = info[<NUM_LIT:0>]['<STR_LIT>']<EOL>status = '<STR_LIT>'<EOL><DEDENT>cursor.execute("""<STR_LIT>""", vars=(style,))<EOL><DEDENT>else:<EOL><INDENT>current_recipe = '<STR_LIT>'<EOL>recipe_type = '<STR_LIT>'<EOL>cursor.execute("""<STR_LIT>""", vars=(style,))<EOL>status = '<STR_LIT>'<EOL><DEDENT>collections = []<EOL>for row in cursor.fetchall():<EOL><INDENT>recipe = row['<STR_LIT>']<EOL>if (status != '<STR_LIT>' and<EOL>current_recipe is not None and<EOL>recipe != current_recipe):<EOL><INDENT>status = '<STR_LIT>'<EOL><DEDENT>collections.append({<EOL>'<STR_LIT:title>': row['<STR_LIT:name>'].decode('<STR_LIT:utf-8>'),<EOL>'<STR_LIT>': row['<STR_LIT>'],<EOL>'<STR_LIT>': row['<STR_LIT>'],<EOL>'<STR_LIT>': row['<STR_LIT>'],<EOL>'<STR_LIT>': request.route_path('<STR_LIT>',<EOL>hash=row['<STR_LIT>']),<EOL>'<STR_LIT>': row['<STR_LIT>'],<EOL>'<STR_LIT>': row['<STR_LIT>'],<EOL>'<STR_LIT>': request.route_path('<STR_LIT>',<EOL>ident_hash=row['<STR_LIT>']),<EOL>'<STR_LIT:status>': status,<EOL>'<STR_LIT>': request.route_path(<EOL>'<STR_LIT>', uuid=row['<STR_LIT>']),<EOL>})<EOL><DEDENT><DEDENT><DEDENT>return {'<STR_LIT>': len(collections),<EOL>'<STR_LIT>': collections,<EOL>'<STR_LIT>': style,<EOL>'<STR_LIT>': recipe_type}<EOL>
Returns all books with any version of the given print style.

    Returns the print_style, recipe type, num books using the print_style,
    along with a dictionary of the book, author, revision date, recipe,
    tag of the print_style, and a link to the content.