-def unassigned(request):
- chunks_list = helpers.ChunksList(Chunk.objects.filter(
- user=None).order_by('book__title', 'book__id', 'number'))
-
- return direct_to_template(request, 'catalogue/document_list.html', extra_context={
- 'books': chunks_list,
- 'last_books': sorted(request.session.get("wiki_last_books", {}).items(),
- key=lambda x: x[1]['time'], reverse=True),
- })
+def user(request, username):
+ user = get_object_or_404(User, username=username)
+ return render(request, 'catalogue/user_page.html', {"viewed_user": user})