18 Commits

Author SHA1 Message Date
7354af5787 Merge branch 'upstream'
All checks were successful
Docker Image CI / build (push) Successful in 3m27s
Github-Actions / build (push) Successful in -36s
2025-10-02 12:06:30 -05:00
Jelle van der Waa
b814ab4d72 Update django to the latest version
All checks were successful
Github-Actions / build (push) Successful in 2m44s
2025-10-02 11:30:53 +02:00
Jelle van der Waa
a0ec59ddc3 main: render package maintainers pgp keys correctly
We need to allow html to be passed into format_html.
2025-09-18 18:00:44 +02:00
cea449ddcd Merge branch 'upstream'
All checks were successful
Github-Actions / build (push) Successful in -34s
Docker Image CI / build (push) Successful in 3m10s
2025-09-17 16:17:38 -05:00
Lukas Fleischer
70e796acc3 Fix logout link formatting
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2025-09-17 21:14:21 +02:00
Jelle van der Waa
242a126245 Update to Django 5.1.12 2025-09-17 21:13:11 +02:00
Jakub Klinkovský
03a0e748ec Fix format string for package links in todo lists
Fixes 0cf24055d5

Fixes https://github.com/archlinux/archweb/issues/582
2025-09-17 09:33:24 +02:00
e024b881a5 Merge branch 'upstream'
All checks were successful
Docker Image CI / build (push) Successful in 1m3s
Github-Actions / build (push) Successful in -36s
2025-09-15 14:51:37 -05:00
Jelle van der Waa
fb9b330535 Drop shells.com as sponsor 2025-09-15 21:47:23 +02:00
Ben Mezger
6bc1b49071 Fix Django schema deprecation 2025-09-03 10:54:09 +02:00
Ben Mezger
0cf24055d5 Update deprecated format_html 2025-09-03 10:54:09 +02:00
52e9a1ae0e Merge branch 'upstream', tag release_2025-08-03
All checks were successful
Github-Actions / build (push) Successful in -44s
Docker Image CI / build (push) Successful in 2m17s
2025-08-03 17:05:23 -05:00
b386d89d6c prep for mirror pages go-live
All checks were successful
Docker Image CI / build (push) Successful in -14s
Github-Actions / build (push) Successful in -31s
2025-08-01 01:06:11 -05:00
Sven-Hendrik Haase
59229f280b Add link to new Dev Blog in Development section
All checks were successful
Github-Actions / build (push) Successful in 3m5s
2025-07-24 16:14:44 +02:00
Jelle van der Waa
4c57725862 treewide: port away from deprecated datetime.utcnow() 2025-07-22 18:32:21 +02:00
Jelle van der Waa
8ded12a7cf Update Django to 5.1.10 2025-07-22 18:32:21 +02:00
Daniel M. Capella
0180242d2a todolists: include last_modified in template
Closes https://github.com/archlinux/archweb/issues/551
2025-07-13 10:21:59 +02:00
Daniel M. Capella
bf29716008 signoffs: remove superfluous conditional
The page is only accessible if you're logged in.
2025-07-13 10:21:59 +02:00
19 changed files with 67 additions and 45 deletions

View File

@@ -2,6 +2,7 @@ version: '2'
# Run the following once: # Run the following once:
# docker compose run --rm archweb_web python manage.py migrate # docker compose run --rm archweb_web python manage.py migrate
# docker compose run --rm archweb_web python manage.py loaddata mirrors/fixtures/mirrorprotocols.json
# docker compose run --rm archweb_web python manage.py loaddata main/fixtures/arches.json # docker compose run --rm archweb_web python manage.py loaddata main/fixtures/arches.json
# docker compose run --rm archweb_web python manage.py loaddata main/fixtures/repos.json # docker compose run --rm archweb_web python manage.py loaddata main/fixtures/repos.json
# docker compose run --rm archweb_web python manage.py createsuperuser --username=admin --email=admin@artixweb.local # docker compose run --rm archweb_web python manage.py createsuperuser --username=admin --email=admin@artixweb.local
@@ -11,6 +12,8 @@ version: '2'
# docker compose run --rm archweb_web python manage.py pgp_import ./config/keyring # docker compose run --rm archweb_web python manage.py pgp_import ./config/keyring
## go to /admin/devel/developerkey/ and set the owner (and parent) for the ownerless key ## go to /admin/devel/developerkey/ and set the owner (and parent) for the ownerless key
## go to /admin/sites/site/1/change/ and set the domain ## go to /admin/sites/site/1/change/ and set the domain
## clone the mirrors repo
# docker compose run --rm archweb_web python manage.py loaddata /mirrors/mirrors.fixture.json
services: services:

