##// END OF EJS Templates
Do not show random images on the landing page
neko259 -
r1872:40f9cee0 default
parent child Browse files
Show More
@@ -10,17 +10,6 b''
10
10
11 {% block content %}
11 {% block content %}
12 <div id="posts-table">
12 <div id="posts-table">
13 <div class="landing-images">
14 {% for image in images %}
15 <div class="gallery_image">
16 {{ image.get_view|safe }}
17 {% with image.get_random_associated_post as post %}
18 {{ post.get_link_view|safe }}
19 {% endwith %}
20 </div>
21 {% endfor %}
22 </div>
23 <br />
24 <div class="landing-tags">
13 <div class="landing-tags">
25 {{ section_str|safe }}
14 {{ section_str|safe }}
26 </div>
15 </div>
@@ -13,12 +13,9 b' from boards.views.base import BaseBoardV'
13
13
14 PARAM_SECTION_STR = 'section_str'
14 PARAM_SECTION_STR = 'section_str'
15 PARAM_LATEST_THREADS = 'latest_threads'
15 PARAM_LATEST_THREADS = 'latest_threads'
16 PARAM_IMAGES = 'images'
17
16
18 TEMPLATE = 'boards/landing.html'
17 TEMPLATE = 'boards/landing.html'
19
18
20 RANDOM_IMAGE_COUNT = 3
21
22
19
23 class LandingView(BaseBoardView):
20 class LandingView(BaseBoardView):
24 @method_decorator(csrf_protect)
21 @method_decorator(csrf_protect)
@@ -39,8 +36,5 b' class LandingView(BaseBoardView):'
39
36
40 params[PARAM_LATEST_THREADS] = ops
37 params[PARAM_LATEST_THREADS] = ops
41
38
42 params[PARAM_IMAGES] = Attachment.objects.get_random_images(
43 RANDOM_IMAGE_COUNT)
44
45 return render(request, TEMPLATE, params)
39 return render(request, TEMPLATE, params)
46
40
General Comments 0
You need to be logged in to leave comments. Login now