diff --git a/hypha/settings/dev.py b/hypha/settings/dev.py index fd073e0608..2520d60332 100644 --- a/hypha/settings/dev.py +++ b/hypha/settings/dev.py @@ -159,8 +159,11 @@ "SHOW_COLLAPSED": True, } -# Required for testing the apis from postman -REST_FRAMEWORK["DEFAULT_AUTHENTICATION_CLASSES"] = REST_FRAMEWORK[ - "DEFAULT_AUTHENTICATION_CLASSES" -] + ("rest_framework.authentication.BasicAuthentication",) +# Sentry deny URLs. SENTRY_DENY_URLS += ["__reload__", "/favicon.ico", "/media/", "/static/", "__debug__"] + +# Add django-model-info. +INSTALLED_APPS = [ + *INSTALLED_APPS, + "django_model_info.apps.DjangoModelInfoConfig", +] diff --git a/pyproject.toml b/pyproject.toml index f9adf07365..51e1c96b21 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,18 +66,19 @@ dependencies = [ [dependency-groups] "dev" = [ - "mypy>=1.13.0", "coverage>=7.4.4", "django-browser-reload>=1.16.0", "django-coverage-plugin>=3.1.0", "django-debug-toolbar>=4.3.0", "django-dynamic-fixture>=4.0.1", + "django-model-info>=0.2.2", "djhtml>=3.0.5", "dslr>=0.4.0", "factory_boy>=3.3.1", "Faker>=28.4.1", "freezegun>=1.5.1", "model-bakery>=1.17.0", + "mypy>=1.13.0", "pre-commit>=4.0.1", "pytest-cov>=4.1.0", "pytest-django>=4.9.0", diff --git a/requirements/dev.txt b/requirements/dev.txt index 820428bae9..8dd9503286 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -314,6 +314,9 @@ django-hijack==3.7.1 \ django-htmx==1.21.0 \ --hash=sha256:64bc31463017a80552b767bc216ee5700248fa72e7ccd2963495e69afbdb6abe \ --hash=sha256:6ed3b42effd5980f22e68f36cd14ee4311bff3b6cb8435a89e27f45995691572 +django-model-info==0.2.2 \ + --hash=sha256:095c5a56be1b45f182ac94dd66d439e74e5b216a10752cf50cdc54c2dafdf59d \ + --hash=sha256:25fc503b56f3e650420f107fff6bb72910275abbff3cd4352ec89c365d8c6ed7 django-modelcluster==6.4 \ --hash=sha256:0102d00e6b884721ba21e32edb716548e0dead7880e130aa2e04854bd384a42f \ --hash=sha256:839b0ddb4a1a6f5fc7d9f2f029614a84350b41315bdb80a9c8b755baaa2297f2 @@ -895,6 +898,7 @@ psycopg2==2.9.10 \ --hash=sha256:4a579d6243da40a7b3182e0430493dbd55950c493d8c68f4eec0b302f6bbf20e \ --hash=sha256:5df2b672140f95adb453af93a7d669d7a7bf0a56bcd26f1502329166f4a61716 \ --hash=sha256:65a63d7ab0e067e2cdb3cf266de39663203d38d6a8ed97f5ca0cb315c73fe067 \ + --hash=sha256:91fd603a2155da8d0cfcdbf8ab24a2d54bca72795b90d2a3ed2b6da8d979dee2 \ --hash=sha256:c6f7b8561225f9e711a9c47087388a97fdc948211c10a4bccbf0ba68ab7b3b5a pwned-passwords-django==5.1.1 \ --hash=sha256:5fea82fad910ce137a50615968a1670064799bca8cc4ad7c754564a5733348a4 \ diff --git a/requirements/prod.txt b/requirements/prod.txt index b43858874e..2122f3132c 100644 --- a/requirements/prod.txt +++ b/requirements/prod.txt @@ -632,6 +632,7 @@ psycopg2==2.9.10 \ --hash=sha256:4a579d6243da40a7b3182e0430493dbd55950c493d8c68f4eec0b302f6bbf20e \ --hash=sha256:5df2b672140f95adb453af93a7d669d7a7bf0a56bcd26f1502329166f4a61716 \ --hash=sha256:65a63d7ab0e067e2cdb3cf266de39663203d38d6a8ed97f5ca0cb315c73fe067 \ + --hash=sha256:91fd603a2155da8d0cfcdbf8ab24a2d54bca72795b90d2a3ed2b6da8d979dee2 \ --hash=sha256:c6f7b8561225f9e711a9c47087388a97fdc948211c10a4bccbf0ba68ab7b3b5a pwned-passwords-django==5.1.1 \ --hash=sha256:5fea82fad910ce137a50615968a1670064799bca8cc4ad7c754564a5733348a4 \ diff --git a/uv.lock b/uv.lock index 89e1c0d500..f59b0356dc 100644 --- a/uv.lock +++ b/uv.lock @@ -769,6 +769,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/9f/ec/0d68c022dac4a539cdd2cf8b2e23a034da9d6ef864e4bc324a5fe2b50c28/django_htmx-1.21.0-py3-none-any.whl", hash = "sha256:64bc31463017a80552b767bc216ee5700248fa72e7ccd2963495e69afbdb6abe", size = 6901 }, ] +[[package]] +name = "django-model-info" +version = "0.2.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "django" }, + { name = "rich" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/7a/29/97d3990d5251963ae687c9b525af24b291c676c2897eff1aa26d0caf7790/django-model-info-0.2.2.tar.gz", hash = "sha256:095c5a56be1b45f182ac94dd66d439e74e5b216a10752cf50cdc54c2dafdf59d", size = 16936 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8b/a7/d02fe91ba5ef08c05cde9c79a890c9a9993c1d9b0def66d903c3cdeadfd4/django_model_info-0.2.2-py2.py3-none-any.whl", hash = "sha256:25fc503b56f3e650420f107fff6bb72910275abbff3cd4352ec89c365d8c6ed7", size = 15726 }, +] + [[package]] name = "django-modelcluster" version = "6.4" @@ -1376,6 +1389,7 @@ dev = [ { name = "django-coverage-plugin" }, { name = "django-debug-toolbar" }, { name = "django-dynamic-fixture" }, + { name = "django-model-info" }, { name = "djhtml" }, { name = "dslr" }, { name = "factory-boy" }, @@ -1474,6 +1488,7 @@ dev = [ { name = "django-coverage-plugin", specifier = ">=3.1.0" }, { name = "django-debug-toolbar", specifier = ">=4.3.0" }, { name = "django-dynamic-fixture", specifier = ">=4.0.1" }, + { name = "django-model-info", specifier = ">=0.2.2" }, { name = "djhtml", specifier = ">=3.0.5" }, { name = "dslr", specifier = ">=0.4.0" }, { name = "factory-boy", specifier = ">=3.3.1" }, @@ -2503,6 +2518,7 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/33/39/5a9a229bb5414abeb86e33b8fc8143ab0aecce5a7f698a53e31367d30caa/psycopg2-2.9.10-cp311-cp311-win_amd64.whl", hash = "sha256:0435034157049f6846e95103bd8f5a668788dd913a7c30162ca9503fdf542cb4", size = 1163736 }, { url = "https://files.pythonhosted.org/packages/3d/16/4623fad6076448df21c1a870c93a9774ad8a7b4dd1660223b59082dd8fec/psycopg2-2.9.10-cp312-cp312-win32.whl", hash = "sha256:65a63d7ab0e067e2cdb3cf266de39663203d38d6a8ed97f5ca0cb315c73fe067", size = 1025113 }, { url = "https://files.pythonhosted.org/packages/66/de/baed128ae0fc07460d9399d82e631ea31a1f171c0c4ae18f9808ac6759e3/psycopg2-2.9.10-cp312-cp312-win_amd64.whl", hash = "sha256:4a579d6243da40a7b3182e0430493dbd55950c493d8c68f4eec0b302f6bbf20e", size = 1163951 }, + { url = "https://files.pythonhosted.org/packages/ae/49/a6cfc94a9c483b1fa401fbcb23aca7892f60c7269c5ffa2ac408364f80dc/psycopg2-2.9.10-cp313-cp313-win_amd64.whl", hash = "sha256:91fd603a2155da8d0cfcdbf8ab24a2d54bca72795b90d2a3ed2b6da8d979dee2", size = 2569060 }, ] [[package]]