View File

@@ -9,24 +9,24 @@ register = template.Library()
@register.simple_tag @register.simple_tag
def jquery(): def jquery():
version = '3.6.0' version = '3.6.0'
filename = 'jquery-%s.min.js' % version filename = f'jquery-{version}.min.js'
link = staticfiles_storage.url(filename) link = staticfiles_storage.url(filename)
return mark_safe('<script type="text/javascript" src="%s"></script>' % link) return mark_safe(f'<script type="text/javascript" src="{link}"></script>')
@register.simple_tag @register.simple_tag
def jquery_tablesorter(): def jquery_tablesorter():
version = '2.31.0' version = '2.31.0'
filename = 'jquery.tablesorter-%s.min.js' % version filename = f'jquery.tablesorter-{version}.min.js'
link = staticfiles_storage.url(filename) link = staticfiles_storage.url(filename)
return format_html('<script type="text/javascript" src="%s"></script>' % link) return format_html('<script type="text/javascript" src="{link}"></script>', link=link)
@register.simple_tag @register.simple_tag
def d3js(): def d3js():
version = '3.5.0' version = '3.5.0'
filename = 'd3-%s.min.js' % version filename = f'd3-{version}.min.js'
link = staticfiles_storage.url(filename) link = staticfiles_storage.url(filename)
return format_html('<script type="text/javascript" src="%s"></script>' % link) return format_html('<script type="text/javascript" src="{link}"></script>', link=link)
# vim: set ts=4 sw=4 et: # vim: set ts=4 sw=4 et:

View File

@@ -8,8 +8,11 @@ register = template.Library()
def country_flag(country): def country_flag(country):
if not country: if not country:
return '' return ''
return format_html('<span class="fam-flag fam-flag-%s" title="%s"></span> ' % ( return format_html(
str(country.code).lower(), str(country.name))) '<span class="fam-flag fam-flag-{country_code}" title="{country_name}"></span> ',
country_code=str(country.code).lower(),
country_name=str(country.name),
)
# vim: set ts=4 sw=4 et: # vim: set ts=4 sw=4 et:

View File

@@ -56,8 +56,10 @@ def pgp_key_link(key_id, link_text=None):
key_id) key_id)
if link_text is None: if link_text is None:
link_text = '0x%s' % key_id[-8:] link_text = '0x%s' % key_id[-8:]
values = (url, format_key(key_id), link_text) return format_html('<a href="{url}" title="PGP key search for {key}">{content}</a>',
return format_html('<a href="%s" title="PGP key search for %s">%s</a>' % values) url=url,
key=format_key(key_id),
content=mark_safe(link_text))
@register.simple_tag @register.simple_tag

View File

@@ -25,5 +25,14 @@
"default": false, "default": false,
"protocol": "https" "protocol": "https"
} }
},
{
"pk": 9,
"model": "mirrors.mirrorprotocol",
"fields": {
"is_download": false,
"default": false,
"protocol": "ftp"
}
} }
] ]

View File

@@ -33,7 +33,7 @@ server {
try_files "" @proxy; try_files "" @proxy;
} }
location ~ ^/(packages|groups|opensearch|feeds) { location ~ ^/(packages|groups|opensearch|feeds|mirrors|mirrorlist) {
try_files "" @proxy; try_files "" @proxy;
} }
@@ -65,4 +65,4 @@ server {
} }
error_page 500 501 502 503 504 /500.html; error_page 500 501 502 503 504 /500.html;
} }

