Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 30 additions & 4 deletions cp2/ControlPanel/ControlPanel/templatetags/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,33 @@

@register.filter(expects_localtime=True)
def parse_iso(value):
try:
return datetime.strptime(value, "%Y-%m-%d %H:%M:%S.%f")
except Exception:
return datetime.strptime(value, "%Y-%m-%d %H:%M:%S")
"""Parse several common ISO datetime string formats into a datetime.

Accepts inputs like:
- "2026-02-12T09:54:26.879578"
- "2026-02-12 09:54:26.879578"
- "2026-02-12T09:54:26"
- "2026-02-12 09:54:26"
- "2026-02-12"

If `value` is already a datetime, it is returned unchanged. If parsing
fails, the original value is returned.
"""
if isinstance(value, datetime):
return value

formats = (
"%Y-%m-%dT%H:%M:%S.%f",
"%Y-%m-%d %H:%M:%S.%f",
"%Y-%m-%dT%H:%M:%S",
"%Y-%m-%d %H:%M:%S",
"%Y-%m-%d",
)

for fmt in formats:
try:
return datetime.strptime(value, fmt)
except Exception:
continue

return value
4 changes: 2 additions & 2 deletions cp2/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ requires-python = "==3.12.*"
dependencies = [
"certifi==2025.10.5",
"chardet==3.0.4",
"django==4.2.26",
"django==4.2.28",
"django-utils-six==2.0",
"gunicorn==23.0.0",
"idna==3.11",
"pytz==2018.4",
"requests==2.32.5",
"urllib3>=2.5.0",
"urllib3>=2.6.3",
]
16 changes: 8 additions & 8 deletions cp2/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions docker/pkglist
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ bash-completion
mailutils
cron-apt
git
python2.7
wget
cmake
ccache
Expand All @@ -24,12 +23,10 @@ python
python3
python-dev
python3-dev
python3-cherrypy3
python3-mako
python3-jsonschema
gnuplot
gnuplot-nox
python3-pip
python3-yaml
libpq-dev
libmagic-dev
Expand Down Expand Up @@ -92,9 +89,7 @@ bash-completion
mailutils
cron-apt
bind9
ipython3
net-tools
gunicorn
screen
wget
zip
Expand Down
5 changes: 1 addition & 4 deletions ipol_demo/modules/core/demoinfo/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,7 @@ def get_ssh_keys(demo_id: int):
result = demoinfo.get_ssh_keys(demo_id)
if isinstance(result, Ok):
pubkey, privkey = result.value
data = {
"pubkey": pubkey,
"privkey": privkey,
}
data = {"pubkey": pubkey}
else:
data = {"error": result.value}
return data
Expand Down
5 changes: 3 additions & 2 deletions ipol_demo/modules/core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Ipol Core module"
readme = "README.md"
requires-python = "==3.13.*"
dependencies = [
"cryptography==46.0.0",
"cryptography==46.0.5",
"fastapi==0.123.0",
"imagecodecs==2025.11.11",
"imageio==2.9.0",
Expand All @@ -25,5 +25,6 @@ dependencies = [

[dependency-groups]
dev = [
"black~=23.0",
"pytest>=9.0.1",
]
]
Loading