summaryrefslogtreecommitdiff
path: root/ishtar_common/views.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-09-05 20:41:18 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-09-05 20:41:18 +0200
commit322d30dcb1dbf54162b79c5df08d0b80694845fc (patch)
treed024c5b2bb95fb975e06ec7254e08014cd0797f7 /ishtar_common/views.py
parentcd7e945225c8c9ec040d68f1401728b6fe0b6df7 (diff)
downloadIshtar-322d30dcb1dbf54162b79c5df08d0b80694845fc.tar.bz2
Ishtar-322d30dcb1dbf54162b79c5df08d0b80694845fc.zip
Fix right checking to view images
Diffstat (limited to 'ishtar_common/views.py')
-rw-r--r--ishtar_common/views.py5
1 files changed, 3 insertions, 2 deletions
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))