View File

@@ -43,8 +43,8 @@ def pkg_details_link(pkg, link_title=None, honor_flagged=False):
link_content = link_title link_content = link_title
if honor_flagged and pkg.flag_date: if honor_flagged and pkg.flag_date:
link_content = '<span class="flagged">%s</span>' % link_title link_content = '<span class="flagged">%s</span>' % link_title
link = '<a href="%s" title="View package details for %s">%s</a>' link = '<a href="{link}" title="View package details for {pkgname}">{content}</a>'
return format_html(link % (pkg.get_absolute_url(), pkg.pkgname, link_content)) return format_html(link, link=pkg.get_absolute_url(), pkgname=pkg.pkgname, content=link_content)
# vim: set ts=4 sw=4 et: # vim: set ts=4 sw=4 et:

View File

@@ -1,5 +1,5 @@
import json import json
from datetime import datetime from datetime import datetime, timezone
from operator import attrgetter from operator import attrgetter
from django.contrib.auth.models import User from django.contrib.auth.models import User
@@ -99,7 +99,7 @@ def keys(request):
user_key_ids = frozenset(user.userprofile.pgp_key[-16:] for user in users user_key_ids = frozenset(user.userprofile.pgp_key[-16:] for user in users
if user.userprofile.pgp_key) if user.userprofile.pgp_key)
not_expired = Q(expires__gt=datetime.utcnow()) | Q(expires__isnull=True) not_expired = Q(expires__gt=datetime.now(timezone.utc)) | Q(expires__isnull=True)
master_keys = MasterKey.objects.select_related('owner', 'revoker', master_keys = MasterKey.objects.select_related('owner', 'revoker',
'owner__userprofile', 'revoker__userprofile').filter( 'owner__userprofile', 'revoker__userprofile').filter(
revoked__isnull=True) revoked__isnull=True)
@@ -155,7 +155,7 @@ def keys_json(request):
'group': 'master' 'group': 'master'
} for key in master_keys) } for key in master_keys)
not_expired = Q(expires__gt=datetime.utcnow()) | Q(expires__isnull=True) not_expired = Q(expires__gt=datetime.now(timezone.utc)) | Q(expires__isnull=True)
signatures = PGPSignature.objects.filter(not_expired, revoked__isnull=True) signatures = PGPSignature.objects.filter(not_expired, revoked__isnull=True)
edge_list = [{ 'signee': sig.signee, 'signer': sig.signer } edge_list = [{ 'signee': sig.signee, 'signer': sig.signer }
for sig in signatures] for sig in signatures]

View File

