diff --git a/src/back/poetry.lock b/src/back/poetry.lock index a18e35ee8..ae926e26c 100644 --- a/src/back/poetry.lock +++ b/src/back/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. [[package]] name = "anyio" @@ -782,6 +782,25 @@ django = ">=4.2" [package.extras] tests = ["coverage"] +[[package]] +name = "django-nested-admin" +version = "4.1.1" +description = "Django admin classes that allow for nested inlines" +optional = false +python-versions = ">=3.6" +groups = ["main"] +files = [ + {file = "django-nested-admin-4.1.1.tar.gz", hash = "sha256:645d63b38d579b034a65e0983f1f8cbb8824c75b4232f8d62a1583fa7a9f568f"}, + {file = "django_nested_admin-4.1.1-py3-none-any.whl", hash = "sha256:7e72ab7a8ae4c91074f6f709ce38fdf54f9c5f78d19e68772e0f05b83090ec9f"}, +] + +[package.dependencies] +python-monkey-business = ">=1.0.0" + +[package.extras] +dev = ["Pillow", "black", "dj-database-url", "django-selenosis", "flake8", "pytest", "pytest-cov", "pytest-django", "pytest-xdist", "selenium"] +test = ["Pillow", "dj-database-url", "django-selenosis", "pytest", "pytest-cov", "pytest-django", "pytest-xdist", "selenium"] + [[package]] name = "django-templated-mail" version = "1.1.1" @@ -1953,6 +1972,18 @@ files = [ [package.dependencies] six = ">=1.5" +[[package]] +name = "python-monkey-business" +version = "1.1.0" +description = "Utility functions for monkey-patching python code" +optional = false +python-versions = "*" +groups = ["main"] +files = [ + {file = "python-monkey-business-1.1.0.tar.gz", hash = "sha256:8393839cc741415ed5ddc2bd58e2d4ce07f966a7d26b7aebff19dcec64818edc"}, + {file = "python_monkey_business-1.1.0-py2.py3-none-any.whl", hash = "sha256:15b4f603c749ba9a7b4f1acd36af023a6c5ba0f7e591c945f8253f0ef44bf389"}, +] + [[package]] name = "python3-openid" version = "3.2.0" @@ -2440,7 +2471,7 @@ files = [ {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"}, {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"}, ] -markers = {dev = "python_version < \"3.11\""} +markers = {dev = "python_version == \"3.10\""} [[package]] name = "tomlkit" @@ -2533,7 +2564,7 @@ files = [ {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] -markers = {dev = "python_version < \"3.11\""} +markers = {dev = "python_version == \"3.10\""} [[package]] name = "tzdata" @@ -2801,4 +2832,4 @@ cffi = ["cffi (>=1.11)"] [metadata] lock-version = "2.1" python-versions = ">=3.10,<4.0" -content-hash = "65ef1545146f8d3206ce3cc82678439adc693e29cc301e57ee058ef6c8db1c76" +content-hash = "ff5370663207ae83e479d05b7d081e68844cb3a78487dd822912e8d32acc07e6" diff --git a/src/back/pyproject.toml b/src/back/pyproject.toml index 14b19fcca..be4276be7 100644 --- a/src/back/pyproject.toml +++ b/src/back/pyproject.toml @@ -109,7 +109,8 @@ dependencies = [ "xlsxwriter (>=3.2.2,<4.0.0)", "zipp (>=3.21.0,<4.0.0)", "zope-interface (>=7.2,<8.0)", - "zstandard (>=0.23.0,<0.24.0)" + "zstandard (>=0.23.0,<0.24.0)", + "django-nested-admin (>=4.1.1,<5.0.0)" ] [tool.poetry] diff --git a/src/back/tests/migrations/__pycache__/0001_initial.cpython-310.pyc b/src/back/tests/migrations/__pycache__/0001_initial.cpython-310.pyc index 4e873928a..905624bc4 100644 Binary files a/src/back/tests/migrations/__pycache__/0001_initial.cpython-310.pyc and b/src/back/tests/migrations/__pycache__/0001_initial.cpython-310.pyc differ diff --git a/src/back/tests/migrations/__pycache__/0002_test_dateend_test_datestart.cpython-310.pyc b/src/back/tests/migrations/__pycache__/0002_test_dateend_test_datestart.cpython-310.pyc index dbcdc498c..9d90a2f8f 100644 Binary files a/src/back/tests/migrations/__pycache__/0002_test_dateend_test_datestart.cpython-310.pyc and b/src/back/tests/migrations/__pycache__/0002_test_dateend_test_datestart.cpython-310.pyc differ diff --git a/src/back/tests/migrations/__pycache__/__init__.cpython-310.pyc b/src/back/tests/migrations/__pycache__/__init__.cpython-310.pyc index c826d85aa..09936bb62 100644 Binary files a/src/back/tests/migrations/__pycache__/__init__.cpython-310.pyc and b/src/back/tests/migrations/__pycache__/__init__.cpython-310.pyc differ diff --git a/src/back/tests/views.py b/src/back/tests/views.py index df18d408c..355dea9d4 100644 --- a/src/back/tests/views.py +++ b/src/back/tests/views.py @@ -64,7 +64,7 @@ class GetTests(generics.ListAPIView): """Returns a QuerySet of tests filtered by status for a given user.""" print(status) if status is None: - return Test.objects.all().order_by('dateend') + return Test.objects.all() status_filters = { 'active' : Test.objects.filter( @@ -77,7 +77,7 @@ class GetTests(generics.ListAPIView): testing__completion_date__lt=now ).distinct() } - return status_filters.get(status, Test.objects.none()).order_by('dateend') + return status_filters.get(status, Test.objects.none()) def set_attemps_number(self, user, tests): """Updates the number of attempts remaining for each test for the user."""