mirror of
https://github.com/ae-utbm/sith.git
synced 2026-04-30 10:36:03 +00:00
Generated
+351
-289
File diff suppressed because it is too large
Load Diff
+13
-13
@@ -25,9 +25,9 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.29.0",
|
"@babel/core": "^7.29.0",
|
||||||
"@babel/preset-env": "^7.29.0",
|
"@babel/preset-env": "^7.29.2",
|
||||||
"@biomejs/biome": "^2.4.6",
|
"@biomejs/biome": "^2.4.13",
|
||||||
"@hey-api/openapi-ts": "^0.94.0",
|
"@hey-api/openapi-ts": "^0.94.5",
|
||||||
"@rollup/plugin-inject": "^5.0.5",
|
"@rollup/plugin-inject": "^5.0.5",
|
||||||
"@types/alpinejs": "^3.13.11",
|
"@types/alpinejs": "^3.13.11",
|
||||||
"@types/cytoscape-cxtmenu": "^3.4.5",
|
"@types/cytoscape-cxtmenu": "^3.4.5",
|
||||||
@@ -35,10 +35,10 @@
|
|||||||
"@types/js-cookie": "^3.0.6",
|
"@types/js-cookie": "^3.0.6",
|
||||||
"rollup-plugin-visualizer": "^7.0.1",
|
"rollup-plugin-visualizer": "^7.0.1",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
"vite": "^8.0.0"
|
"vite": "^8.0.10"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alpinejs/sort": "^3.15.8",
|
"@alpinejs/sort": "^3.15.11",
|
||||||
"@arendjr/text-clipper": "npm:@jsr/arendjr__text-clipper@^3.0.0",
|
"@arendjr/text-clipper": "npm:@jsr/arendjr__text-clipper@^3.0.0",
|
||||||
"@floating-ui/dom": "^1.7.6",
|
"@floating-ui/dom": "^1.7.6",
|
||||||
"@fortawesome/fontawesome-free": "^7.2.0",
|
"@fortawesome/fontawesome-free": "^7.2.0",
|
||||||
@@ -46,25 +46,25 @@
|
|||||||
"@fullcalendar/daygrid": "^6.1.20",
|
"@fullcalendar/daygrid": "^6.1.20",
|
||||||
"@fullcalendar/icalendar": "^6.1.20",
|
"@fullcalendar/icalendar": "^6.1.20",
|
||||||
"@fullcalendar/list": "^6.1.20",
|
"@fullcalendar/list": "^6.1.20",
|
||||||
"@sentry/browser": "^10.43.0",
|
"@sentry/browser": "^10.51.0",
|
||||||
"@zip.js/zip.js": "^2.8.23",
|
"@zip.js/zip.js": "^2.8.26",
|
||||||
"3d-force-graph": "^1.79.1",
|
"3d-force-graph": "^1.80.0",
|
||||||
"alpinejs": "^3.15.8",
|
"alpinejs": "^3.15.11",
|
||||||
"chart.js": "^4.5.1",
|
"chart.js": "^4.5.1",
|
||||||
"country-flag-emoji-polyfill": "^0.1.8",
|
"country-flag-emoji-polyfill": "^0.1.8",
|
||||||
"cytoscape": "^3.33.1",
|
"cytoscape": "^3.33.2",
|
||||||
"cytoscape-cxtmenu": "^3.5.0",
|
"cytoscape-cxtmenu": "^3.5.0",
|
||||||
"cytoscape-klay": "^3.1.4",
|
"cytoscape-klay": "^3.1.4",
|
||||||
"d3-force-3d": "^3.0.6",
|
"d3-force-3d": "^3.0.6",
|
||||||
"easymde": "^2.20.0",
|
"easymde": "^2.20.0",
|
||||||
"glob": "^13.0.6",
|
"glob": "^13.0.6",
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
"htmx.org": "^2.0.8",
|
"htmx.org": "^2.0.10",
|
||||||
"js-cookie": "^3.0.5",
|
"js-cookie": "^3.0.5",
|
||||||
"lit-html": "^3.3.2",
|
"lit-html": "^3.3.2",
|
||||||
"native-file-system-adapter": "^3.0.1",
|
"native-file-system-adapter": "^3.0.1",
|
||||||
"three": "^0.183.2",
|
"three": "^0.184.0",
|
||||||
"three-spritetext": "^1.10.0",
|
"three-spritetext": "^1.10.0",
|
||||||
"tom-select": "^2.5.2"
|
"tom-select": "^2.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+28
-28
@@ -19,33 +19,33 @@ authors = [
|
|||||||
license = { text = "GPL-3.0-only" }
|
license = { text = "GPL-3.0-only" }
|
||||||
requires-python = "<4.0,>=3.12"
|
requires-python = "<4.0,>=3.12"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"django>=5.2.12,<6.0.0",
|
"django>=5.2.13,<6.0.0",
|
||||||
"django-ninja>=1.5.3,<6.0.0",
|
"django-ninja>=1.6.2,<6.0.0",
|
||||||
"django-ninja-extra>=0.31.0",
|
"django-ninja-extra>=0.31.4",
|
||||||
"Pillow>=12.1.1,<13.0.0",
|
"Pillow>=12.2.0,<13.0.0",
|
||||||
"mistune>=3.2.0,<4.0.0",
|
"mistune>=3.2.0,<4.0.0",
|
||||||
"django-jinja<3.0.0,>=2.11.0",
|
"django-jinja<3.0.0,>=2.11.0",
|
||||||
"cryptography>=46.0.5,<47.0.0",
|
"cryptography>=47.0.0,<48.0.0",
|
||||||
"django-phonenumber-field>=8.4.0,<9.0.0",
|
"django-phonenumber-field>=8.4.0,<9.0.0",
|
||||||
"phonenumbers>=9.0.25,<10.0.0",
|
"phonenumbers>=9.0.29,<10.0.0",
|
||||||
"reportlab>=4.4.10,<5.0.0",
|
"reportlab>=4.5.0,<5.0.0",
|
||||||
"django-haystack<4.0.0,>=3.3.0",
|
"django-haystack>=3.3.0,<4.0.0",
|
||||||
"xapian-haystack<4.0.0,>=3.1.0",
|
"xapian-haystack>=4.0.0,<5.0.0",
|
||||||
"libsass<1.0.0,>=0.23.0",
|
"libsass<1.0.0,>=0.23.0",
|
||||||
"django-ordered-model<4.0.0,>=3.7.4",
|
"django-ordered-model<4.0.0,>=3.7.4",
|
||||||
"django-simple-captcha<1.0.0,>=0.6.3",
|
"django-simple-captcha<1.0.0,>=0.6.3",
|
||||||
"python-dateutil<3.0.0.0,>=2.9.0.post0",
|
"python-dateutil<3.0.0.0,>=2.9.0.post0",
|
||||||
"sentry-sdk>=2.54.0,<3.0.0",
|
"sentry-sdk>=2.58.0,<3.0.0",
|
||||||
"jinja2<4.0.0,>=3.1.6",
|
"jinja2<4.0.0,>=3.1.6",
|
||||||
"django-countries>=8.2.0,<9.0.0",
|
"django-countries>=8.2.0,<9.0.0",
|
||||||
"dict2xml>=1.7.8,<2.0.0",
|
"dict2xml>=1.7.8,<2.0.0",
|
||||||
"Sphinx<6,>=5",
|
"Sphinx<6,>=5",
|
||||||
"tomli>=2.4.0,<3.0.0",
|
"tomli>=2.4.1,<3.0.0",
|
||||||
"django-honeypot>=1.3.0,<2",
|
"django-honeypot>=1.3.0,<2",
|
||||||
"pydantic-extra-types>=2.11.0,<3.0.0",
|
"pydantic-extra-types>=2.11.1,<3.0.0",
|
||||||
"ical>=11.1.0,<12",
|
"ical>=11.1.0,<14.0.0",
|
||||||
"redis[hiredis]>=5.3.0,<8.0.0",
|
"redis[hiredis]>=6.4.0,<8.0.0",
|
||||||
"environs[django]>=14.5.0,<15.0.0",
|
"environs[django]>=15.0.1,<16.0.0",
|
||||||
"requests>=2.32.5,<3.0.0",
|
"requests>=2.32.5,<3.0.0",
|
||||||
"honcho>=2.0.0",
|
"honcho>=2.0.0",
|
||||||
"psutil>=7.2.2,<8.0.0",
|
"psutil>=7.2.2,<8.0.0",
|
||||||
@@ -63,29 +63,29 @@ prod = [
|
|||||||
"psycopg[c]>=3.3.3,<4.0.0",
|
"psycopg[c]>=3.3.3,<4.0.0",
|
||||||
]
|
]
|
||||||
dev = [
|
dev = [
|
||||||
"django-debug-toolbar>=6.2.0,<7",
|
"django-debug-toolbar>=6.3.0,<7",
|
||||||
"ipython>=9.11.0,<10.0.0",
|
"ipython>=9.13.0,<10.0.0",
|
||||||
"pre-commit>=4.5.1,<5.0.0",
|
"pre-commit>=4.6.0,<5.0.0",
|
||||||
"ruff>=0.15.5,<1.0.0",
|
"ruff>=0.15.12,<1.0.0",
|
||||||
"djhtml>=3.0.10,<4.0.0",
|
"djhtml>=3.0.11,<4.0.0",
|
||||||
"faker>=40.8.0,<41.0.0",
|
"faker>=40.15.0,<41.0.0",
|
||||||
"rjsmin>=1.2.5,<2.0.0",
|
"rjsmin>=1.2.5,<2.0.0",
|
||||||
]
|
]
|
||||||
tests = [
|
tests = [
|
||||||
"freezegun>=1.5.5,<2.0.0",
|
"freezegun>=1.5.5,<2.0.0",
|
||||||
"pytest>=9.0.2,<10.0.0",
|
"pytest>=9.0.3,<10.0.0",
|
||||||
"pytest-cov>=7.0.0,<8.0.0",
|
"pytest-cov>=7.1.0,<8.0.0",
|
||||||
"pytest-django<5.0.0,>=4.12.0",
|
"pytest-django<5.0.0,>=4.12.0",
|
||||||
"model-bakery<2.0.0,>=1.23.3",
|
"model-bakery<2.0.0,>=1.23.4",
|
||||||
"beautifulsoup4>=4.14.3,<5",
|
"beautifulsoup4>=4.14.3,<5",
|
||||||
"lxml>=6.0.2,<7",
|
"lxml>=6.1.0,<7",
|
||||||
]
|
]
|
||||||
docs = [
|
docs = [
|
||||||
"mkdocs<2.0.0,>=1.6.1",
|
"mkdocs<2.0.0,>=1.6.1",
|
||||||
"mkdocs-material>=9.7.5,<10.0.0",
|
"mkdocs-material>=9.7.6,<10.0.0",
|
||||||
"mkdocstrings>=1.0.3,<2.0.0",
|
"mkdocstrings>=1.0.4,<2.0.0",
|
||||||
"mkdocstrings-python>=2.0.3,<3.0.0",
|
"mkdocstrings-python>=2.0.3,<3.0.0",
|
||||||
"mkdocs-include-markdown-plugin>=7.2.1,<8.0.0",
|
"mkdocs-include-markdown-plugin>=7.2.2,<8.0.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.uv]
|
[tool.uv]
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
|
import datetime
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
|
from django.utils.timezone import get_current_timezone
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from core.models import User
|
from core.models import User
|
||||||
@@ -60,6 +62,15 @@ class AlbumEditForm(forms.ModelForm):
|
|||||||
Album.objects.all(), required=True, widget=AutoCompleteSelectAlbum
|
Album.objects.all(), required=True, widget=AutoCompleteSelectAlbum
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def clean_date(self):
|
||||||
|
album_date: datetime.date = self.cleaned_data["date"]
|
||||||
|
return datetime.datetime(
|
||||||
|
year=album_date.year,
|
||||||
|
month=album_date.month,
|
||||||
|
day=album_date.day,
|
||||||
|
tzinfo=get_current_timezone(),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class PictureModerationRequestForm(forms.ModelForm):
|
class PictureModerationRequestForm(forms.ModelForm):
|
||||||
"""Form to create a PictureModerationRequest.
|
"""Form to create a PictureModerationRequest.
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ class TestAlbumEdit:
|
|||||||
data = {
|
data = {
|
||||||
"name": album.name[: Album.NAME_MAX_LENGTH],
|
"name": album.name[: Album.NAME_MAX_LENGTH],
|
||||||
"parent": baker.make(Album, parent=album.parent, is_moderated=True).pk,
|
"parent": baker.make(Album, parent=album.parent, is_moderated=True).pk,
|
||||||
"date": localdate().strftime("%Y-%m-%d"),
|
"date": localdate(),
|
||||||
"file": "/random/path",
|
"file": "/random/path",
|
||||||
"edit_groups": [settings.SITH_GROUP_SAS_ADMIN_ID],
|
"edit_groups": [settings.SITH_GROUP_SAS_ADMIN_ID],
|
||||||
"recursive": False,
|
"recursive": False,
|
||||||
@@ -232,7 +232,7 @@ class TestAlbumEdit:
|
|||||||
data = {
|
data = {
|
||||||
"name": album.name[: Album.NAME_MAX_LENGTH],
|
"name": album.name[: Album.NAME_MAX_LENGTH],
|
||||||
"parent": album.pk,
|
"parent": album.pk,
|
||||||
"date": localdate().strftime("%Y-%m-%d"),
|
"date": localdate(),
|
||||||
}
|
}
|
||||||
assert AlbumEditForm(data=data).is_valid()
|
assert AlbumEditForm(data=data).is_valid()
|
||||||
|
|
||||||
@@ -245,7 +245,7 @@ class TestAlbumEdit:
|
|||||||
payload = {
|
payload = {
|
||||||
"name": album.name[: Album.NAME_MAX_LENGTH],
|
"name": album.name[: Album.NAME_MAX_LENGTH],
|
||||||
"parent": album.pk,
|
"parent": album.pk,
|
||||||
"date": localdate().strftime("%Y-%m-%d"),
|
"date": localdate(),
|
||||||
}
|
}
|
||||||
response = client.post(
|
response = client.post(
|
||||||
reverse("sas:album_edit", kwargs={"album_id": album.pk}), payload
|
reverse("sas:album_edit", kwargs={"album_id": album.pk}), payload
|
||||||
@@ -284,7 +284,7 @@ class TestAlbumEdit:
|
|||||||
payload = {
|
payload = {
|
||||||
"name": album.name[: Album.NAME_MAX_LENGTH],
|
"name": album.name[: Album.NAME_MAX_LENGTH],
|
||||||
"parent": parent().id,
|
"parent": parent().id,
|
||||||
"date": localdate().strftime("%Y-%m-%d"),
|
"date": localdate(),
|
||||||
"recursive": False,
|
"recursive": False,
|
||||||
}
|
}
|
||||||
response = client.post(
|
response = client.post(
|
||||||
|
|||||||
Reference in New Issue
Block a user