@@ -1,5 +1,5 @@
from base64 import b64encode from base64 import b64encode
from datetime import datetime from datetime import datetime, timezone
import pytest import pytest
from bencode import bencode from bencode import bencode
@@ -24,7 +24,7 @@ def torrent_data():
data = { data = {
'comment': 'comment', 'comment': 'comment',
'created_by': 'Arch Linux', 'created_by': 'Arch Linux',
'creation date': int(datetime.utcnow().timestamp()), 'creation date': int(datetime.now(timezone.utc).timestamp()),
'info': { 'info': {
'name': 'arch.iso', 'name': 'arch.iso',
'length': 1, 'length': 1,

View File

@@ -1,5 +1,5 @@
-e git+https://github.com/fredj/cssmin.git@master#egg=cssmin -e git+https://github.com/fredj/cssmin.git@master#egg=cssmin
Django==5.1.9 Django==5.1.13
IPy==1.1 IPy==1.1
Markdown==3.3.7 Markdown==3.3.7
bencode.py==4.0.0 bencode.py==4.0.0

View File

@@ -273,4 +273,10 @@ if PROMETHEUS_METRICS:
INSTALLED_APPS = [*list(INSTALLED_APPS), 'django_prometheus'] INSTALLED_APPS = [*list(INSTALLED_APPS), 'django_prometheus']
# Assume all URLField will be HTTPS if not specified.
# NOTE: this can be removed once we bump Django to 6.x
# where `https` becomes the default.
FORMS_URLFIELD_ASSUME_HTTPS = True
# vim: set ts=4 sw=4 et: # vim: set ts=4 sw=4 et:

View File

@@ -1207,12 +1207,12 @@ ul.signoff-list {
/* style input as a normal anchor */ /* style input as a normal anchor */
input { input {
background: none!important; background: none !important;
border: none; border: none;
padding: 0!important; padding: 0 0.5em !important;
/*optional*/ /* optional */
font-family: arial, sans-serif; font-family: arial, sans-serif;
font-size: 0.9em; font-size: 100%;
/*input has OS specific font-family*/ /*input has OS specific font-family*/
color: #07b; color: #07b;
} }

View File

@@ -145,6 +145,10 @@ tr :nth-child(7) {
background-image: url(data:image/gif;base64,R0lGODlhFQAEAPABAOTu/wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFAgABACwAAAAAFQAEAAACDYwfoAvoz9qbZ9FrJC0AOw==); background-image: url(data:image/gif;base64,R0lGODlhFQAEAPABAOTu/wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFAgABACwAAAAAFQAEAAACDYwfoAvoz9qbZ9FrJC0AOw==);
} }
code {
background: #334450;
}
.results.results td, .results.results td,
.results.results th { .results.results th {
border: 1px solid #858585; border: 1px solid #858585;
@@ -158,7 +162,7 @@ tr :nth-child(7) {
background-color: #111; background-color: #111;
} }
.results th { .results th, #pkgsearch {
color: #fff; color: #fff;
background-color: #0f3147; background-color: #0f3147;
border: 1px solid #0A6682; border: 1px solid #0A6682;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -26,10 +26,8 @@
<div><label for="id_repo_{{ repo_name|lower }}" title="Target Repository {{ repo_name }}">[{{ repo_name|lower }}]</label> <div><label for="id_repo_{{ repo_name|lower }}" title="Target Repository {{ repo_name }}">[{{ repo_name|lower }}]</label>
<input type="checkbox" name="repo_{{ repo_name|lower }}" id="id_repo_{{ repo_name|lower }}" class="repo_filter" value="{{ repo_name|lower }}" checked="checked"/></div> <input type="checkbox" name="repo_{{ repo_name|lower }}" id="id_repo_{{ repo_name|lower }}" class="repo_filter" value="{{ repo_name|lower }}" checked="checked"/></div>
{% endfor %} {% endfor %}
{% if user.is_authenticated %}
<div><label for="id_mine_only" title="Show only packages packaged by me">Only Mine</label> <div><label for="id_mine_only" title="Show only packages packaged by me">Only Mine</label>
<input type="checkbox" name="mine_only" id="id_mine_only" value="mine_only"/></div> <input type="checkbox" name="mine_only" id="id_mine_only" value="mine_only"/></div>
{% endif %}
<div><label for="id_pending" title="Packages with not enough signoffs">Only Pending Approval</label> <div><label for="id_pending" title="Packages with not enough signoffs">Only Pending Approval</label>
<input type="checkbox" name="pending" id="id_pending" value="pending"/></div> <input type="checkbox" name="pending" id="id_pending" value="pending"/></div>
<div><label>&nbsp;</label><input title="Reset search criteria" type="button" id="criteria_reset" value="Reset"/></div> <div><label>&nbsp;</label><input title="Reset search criteria" type="button" id="criteria_reset" value="Reset"/></div>

View File

@@ -53,16 +53,6 @@
<img src="{% static "nitrokey_logo.png" %}" <img src="{% static "nitrokey_logo.png" %}"
class="sponsor-btn-nitrokey" title="" alt="Nitrokey logo"/></a> class="sponsor-btn-nitrokey" title="" alt="Nitrokey logo"/></a>
<p>We would also like to thank <a href="https://www.shells.com/"
title="Shells">Shells.com</a> for their monetary donation.
Shells provides you with a 1-click, powerful virtual desktop environment,
driven by a cloud computer, without leaving your browser! It's your
personal workspace in the cloud.</p>
<a href="https://www.shells.com/" title="Shells">
<img src="{% static "shells_logo.png" %}"
title="" alt="Shells logo"/></a>
<h3>Past donors</h3> <h3>Past donors</h3>
<p><a href="http://www.dotcom-monitor.com/" title="Dotcom-Monitor">Dotcom-Monitor</a> &amp; <a href="https://www.loadview-testing.com/" title="LoadView">LoadView</a></p> <p><a href="http://www.dotcom-monitor.com/" title="Dotcom-Monitor">Dotcom-Monitor</a> &amp; <a href="https://www.loadview-testing.com/" title="LoadView">LoadView</a></p>

View File

@@ -153,6 +153,7 @@
<ul> <ul>
<li><a href="https://wiki.archlinux.org/title/Getting_involved" <li><a href="https://wiki.archlinux.org/title/Getting_involved"
title="Getting involved">Getting involved</a></li> title="Getting involved">Getting involved</a></li>
<li><a href="https://devblog.archlinux.page" title="Dev Blog">Dev Blog</a></li>
<li><a href="https://gitlab.archlinux.org/archlinux/" <li><a href="https://gitlab.archlinux.org/archlinux/"
title="Official Arch projects (git)">Projects in Git</a></li> title="Official Arch projects (git)">Projects in Git</a></li>
<li><a href="https://wiki.archlinux.org/title/DeveloperWiki" <li><a href="https://wiki.archlinux.org/title/DeveloperWiki"
@@ -204,11 +205,6 @@
<img src="{% static "icons8_logo.png" %}" <img src="{% static "icons8_logo.png" %}"
title="" alt="Icons8 logo"/> title="" alt="Icons8 logo"/>
</a> </a>
<a href="https://www.shells.com" title="Shells.com">
<img src="{% static "shells_logo.png" %}"
title="" alt="Shells logo"/>
</a>
</div> </div>
{% endcache %} {% endcache %}
{% endblock %} {% endblock %}

View File

@@ -2,6 +2,8 @@
{% load static %} {% load static %}
{% load package_extras %} {% load package_extras %}
{% load todolists %} {% load todolists %}
{% load tz %}
{% load humanize %}
{% block title %}Arch Linux - Todo: {{ list.name }}{% endblock %} {% block title %}Arch Linux - Todo: {{ list.name }}{% endblock %}
@@ -103,7 +105,15 @@
<span class="{{ pkg.status_css_class }}">{{ pkg.get_status_display }}</span> <span class="{{ pkg.status_css_class }}">{{ pkg.get_status_display }}</span>
{% endif %} {% endif %}
</td> </td>
<td>{{ pkg.user|default:"" }}</td> <td>
{% if pkg.user %}
{% if user.is_authenticated %}
{{ pkg.user }} <span title="{{ pkg.last_modified|timezone:user.userprofile.time_zone|date:"Y-m-d H:i T" }}">({{ pkg.last_modified|naturaltime }})</span>
{% else %}
{{ pkg.user }} <span title="{{ pkg.last_modified|date:"Y-m-d H:i T" }}">({{ pkg.last_modified|naturaltime }})</span>
{% endif %}
{% endif %}
</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>

View File

@@ -13,8 +13,9 @@ def todopkg_details_link(todopkg):
pkg = todopkg.pkg pkg = todopkg.pkg
if not pkg: if not pkg:
return todopkg.pkgname return todopkg.pkgname
link = '<a href="%s" title="View package details for %s">%s</a>' link = '<a href="{url}" title="View package details for {pkgname}">{pkgname}</a>'
url = pkg_absolute_url(todopkg.repo, todopkg.arch, pkg.pkgname) url = pkg_absolute_url(todopkg.repo, todopkg.arch, pkg.pkgname)
return format_html(link % (url, pkg.pkgname, pkg.pkgname)) return format_html(link, url=url, pkgname=pkg.pkgname)
# vim: set ts=4 sw=4 et: # vim: set ts=4 sw=4 et: