diff --git a/Pipfile b/Pipfile index 732659a..bd8d554 100644 --- a/Pipfile +++ b/Pipfile @@ -12,7 +12,7 @@ whitenoise = "*" pyyaml = "*" gunicorn = "*" uritemplate = "*" -psycopg = "*" +psycopg = {extras = ["binary"], version = "*"} [dev-packages] pylint = "*" diff --git a/Pipfile.lock b/Pipfile.lock index 077080a..9da3f9a 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "44a4c02d2ebe2bd912affb1c10c1c6478e30d04a7aba87fd93593da470dd85dc" + "sha256": "c91d70b7e962f9334ad7163ca56258ee4c1acb71d3cc014358fe30235521e78d" }, "pipfile-spec": 6, "requires": { @@ -18,11 +18,11 @@ "default": { "asgiref": { "hashes": [ - "sha256:89b2ef2247e3b562a16eef663bc0e2e703ec6468e2fa8a5cd61cd449786d4f6e", - "sha256:9e0ce3aa93a819ba5b45120216b23878cf6e8525eb3848653452b4192b92afed" + "sha256:3e1e3ecc849832fe52ccf2cb6686b7a55f82bb1d6aee72a58826471390335e47", + "sha256:c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590" ], - "markers": "python_version >= '3.7'", - "version": "==3.7.2" + "markers": "python_version >= '3.8'", + "version": "==3.8.1" }, "coverage": { "hashes": [ @@ -102,12 +102,12 @@ }, "djangorestframework": { "hashes": [ - "sha256:579a333e6256b09489cbe0a067e66abe55c6595d8926be6b99423786334350c8", - "sha256:eb63f58c9f218e1a7d064d17a70751f528ed4e1d35547fdade9aaf4cd103fd08" + "sha256:3ccc0475bce968608cf30d07fb17d8e52d1d7fc8bfe779c905463200750cbca6", + "sha256:f88fad74183dfc7144b2756d0d2ac716ea5b4c7c9840995ac3bfd8ec034333c1" ], "index": "pypi", "markers": "python_version >= '3.6'", - "version": "==3.14.0" + "version": "==3.15.1" }, "gunicorn": { "hashes": [ @@ -127,20 +127,85 @@ "version": "==24.0" }, "psycopg": { + "extras": [ + "binary" + ], "hashes": [ "sha256:31144d3fb4c17d78094d9e579826f047d4af1da6a10427d91dfcfb6ecdf6f12b", "sha256:4d5a0a5a8590906daa58ebd5f3cfc34091377354a1acced269dd10faf55da60e" ], - "index": "pypi", "markers": "python_version >= '3.7'", "version": "==3.1.18" }, - "pytz": { + "psycopg-binary": { "hashes": [ - "sha256:2a29735ea9c18baf14b448846bde5a48030ed267578472d8955cd0e7443a9812", - "sha256:328171f4e3623139da4983451950b28e95ac706e13f3f2630a879749e7a8b319" + "sha256:02bd4da45d5ee9941432e2e9bf36fa71a3ac21c6536fe7366d1bd3dd70d6b1e7", + "sha256:0f68ac2364a50d4cf9bb803b4341e83678668f1881a253e1224574921c69868c", + "sha256:13bcd3742112446037d15e360b27a03af4b5afcf767f5ee374ef8f5dd7571b31", + "sha256:1729d0e3dfe2546d823841eb7a3d003144189d6f5e138ee63e5227f8b75276a5", + "sha256:1859aeb2133f5ecdd9cbcee155f5e38699afc06a365f903b1512c765fd8d457e", + "sha256:1c9b6bd7fb5c6638cb32469674707649b526acfe786ba6d5a78ca4293d87bae4", + "sha256:247474af262bdd5559ee6e669926c4f23e9cf53dae2d34c4d991723c72196404", + "sha256:258d2f0cb45e4574f8b2fe7c6d0a0e2eb58903a4fd1fbaf60954fba82d595ab7", + "sha256:2e2484ae835dedc80cdc7f1b1a939377dc967fed862262cfd097aa9f50cade46", + "sha256:320047e3d3554b857e16c2b6b615a85e0db6a02426f4d203a4594a2f125dfe57", + "sha256:39242546383f6b97032de7af30edb483d237a0616f6050512eee7b218a2aa8ee", + "sha256:3c2b039ae0c45eee4cd85300ef802c0f97d0afc78350946a5d0ec77dd2d7e834", + "sha256:3c7afcd6f1d55992f26d9ff7b0bd4ee6b475eb43aa3f054d67d32e09f18b0065", + "sha256:3e4b0bb91da6f2238dbd4fbb4afc40dfb4f045bb611b92fce4d381b26413c686", + "sha256:3e7ce4d988112ca6c75765c7f24c83bdc476a6a5ce00878df6c140ca32c3e16d", + "sha256:4085f56a8d4fc8b455e8f44380705c7795be5317419aa5f8214f315e4205d804", + "sha256:4575da95fc441244a0e2ebaf33a2b2f74164603341d2046b5cde0a9aa86aa7e2", + "sha256:489aa4fe5a0b653b68341e9e44af247dedbbc655326854aa34c163ef1bcb3143", + "sha256:4e4de16a637ec190cbee82e0c2dc4860fed17a23a35f7a1e6dc479a5c6876722", + "sha256:531381f6647fc267383dca88dbe8a70d0feff433a8e3d0c4939201fea7ae1b82", + "sha256:55ff0948457bfa8c0d35c46e3a75193906d1c275538877ba65907fd67aa059ad", + "sha256:59701118c7d8842e451f1e562d08e8708b3f5d14974eefbce9374badd723c4ae", + "sha256:5c323103dfa663b88204cf5f028e83c77d7a715f9b6f51d2bbc8184b99ddd90a", + "sha256:5d6e860edf877d4413e4a807e837d55e3a7c7df701e9d6943c06e460fa6c058f", + "sha256:639dd78ac09b144b0119076783cb64e1128cc8612243e9701d1503c816750b2e", + "sha256:6432047b8b24ef97e3fbee1d1593a0faaa9544c7a41a2c67d1f10e7621374c83", + "sha256:67284e2e450dc7a9e4d76e78c0bd357dc946334a3d410defaeb2635607f632cd", + "sha256:6ebecbf2406cd6875bdd2453e31067d1bd8efe96705a9489ef37e93b50dc6f09", + "sha256:7121acc783c4e86d2d320a7fb803460fab158a7f0a04c5e8c5d49065118c1e73", + "sha256:74e498586b72fb819ca8ea82107747d0cb6e00ae685ea6d1ab3f929318a8ce2d", + "sha256:780a90bcb69bf27a8b08bc35b958e974cb6ea7a04cdec69e737f66378a344d68", + "sha256:7ac1785d67241d5074f8086705fa68e046becea27964267ab3abd392481d7773", + "sha256:812726266ab96de681f2c7dbd6b734d327f493a78357fcc16b2ac86ff4f4e080", + "sha256:824a1bfd0db96cc6bef2d1e52d9e0963f5bf653dd5bc3ab519a38f5e6f21c299", + "sha256:87dd9154b757a5fbf6d590f6f6ea75f4ad7b764a813ae04b1d91a70713f414a1", + "sha256:887f8d856c91510148be942c7acd702ccf761a05f59f8abc123c22ab77b5a16c", + "sha256:888a72c2aca4316ca6d4a619291b805677bae99bba2f6e31a3c18424a48c7e4d", + "sha256:8f54978c4b646dec77fefd8485fa82ec1a87807f334004372af1aaa6de9539a5", + "sha256:91074f78a9f890af5f2c786691575b6b93a4967ad6b8c5a90101f7b8c1a91d9c", + "sha256:9d684227ef8212e27da5f2aff9d4d303cc30b27ac1702d4f6881935549486dd5", + "sha256:9e24e7b6a68a51cc3b162d0339ae4e1263b253e887987d5c759652f5692b5efe", + "sha256:9ffcbbd389e486d3fd83d30107bbf8b27845a295051ccabde240f235d04ed921", + "sha256:a87e9eeb80ce8ec8c2783f29bce9a50bbcd2e2342a340f159c3326bf4697afa1", + "sha256:ad35ac7fd989184bf4d38a87decfb5a262b419e8ba8dcaeec97848817412c64a", + "sha256:b15e3653c82384b043d820fc637199b5c6a36b37fa4a4943e0652785bb2bad5d", + "sha256:b293e01057e63c3ac0002aa132a1071ce0fdb13b9ee2b6b45d3abdb3525c597d", + "sha256:b2f7f95746efd1be2dc240248cc157f4315db3fd09fef2adfcc2a76e24aa5741", + "sha256:bd27f713f2e5ef3fd6796e66c1a5203a27a30ecb847be27a78e1df8a9a5ae68c", + "sha256:c38a4796abf7380f83b1653c2711cb2449dd0b2e5aca1caa75447d6fa5179c69", + "sha256:c76659ae29a84f2c14f56aad305dd00eb685bd88f8c0a3281a9a4bc6bd7d2aa7", + "sha256:c84a0174109f329eeda169004c7b7ca2e884a6305acab4a39600be67f915ed38", + "sha256:cd2a9f7f0d4dacc5b9ce7f0e767ae6cc64153264151f50698898c42cabffec0c", + "sha256:d322ba72cde4ca2eefc2196dad9ad7e52451acd2f04e3688d590290625d0c970", + "sha256:d4422af5232699f14b7266a754da49dc9bcd45eba244cf3812307934cd5d6679", + "sha256:d46ae44d66bf6058a812467f6ae84e4e157dee281bfb1cfaeca07dee07452e85", + "sha256:da917f6df8c6b2002043193cb0d74cc173b3af7eb5800ad69c4e1fbac2a71c30", + "sha256:dea4a59da7850192fdead9da888e6b96166e90608cf39e17b503f45826b16f84", + "sha256:e05f6825f8db4428782135e6986fec79b139210398f3710ed4aa6ef41473c008", + "sha256:e1cf59e0bb12e031a48bb628aae32df3d0c98fd6c759cb89f464b1047f0ca9c8", + "sha256:e252d66276c992319ed6cd69a3ffa17538943954075051e992143ccbf6dc3d3e", + "sha256:e262398e5d51563093edf30612cd1e20fedd932ad0994697d7781ca4880cdc3d", + "sha256:e28ff8f3de7b56588c2a398dc135fd9f157d12c612bd3daa7e6ba9872337f6f5", + "sha256:eea5f14933177ffe5c40b200f04f814258cc14b14a71024ad109f308e8bad414", + "sha256:f876ebbf92db70125f6375f91ab4bc6b27648aa68f90d661b1fc5affb4c9731c", + "sha256:f8ff3bc08b43f36fdc24fedb86d42749298a458c4724fb588c4d76823ac39f54" ], - "version": "==2024.1" + "version": "==3.1.18" }, "pyyaml": { "hashes": [ @@ -254,12 +319,12 @@ }, "autopep8": { "hashes": [ - "sha256:067959ca4a07b24dbd5345efa8325f5f58da4298dab0dde0443d5ed765de80cb", - "sha256:2913064abd97b3419d1cc83ea71f042cb821f87e45b9c88cad5ad3c4ea87fe0c" + "sha256:1fa8964e4618929488f4ec36795c7ff12924a68b8bf01366c094fc52f770b6e7", + "sha256:2bb76888c5edbcafe6aabab3c47ba534f5a2c2d245c2eddced4a30c4b4946357" ], "index": "pypi", - "markers": "python_version >= '3.6'", - "version": "==2.0.4" + "markers": "python_version >= '3.8'", + "version": "==2.1.0" }, "colorama": { "hashes": [ diff --git a/psychopass/migrations/0005_alter_userpsychopass_identity_attack_and_more.py b/psychopass/migrations/0005_alter_userpsychopass_identity_attack_and_more.py new file mode 100644 index 0000000..d61d714 --- /dev/null +++ b/psychopass/migrations/0005_alter_userpsychopass_identity_attack_and_more.py @@ -0,0 +1,58 @@ +# Generated by Django 5.0.3 on 2024-03-23 20:25 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('psychopass', '0004_alter_userpsychopass_identity_attack_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='userpsychopass', + name='identity_attack', + field=models.FloatField(db_default=0.5), + ), + migrations.AlterField( + model_name='userpsychopass', + name='insult', + field=models.FloatField(db_default=0.5), + ), + migrations.AlterField( + model_name='userpsychopass', + name='messages', + field=models.PositiveIntegerField(db_default=0), + ), + migrations.AlterField( + model_name='userpsychopass', + name='profanity', + field=models.FloatField(db_default=0.5), + ), + migrations.AlterField( + model_name='userpsychopass', + name='psycho_hazard', + field=models.BooleanField(db_default=False), + ), + migrations.AlterField( + model_name='userpsychopass', + name='severe_toxicity', + field=models.FloatField(db_default=0.5), + ), + migrations.AlterField( + model_name='userpsychopass', + name='sexually_explicit', + field=models.FloatField(db_default=0.5), + ), + migrations.AlterField( + model_name='userpsychopass', + name='threat', + field=models.FloatField(db_default=0.5), + ), + migrations.AlterField( + model_name='userpsychopass', + name='toxicity', + field=models.FloatField(db_default=0.5), + ), + ] diff --git a/sibyl/asgi.py b/sibyl/asgi.py index fd6357c..1705072 100644 --- a/sibyl/asgi.py +++ b/sibyl/asgi.py @@ -4,7 +4,7 @@ It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see -https://docs.djangoproject.com/en/4.1/howto/deployment/asgi/ +https://docs.djangoproject.com/en/dev/howto/deployment/asgi/ """ import os diff --git a/sibyl/settings.py b/sibyl/settings.py index d612ef3..c33f68d 100644 --- a/sibyl/settings.py +++ b/sibyl/settings.py @@ -1,13 +1,13 @@ """ Django settings for sibyl project. -Generated by 'django-admin startproject' using Django 4.0.5. +Generated by 'django-admin startproject' using Django. For more information on this file, see -https://docs.djangoproject.com/en/4.0/topics/settings/ +https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see -https://docs.djangoproject.com/en/4.0/ref/settings/ +https://docs.djangoproject.com/en/dev/ref/settings/ """ import os @@ -20,7 +20,7 @@ # Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ +# See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = get_random_secret_key() @@ -80,7 +80,7 @@ # Database -# https://docs.djangoproject.com/en/4.0/ref/settings/#databases +# https://docs.djangoproject.com/en/dev/ref/settings/#databases DATABASES = { 'default': dj_database_url.parse(os.getenv("DATABASE_URL")) if "DATABASE_URL" in os.environ else { @@ -91,7 +91,7 @@ # Password validation -# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators +# https://docs.djangoproject.com/en/dev/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { @@ -110,7 +110,7 @@ # Internationalization -# https://docs.djangoproject.com/en/4.0/topics/i18n/ +# https://docs.djangoproject.com/en/dev/topics/i18n/ LANGUAGE_CODE = 'en-us' @@ -122,14 +122,18 @@ # Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/4.0/howto/static-files/ +# https://docs.djangoproject.com/en/dev/howto/static-files/ STATIC_URL = 'static/' STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') -STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' +STORAGES = { + "staticfiles": { + "BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage", + }, +} # Default primary key field type -# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field +# https://docs.djangoproject.com/en/dev/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/sibyl/urls.py b/sibyl/urls.py index 2e53be9..83bf785 100644 --- a/sibyl/urls.py +++ b/sibyl/urls.py @@ -1,7 +1,7 @@ """sibyl URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/4.1/topics/http/urls/ + https://docs.djangoproject.com/en/dev/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views diff --git a/sibyl/wsgi.py b/sibyl/wsgi.py index 3c5b8ed..de5b519 100644 --- a/sibyl/wsgi.py +++ b/sibyl/wsgi.py @@ -4,7 +4,7 @@ It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see -https://docs.djangoproject.com/en/4.1/howto/deployment/wsgi/ +https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/ """ import os