def blog_tags(request): user_id = authenticated_userid(request) page = int(request.params.get('page', 1)) tag = request.matchdict.get('tag', 1) paginator = Tag.get_paginator(request, page=page, tag=tag) recent = Post.get_recent() posts= Post.all() years = Post.get_years_desc() categories = Category.get_all() tags = Tag.get_all() return {'paginator': paginator, 'user_id': user_id, 'recent': recent, 'posts': posts, 'years': years, 'categories': categories, 't': tag, 'tags': tags, }