1
1
{% load thumbnail %}
2
2
{% load cache %}
3
3
4
- {% comment %}cache for 1 day{% endcomment %}
5
- {% cache 86400 CACHED_SPONSORS_LIST %}
6
4
7
5
{% if logo_place == "download" %}
6
+ {% comment %}cache for 1 day{% endcomment %}
7
+ {% cache 86400 CACHED_DOWNLOAD_SPONSORS_LIST %}
8
8
< h2 class ="widget-title "> Sponsors</ h2 >
9
9
< p > Visionary sponsors help to host Python downloads.</ p >
10
10
{% for sponsorship in sponsorships %}
11
11
{% thumbnail sponsorship.sponsor.web_logo "x200" format="PNG" quality=100 as im %}
12
12
< img src ="{{ im.url }} " alt ="{{ sponsorship.sponsor.name }} logo " style ="max-height:200px;max-width:200px;height:auto;width:auto; ">
13
13
{% endthumbnail %}
14
14
{% endfor %}
15
+ {% endcache CACHED_DOWNLOAD_SPONSORS_LIST %}
15
16
16
17
{% elif logo_place == "jobs" %}
18
+ {% comment %}cache for 1 day{% endcomment %}
19
+ {% cache 86400 CACHED_JOBS_SPONSORS_LIST %}
17
20
< h3 class ="widget-title "> Job Board Sponsors</ h3 >
18
21
< div style ="display: grid; grid-gap: 1em; grid-template-columns: repeat(auto-fit, minmax(100px, 0fr)); grid-template-rows: repeat(1, minmax(50px, 0fr)); align-items: center; justify-content: center; margin-top: 1em; ">
19
22
{% for sponsorship in sponsorships %}
@@ -24,8 +27,11 @@ <h3 class="widget-title">Job Board Sponsors</h3>
24
27
{% endthumbnail %}
25
28
{% endfor %}
26
29
</ div >
30
+ {% endcache CACHED_JOBS_SPONSORS_LIST %}
27
31
28
32
{% elif logo_place == "sponsors" %}
33
+ {% comment %}cache for 1 day{% endcomment %}
34
+ {% cache 86400 CACHED_SPONSORS_LIST %}
29
35
30
36
{% for package, placement_info in sponsorships_by_package.items %}
31
37
{% if placement_info.sponsorships %}
@@ -54,5 +60,5 @@ <h1 style="font-size: {% if forloop.first %}350%{% else %}300%{% endif %}">{{ pa
54
60
</ div >
55
61
{% endif %}
56
62
{% endfor %}
57
- {% endif %}
58
63
{% endcache CACHED_SPONSORS_LIST %}
64
+ {% endif %}
0 commit comments