X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ae8967ea4942f066ff84104fadf06bdfb4a01ce5..f906193db2ec44590f57beae2e8ee2df76117b7b:/wolnelektury/views.py?ds=sidebyside diff --git a/wolnelektury/views.py b/wolnelektury/views.py old mode 100644 new mode 100755 index be1ec9987..808a0feaa --- a/wolnelektury/views.py +++ b/wolnelektury/views.py @@ -1,8 +1,10 @@ -# -*- coding: utf-8 -*- - -from django.shortcuts import render_to_response from django.template import RequestContext +from django.shortcuts import render_to_response +from catalogue.models import Book + -def server_error(request): - return render_to_response('500.html', RequestContext(request)) +def main_page(request): + last_published = Book.objects.exclude(html_file='').order_by('-created_at')[:4] + return render_to_response("main_page.html", locals(), + context_instance=RequestContext(request)) \ No newline at end of file