Working on blog
parent
a55f79921e
commit
639cfc30dc
|
@ -75,6 +75,9 @@ def embed(request, snipt_key):
|
|||
@render_to('snipts/list-public.html')
|
||||
def list_public(request, tag_slug=None):
|
||||
|
||||
if request.blog_user:
|
||||
return blog_list(request)
|
||||
|
||||
tags = Tag.objects.filter(snipt__public=True)
|
||||
tags = tags.annotate(count=Count('taggit_taggeditem_items__id'))
|
||||
tags = tags.order_by('-count')[:20]
|
||||
|
@ -105,6 +108,9 @@ def list_public(request, tag_slug=None):
|
|||
@render_to('snipts/list-user.html')
|
||||
def list_user(request, username_or_custom_slug, tag_slug=None):
|
||||
|
||||
if request.blog_user:
|
||||
return blog_list(request)
|
||||
|
||||
user = get_object_or_None(User, username=username_or_custom_slug)
|
||||
|
||||
if user is None:
|
||||
|
|
Loading…
Reference in New Issue