from django.views.generic.list_detail import object_list
def generic_wrapper(request):
"""
Extract the articles based on the logged-in
user information.
"""
if request.user.is_anonymous():
qs = Articles.objects.get_default_articles()
else:
qs = Articles.objects.filter(user = request.username)
return object_list(request, qs)