Skip to content

Commit 04a79be

Browse files
committed
downloads: show last 5 beta versions
1 parent 03b103e commit 04a79be

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

dolweb/downloads/templates/downloads-index.html

+17
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,23 @@
2727
<h1>{% trans "Download" %}</h1>
2828
</div>
2929

30+
<div id="download-beta">
31+
<h1>{% trans "Beta versions" %}</h1>
32+
33+
<div class="alert">{% blocktrans %}
34+
<p>Beta versions are released every month, usually accompanied by a
35+
<em>Progress Report</em> article. They are a good balance between the Dolphin
36+
<a href="#download-dev">development versions</a> and the
37+
<a href="#download-stable">stable versions</a>.</p>
38+
39+
<div class="alert alert-info">The beta versions require the <a href="https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads">64-bit Visual C++ redistributable for Visual Studio 2019</a>
40+
to be installed.</div>
41+
{% endblocktrans %}</div>
42+
43+
{% include "downloads-devrel.html" with builds=beta_builds primclass='btn-info' %}
44+
45+
</div>
46+
3047
<div id="download-dev">
3148
<h1>{% trans "Development versions" %}</h1>
3249

dolweb/downloads/views.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from django.views.decorators.vary import vary_on_headers
1212
from dolweb.downloads.diggpaginator import DiggPaginator
1313
from dolweb.downloads.models import Artifact, BranchInfo, DevVersion, ReleaseVersion
14+
from dolweb.update.models import UpdateTrack
1415

1516
import hashlib
1617
import hmac
@@ -28,10 +29,13 @@ def index(request):
2829
master_builds = (DevVersion.objects.filter(branch='master')
2930
.order_by('-date')
3031
[:10])
32+
beta_builds = (UpdateTrack.objects.filter(name='beta')
33+
.order_by('-version__date')
34+
[:5])
3135
last_master = master_builds[0] if len(master_builds) else None
3236

3337
return { 'releases': releases, 'master_builds': master_builds,
34-
'last_master': last_master }
38+
'beta_builds': beta_builds, 'last_master': last_master }
3539

3640
@cache_control(max_age=15)
3741
@vary_on_headers('User-Agent')

0 commit comments

Comments
 (0)