From cbed3d384330d4a68f9b960867d29f43f3886d63 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 5 Sep 2016 20:41:18 +0200 Subject: Fix right checking to view images --- ishtar_common/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ishtar_common/views.py') diff --git a/ishtar_common/views.py b/ishtar_common/views.py index ea2eda462..46a8ceb6a 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -80,13 +80,14 @@ def index(request): """ dct = {} profile = get_current_profile() + image = get_random_item_image_link(request) if hasattr(profile, 'homepage') and profile.homepage: dct['homepage'] = markdown(profile.homepage) if '{random_image}' in dct['homepage']: dct['homepage'] = dct['homepage'].replace( - '{random_image}', get_random_item_image_link()) + '{random_image}', image) else: - dct['random_image'] = get_random_item_image_link() + dct['random_image'] = image try: return render_to_response('index.html', dct, context_instance=RequestContext(request)) -- cgit v1.2.3