diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/blog/views.py | 2 | ||||
-rw-r--r-- | app/builder/base.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/app/blog/views.py b/app/blog/views.py index 0e887bd..498926c 100644 --- a/app/blog/views.py +++ b/app/blog/views.py @@ -12,8 +12,10 @@ from photos.models import Photo def home(request): obj = HomepageCurrator.objects.get(pk=1) template = obj.template_name + recent = Entry.objects.filter(status__exact=1)[:4] context = { 'homepage': obj, + 'recent': recent, } return render_to_response(template, context, context_instance=RequestContext(request)) diff --git a/app/builder/base.py b/app/builder/base.py index b18e8be..a706261 100644 --- a/app/builder/base.py +++ b/app/builder/base.py @@ -140,7 +140,7 @@ class BuildWriting(Build): def build_homepage(self): obj = get_model('blog', 'homepagecurrator').objects.get(pk=1) - recent = get_model('blog', 'entry').objects.filter(status__exact=1)[:3] + recent = get_model('blog', 'entry').objects.filter(status__exact=1)[:4] template = obj.template_name c = Context({'homepage': obj, 'recent': recent, 'MEDIA_URL': settings.BAKED_MEDIA_URL, 'IMAGES_URL': settings.BAKED_IMAGES_URL}) t = render_to_string(template, c).encode('utf-8') |