Merge pull request #3 from lemeow125/feature/docker

Feature/docker
This commit is contained in:
lemeow125 2023-09-12 21:46:02 +08:00 committed by GitHub
commit 2a4123cc75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 470 additions and 208 deletions

View file

@ -18,11 +18,14 @@ RUN apt-get update && apt-get install -y \
gdal-bin \ gdal-bin \
libsqlite3-mod-spatialite libsqlite3-mod-spatialite
# Set the working directory to /app # Create directory
WORKDIR /app RUN mkdir /code
# Copy the current directory contents into the container at /app # Set the working directory to /code
COPY . /app WORKDIR /code
# Mirror the current directory to the working directory for hotreloading
ADD . /code/
# Install pipenv # Install pipenv
RUN pip install -r linux-requirements.txt RUN pip install -r linux-requirements.txt
@ -35,6 +38,3 @@ RUN python stude/manage.py custom_migrate
# Expose port 8000 for the web server # Expose port 8000 for the web server
EXPOSE 8000 EXPOSE 8000
# Run the web server
CMD ["python", "stude/manage.py", "runserver"]

View file

@ -18,6 +18,8 @@ django-extra-fields = "*"
drf-spectacular = {extras = ["sidecar"], version = "*"} drf-spectacular = {extras = ["sidecar"], version = "*"}
gdal = {path = "./packages/GDAL-3.4.3-cp311-cp311-win_amd64.whl"} gdal = {path = "./packages/GDAL-3.4.3-cp311-cp311-win_amd64.whl"}
pip = "*" pip = "*"
channels_redis = "*"
redis = "*"
[dev-packages] [dev-packages]

475
Pipfile.lock generated
View file

@ -1,7 +1,7 @@
{ {
"_meta": { "_meta": {
"hash": { "hash": {
"sha256": "45d32c3a910f100917d41735bda5081fc095aeee98f9a672317e9218a0e3cde3" "sha256": "598151ce3d99de94950c7a3d9029eddfe3b962904122607ff3a1230aa1299110"
}, },
"pipfile-spec": 6, "pipfile-spec": 6,
"requires": { "requires": {
@ -24,6 +24,14 @@
"markers": "python_version >= '3.7'", "markers": "python_version >= '3.7'",
"version": "==3.7.2" "version": "==3.7.2"
}, },
"async-timeout": {
"hashes": [
"sha256:4640d96be84d82d02ed59ea2b7105a0f7b33abe8703703cd0ab0bf87c427522f",
"sha256:7405140ff1230c310e51dc27b3145b9092d659ce68ff733fb0cefe3ee42be028"
],
"markers": "python_full_version <= '3.11.2'",
"version": "==4.0.3"
},
"attrs": { "attrs": {
"hashes": [ "hashes": [
"sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04", "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04",
@ -131,6 +139,14 @@
"markers": "python_version >= '3.7'", "markers": "python_version >= '3.7'",
"version": "==4.0.0" "version": "==4.0.0"
}, },
"channels-redis": {
"hashes": [
"sha256:3696f5b9fe367ea495d402ba83d7c3c99e8ca0e1354ff8d913535976ed0abf73",
"sha256:6bd4f75f4ab4a7db17cee495593ace886d7e914c66f8214a1f247ff6659c073a"
],
"index": "pypi",
"version": "==4.1.0"
},
"charset-normalizer": { "charset-normalizer": {
"hashes": [ "hashes": [
"sha256:04e57ab9fbf9607b77f7d057974694b4f6b142da9ed4a199859d9d4d5c63fe96", "sha256:04e57ab9fbf9607b77f7d057974694b4f6b142da9ed4a199859d9d4d5c63fe96",
@ -221,32 +237,32 @@
}, },
"cryptography": { "cryptography": {
"hashes": [ "hashes": [
"sha256:01f1d9e537f9a15b037d5d9ee442b8c22e3ae11ce65ea1f3316a41c78756b711", "sha256:0d09fb5356f975974dbcb595ad2d178305e5050656affb7890a1583f5e02a306",
"sha256:079347de771f9282fbfe0e0236c716686950c19dee1b76240ab09ce1624d76d7", "sha256:23c2d778cf829f7d0ae180600b17e9fceea3c2ef8b31a99e3c694cbbf3a24b84",
"sha256:182be4171f9332b6741ee818ec27daff9fb00349f706629f5cbf417bd50e66fd", "sha256:3fb248989b6363906827284cd20cca63bb1a757e0a2864d4c1682a985e3dca47",
"sha256:192255f539d7a89f2102d07d7375b1e0a81f7478925b3bc2e0549ebf739dae0e", "sha256:41d7aa7cdfded09b3d73a47f429c298e80796c8e825ddfadc84c8a7f12df212d",
"sha256:2a034bf7d9ca894720f2ec1d8b7b5832d7e363571828037f9e0c4f18c1b58a58", "sha256:42cb413e01a5d36da9929baa9d70ca90d90b969269e5a12d39c1e0d475010116",
"sha256:342f3767e25876751e14f8459ad85e77e660537ca0a066e10e75df9c9e9099f0", "sha256:4c2f0d35703d61002a2bbdcf15548ebb701cfdd83cdc12471d2bae80878a4207",
"sha256:439c3cc4c0d42fa999b83ded80a9a1fb54d53c58d6e59234cfe97f241e6c781d", "sha256:4fd871184321100fb400d759ad0cddddf284c4b696568204d281c902fc7b0d81",
"sha256:49c3222bb8f8e800aead2e376cbef687bc9e3cb9b58b29a261210456a7783d83", "sha256:5259cb659aa43005eb55a0e4ff2c825ca111a0da1814202c64d28a985d33b087",
"sha256:674b669d5daa64206c38e507808aae49904c988fa0a71c935e7006a3e1e83831", "sha256:57a51b89f954f216a81c9d057bf1a24e2f36e764a1ca9a501a6964eb4a6800dd",
"sha256:7a9a3bced53b7f09da251685224d6a260c3cb291768f54954e28f03ef14e3766", "sha256:652627a055cb52a84f8c448185922241dd5217443ca194d5739b44612c5e6507",
"sha256:7af244b012711a26196450d34f483357e42aeddb04128885d95a69bd8b14b69b", "sha256:67e120e9a577c64fe1f611e53b30b3e69744e5910ff3b6e97e935aeb96005858",
"sha256:7d230bf856164de164ecb615ccc14c7fc6de6906ddd5b491f3af90d3514c925c", "sha256:6af1c6387c531cd364b72c28daa29232162010d952ceb7e5ca8e2827526aceae",
"sha256:84609ade00a6ec59a89729e87a503c6e36af98ddcd566d5f3be52e29ba993182", "sha256:6d192741113ef5e30d89dcb5b956ef4e1578f304708701b8b73d38e3e1461f34",
"sha256:9a6673c1828db6270b76b22cc696f40cde9043eb90373da5c2f8f2158957f42f", "sha256:7efe8041897fe7a50863e51b77789b657a133c75c3b094e51b5e4b5cec7bf906",
"sha256:9b6d717393dbae53d4e52684ef4f022444fc1cce3c48c38cb74fca29e1f08eaa", "sha256:84537453d57f55a50a5b6835622ee405816999a7113267739a1b4581f83535bd",
"sha256:9c3fe6534d59d071ee82081ca3d71eed3210f76ebd0361798c74abc2bcf347d4", "sha256:8f09daa483aedea50d249ef98ed500569841d6498aa9c9f4b0531b9964658922",
"sha256:a719399b99377b218dac6cf547b6ec54e6ef20207b6165126a280b0ce97e0d2a", "sha256:95dd7f261bb76948b52a5330ba5202b91a26fbac13ad0e9fc8a3ac04752058c7",
"sha256:b332cba64d99a70c1e0836902720887fb4529ea49ea7f5462cf6640e095e11d2", "sha256:a74fbcdb2a0d46fe00504f571a2a540532f4c188e6ccf26f1f178480117b33c4",
"sha256:d124682c7a23c9764e54ca9ab5b308b14b18eba02722b8659fb238546de83a76", "sha256:a983e441a00a9d57a4d7c91b3116a37ae602907a7618b882c8013b5762e80574",
"sha256:d73f419a56d74fef257955f51b18d046f3506270a5fd2ac5febbfa259d6c0fa5", "sha256:ab8de0d091acbf778f74286f4989cf3d1528336af1b59f3e5d2ebca8b5fe49e1",
"sha256:f0dc40e6f7aa37af01aba07277d3d64d5a03dc66d682097541ec4da03cc140ee", "sha256:aeb57c421b34af8f9fe830e1955bf493a86a7996cc1338fe41b30047d16e962c",
"sha256:f14ad275364c8b4e525d018f6716537ae7b6d369c094805cae45300847e0894f", "sha256:ce785cf81a7bdade534297ef9e490ddff800d956625020ab2ec2780a556c313e",
"sha256:f772610fe364372de33d76edcd313636a25684edb94cee53fd790195f5989d14" "sha256:d0d651aa754ef58d75cec6edfbd21259d93810b73f6ec246436a21b7841908de"
], ],
"markers": "python_version >= '3.7'", "markers": "python_version >= '3.7'",
"version": "==41.0.2" "version": "==41.0.3"
}, },
"daphne": { "daphne": {
"hashes": [ "hashes": [
@ -266,11 +282,11 @@
}, },
"django": { "django": {
"hashes": [ "hashes": [
"sha256:45a747e1c5b3d6df1b141b1481e193b033fd1fdbda3ff52677dc81afdaacbaed", "sha256:5e5c1c9548ffb7796b4a8a4782e9a2e5a3df3615259fc1bfd3ebc73b646146c1",
"sha256:f7c7852a5ac5a3da5a8d5b35cc6168f31b605971441798dac845f17ca8028039" "sha256:b6b2b5cae821077f137dc4dade696a1c2aa292f892eca28fa8d7bfdf2608ddd4"
], ],
"index": "pypi", "index": "pypi",
"version": "==4.2.3" "version": "==4.2.5"
}, },
"django-extra-fields": { "django-extra-fields": {
"hashes": [ "hashes": [
@ -296,11 +312,11 @@
}, },
"djangochannelsrestframework": { "djangochannelsrestframework": {
"hashes": [ "hashes": [
"sha256:937260996b78fad66ddf4aa03dc61434b81b21a757897a899cd541d0f197c4ce", "sha256:6e4202bb26491874c7c07dee48b91a70fc9afab5a6c7d680f50ade8da4be4eff",
"sha256:ca37fb96bb2f746129972a81dafed42d9785a37a2db36827dbf17848a0a9df96" "sha256:fc689d21f9edcc5ec2747dafe36422acc84c059bf858b05555ae3199a948250d"
], ],
"index": "pypi", "index": "pypi",
"version": "==1.1.0" "version": "==1.2.0"
}, },
"djangorestframework": { "djangorestframework": {
"hashes": [ "hashes": [
@ -312,11 +328,11 @@
}, },
"djangorestframework-simplejwt": { "djangorestframework-simplejwt": {
"hashes": [ "hashes": [
"sha256:4c0d2e2513e12587d93501ac091781684a216c3ee614eb3b5a10586aef5ca845", "sha256:631d7ae2ed4365d7196a35d3cc0f6d382f7bd3361fb24c894f8f92b4da5db27d",
"sha256:d27d4bcac2c6394f678dea8b4d0d511c6e18a7f2eb8aaeeb8a7de601aeb77c42" "sha256:8e4c5dfca8d11c0b8a66dfd8a4e3fc1c6aa7ea188d10907ff91c942f4b52ed66"
], ],
"markers": "python_version >= '3.7'", "markers": "python_version >= '3.7'",
"version": "==5.2.2" "version": "==5.3.0"
}, },
"djoser": { "djoser": {
"hashes": [ "hashes": [
@ -339,10 +355,10 @@
}, },
"drf-spectacular-sidecar": { "drf-spectacular-sidecar": {
"hashes": [ "hashes": [
"sha256:4466e396a875182ac568872cd7a6658fefc386a764272adf088ce7a8d80c795a", "sha256:027bb254e20385ae8c94bb86d13d891e0880564d859a37caf34412a9fb73622f",
"sha256:fae346a00636a57aa164d2778e7162cfaff1f59af8133c2b6a8403c8211a167b" "sha256:05a0819adf37844307671988383b6045e078cfd688ee23ad66c6311b04fe92aa"
], ],
"version": "==2023.7.1" "version": "==2023.9.1"
}, },
"gdal": { "gdal": {
"hashes": [ "hashes": [
@ -382,11 +398,11 @@
}, },
"jsonschema": { "jsonschema": {
"hashes": [ "hashes": [
"sha256:971be834317c22daaa9132340a51c01b50910724082c2c1a2ac87eeec153a3fe", "sha256:043dc26a3845ff09d20e4420d6012a9c91c9aa8999fa184e7efcfeccb41e32cb",
"sha256:fb3642735399fa958c0d2aad7057901554596c63349f4f6b283c493cf692a25d" "sha256:6e1e7569ac13be8139b2dd2c21a55d350066ee3f80df06c608b398cdc6f30e8f"
], ],
"markers": "python_version >= '3.8'", "markers": "python_version >= '3.8'",
"version": "==4.18.4" "version": "==4.19.0"
}, },
"jsonschema-specifications": { "jsonschema-specifications": {
"hashes": [ "hashes": [
@ -396,6 +412,74 @@
"markers": "python_version >= '3.8'", "markers": "python_version >= '3.8'",
"version": "==2023.7.1" "version": "==2023.7.1"
}, },
"msgpack": {
"hashes": [
"sha256:06f5174b5f8ed0ed919da0e62cbd4ffde676a374aba4020034da05fab67b9164",
"sha256:0c05a4a96585525916b109bb85f8cb6511db1c6f5b9d9cbcbc940dc6b4be944b",
"sha256:137850656634abddfb88236008339fdaba3178f4751b28f270d2ebe77a563b6c",
"sha256:17358523b85973e5f242ad74aa4712b7ee560715562554aa2134d96e7aa4cbbf",
"sha256:18334484eafc2b1aa47a6d42427da7fa8f2ab3d60b674120bce7a895a0a85bdd",
"sha256:1835c84d65f46900920b3708f5ba829fb19b1096c1800ad60bae8418652a951d",
"sha256:1967f6129fc50a43bfe0951c35acbb729be89a55d849fab7686004da85103f1c",
"sha256:1ab2f3331cb1b54165976a9d976cb251a83183631c88076613c6c780f0d6e45a",
"sha256:1c0f7c47f0087ffda62961d425e4407961a7ffd2aa004c81b9c07d9269512f6e",
"sha256:20a97bf595a232c3ee6d57ddaadd5453d174a52594bf9c21d10407e2a2d9b3bd",
"sha256:20c784e66b613c7f16f632e7b5e8a1651aa5702463d61394671ba07b2fc9e025",
"sha256:266fa4202c0eb94d26822d9bfd7af25d1e2c088927fe8de9033d929dd5ba24c5",
"sha256:28592e20bbb1620848256ebc105fc420436af59515793ed27d5c77a217477705",
"sha256:288e32b47e67f7b171f86b030e527e302c91bd3f40fd9033483f2cacc37f327a",
"sha256:3055b0455e45810820db1f29d900bf39466df96ddca11dfa6d074fa47054376d",
"sha256:332360ff25469c346a1c5e47cbe2a725517919892eda5cfaffe6046656f0b7bb",
"sha256:362d9655cd369b08fda06b6657a303eb7172d5279997abe094512e919cf74b11",
"sha256:366c9a7b9057e1547f4ad51d8facad8b406bab69c7d72c0eb6f529cf76d4b85f",
"sha256:36961b0568c36027c76e2ae3ca1132e35123dcec0706c4b7992683cc26c1320c",
"sha256:379026812e49258016dd84ad79ac8446922234d498058ae1d415f04b522d5b2d",
"sha256:382b2c77589331f2cb80b67cc058c00f225e19827dbc818d700f61513ab47bea",
"sha256:476a8fe8fae289fdf273d6d2a6cb6e35b5a58541693e8f9f019bfe990a51e4ba",
"sha256:48296af57cdb1d885843afd73c4656be5c76c0c6328db3440c9601a98f303d87",
"sha256:4867aa2df9e2a5fa5f76d7d5565d25ec76e84c106b55509e78c1ede0f152659a",
"sha256:4c075728a1095efd0634a7dccb06204919a2f67d1893b6aa8e00497258bf926c",
"sha256:4f837b93669ce4336e24d08286c38761132bc7ab29782727f8557e1eb21b2080",
"sha256:4f8d8b3bf1ff2672567d6b5c725a1b347fe838b912772aa8ae2bf70338d5a198",
"sha256:525228efd79bb831cf6830a732e2e80bc1b05436b086d4264814b4b2955b2fa9",
"sha256:5494ea30d517a3576749cad32fa27f7585c65f5f38309c88c6d137877fa28a5a",
"sha256:55b56a24893105dc52c1253649b60f475f36b3aa0fc66115bffafb624d7cb30b",
"sha256:56a62ec00b636583e5cb6ad313bbed36bb7ead5fa3a3e38938503142c72cba4f",
"sha256:57e1f3528bd95cc44684beda696f74d3aaa8a5e58c816214b9046512240ef437",
"sha256:586d0d636f9a628ddc6a17bfd45aa5b5efaf1606d2b60fa5d87b8986326e933f",
"sha256:5cb47c21a8a65b165ce29f2bec852790cbc04936f502966768e4aae9fa763cb7",
"sha256:6c4c68d87497f66f96d50142a2b73b97972130d93677ce930718f68828b382e2",
"sha256:821c7e677cc6acf0fd3f7ac664c98803827ae6de594a9f99563e48c5a2f27eb0",
"sha256:916723458c25dfb77ff07f4c66aed34e47503b2eb3188b3adbec8d8aa6e00f48",
"sha256:9e6ca5d5699bcd89ae605c150aee83b5321f2115695e741b99618f4856c50898",
"sha256:9f5ae84c5c8a857ec44dc180a8b0cc08238e021f57abdf51a8182e915e6299f0",
"sha256:a2b031c2e9b9af485d5e3c4520f4220d74f4d222a5b8dc8c1a3ab9448ca79c57",
"sha256:a61215eac016f391129a013c9e46f3ab308db5f5ec9f25811e811f96962599a8",
"sha256:a740fa0e4087a734455f0fc3abf5e746004c9da72fbd541e9b113013c8dc3282",
"sha256:a9985b214f33311df47e274eb788a5893a761d025e2b92c723ba4c63936b69b1",
"sha256:ab31e908d8424d55601ad7075e471b7d0140d4d3dd3272daf39c5c19d936bd82",
"sha256:ac9dd47af78cae935901a9a500104e2dea2e253207c924cc95de149606dc43cc",
"sha256:addab7e2e1fcc04bd08e4eb631c2a90960c340e40dfc4a5e24d2ff0d5a3b3edb",
"sha256:b1d46dfe3832660f53b13b925d4e0fa1432b00f5f7210eb3ad3bb9a13c6204a6",
"sha256:b2de4c1c0538dcb7010902a2b97f4e00fc4ddf2c8cda9749af0e594d3b7fa3d7",
"sha256:b5ef2f015b95f912c2fcab19c36814963b5463f1fb9049846994b007962743e9",
"sha256:b72d0698f86e8d9ddf9442bdedec15b71df3598199ba33322d9711a19f08145c",
"sha256:bae7de2026cbfe3782c8b78b0db9cbfc5455e079f1937cb0ab8d133496ac55e1",
"sha256:bf22a83f973b50f9d38e55c6aade04c41ddda19b00c4ebc558930d78eecc64ed",
"sha256:c075544284eadc5cddc70f4757331d99dcbc16b2bbd4849d15f8aae4cf36d31c",
"sha256:c396e2cc213d12ce017b686e0f53497f94f8ba2b24799c25d913d46c08ec422c",
"sha256:cb5aaa8c17760909ec6cb15e744c3ebc2ca8918e727216e79607b7bbce9c8f77",
"sha256:cdc793c50be3f01106245a61b739328f7dccc2c648b501e237f0699fe1395b81",
"sha256:d25dd59bbbbb996eacf7be6b4ad082ed7eacc4e8f3d2df1ba43822da9bfa122a",
"sha256:e42b9594cc3bf4d838d67d6ed62b9e59e201862a25e9a157019e171fbe672dd3",
"sha256:e57916ef1bd0fee4f21c4600e9d1da352d8816b52a599c46460e93a6e9f17086",
"sha256:ed40e926fa2f297e8a653c954b732f125ef97bdd4c889f243182299de27e2aa9",
"sha256:ef8108f8dedf204bb7b42994abf93882da1159728a2d4c5e82012edd92c9da9f",
"sha256:f933bbda5a3ee63b8834179096923b094b76f0c7a73c1cfe8f07ad608c58844b",
"sha256:fe5c63197c55bce6385d9aee16c4d0641684628f63ace85f73571e65ad1c1e8d"
],
"version": "==1.0.5"
},
"oauthlib": { "oauthlib": {
"hashes": [ "hashes": [
"sha256:8139f29aac13e25d502680e9e19963e83f16838d48a0d71c287fe40e7067fbca", "sha256:8139f29aac13e25d502680e9e19963e83f16838d48a0d71c287fe40e7067fbca",
@ -476,22 +560,20 @@
}, },
"psycopg2": { "psycopg2": {
"hashes": [ "hashes": [
"sha256:11aca705ec888e4f4cea97289a0bf0f22a067a32614f6ef64fcf7b8bfbc53744", "sha256:1a6a2d609bce44f78af4556bea0c62a5e7f05c23e5ea9c599e07678995609084",
"sha256:1861a53a6a0fd248e42ea37c957d36950da00266378746588eab4f4b5649e95f", "sha256:44d93a0109dfdf22fe399b419bcd7fa589d86895d3931b01fb321d74dadc68f1",
"sha256:2362ee4d07ac85ff0ad93e22c693d0f37ff63e28f0615a16b6635a645f4b9214", "sha256:8275abf628c6dc7ec834ea63f6f3846bf33518907a2b9b693d41fd063767a866",
"sha256:36c941a767341d11549c0fbdbb2bf5be2eda4caf87f65dfcd7d146828bd27f39", "sha256:91e81a8333a0037babfc9fe6d11e997a9d4dac0f38c43074886b0d9dead94fe9",
"sha256:53f4ad0a3988f983e9b49a5d9765d663bbe84f508ed655affdb810af9d0972ad", "sha256:b22ed9c66da2589a664e0f1ca2465c29b75aaab36fa209d4fb916025fb9119e5",
"sha256:869776630c04f335d4124f120b7fb377fe44b0a7645ab3c34b4ba42516951889", "sha256:b6bd7d9d3a7a63faae6edf365f0ed0e9b0a1aaf1da3ca146e6b043fb3eb5d723",
"sha256:a8ad4a47f42aa6aec8d061fdae21eaed8d864d4bb0f0cade5ad32ca16fcd6258", "sha256:c7949770cafbd2f12cecc97dea410c514368908a103acf519f2a346134caa4d5",
"sha256:b81fcb9ecfc584f661b71c889edeae70bae30d3ef74fa0ca388ecda50b1222b7", "sha256:d1210fcf99aae6f728812d1d2240afc1dc44b9e6cba526a06fb8134f969957c2",
"sha256:d24ead3716a7d093b90b27b3d73459fe8cd90fd7065cf43b3c40966221d8c394", "sha256:d5c5297e2fbc8068d4255f1e606bfc9291f06f91ec31b2a0d4c536210ac5c0a2",
"sha256:ded2faa2e6dfb430af7713d87ab4abbfc764d8d7fb73eafe96a24155f906ebf5", "sha256:e9b04cbef584310a1ac0f0d55bb623ca3244c87c51187645432e342de9ae81a8",
"sha256:f15158418fd826831b28585e2ab48ed8df2d0d98f502a2b4fe619e7d5ca29011", "sha256:f00cc35bd7119f1fed17b85bd1007855194dde2cbd8de01ab8ebb17487440ad8"
"sha256:f75001a1cbbe523e00b0ef896a5a1ada2da93ccd752b7636db5a99bc57c44494",
"sha256:f7a7a5ee78ba7dc74265ba69e010ae89dae635eea0e97b055fb641a01a31d2b1"
], ],
"index": "pypi", "index": "pypi",
"version": "==2.9.6" "version": "==2.9.7"
}, },
"pyasn1": { "pyasn1": {
"hashes": [ "hashes": [
@ -548,14 +630,16 @@
}, },
"pytz": { "pytz": {
"hashes": [ "hashes": [
"sha256:1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588", "sha256:7b4fddbeb94a1eba4b557da24f19fdf9db575192544270a9101d8509f9f43d7b",
"sha256:a151b3abb88eda1d4e34a9814df37de2a80e301e68ba0fd856fb9b46bfbbbffb" "sha256:ce42d816b81b68506614c11e8937d3aa9e41007ceb50bfdcb0749b921bf646c7"
], ],
"version": "==2023.3" "version": "==2023.3.post1"
}, },
"pyyaml": { "pyyaml": {
"hashes": [ "hashes": [
"sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5",
"sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc", "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc",
"sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df",
"sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741", "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741",
"sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206", "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206",
"sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27", "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27",
@ -563,7 +647,10 @@
"sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62", "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62",
"sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98", "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98",
"sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696", "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696",
"sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290",
"sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9",
"sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d", "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d",
"sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6",
"sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867", "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867",
"sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47", "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47",
"sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486", "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486",
@ -571,9 +658,12 @@
"sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3", "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3",
"sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007", "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007",
"sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938", "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938",
"sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0",
"sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c", "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c",
"sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735", "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735",
"sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d", "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d",
"sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28",
"sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4",
"sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba", "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba",
"sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8", "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8",
"sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5", "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5",
@ -588,7 +678,9 @@
"sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43", "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43",
"sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859", "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859",
"sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673", "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673",
"sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54",
"sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a", "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a",
"sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b",
"sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab", "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab",
"sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa", "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa",
"sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c", "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c",
@ -599,13 +691,21 @@
"markers": "python_version >= '3.6'", "markers": "python_version >= '3.6'",
"version": "==6.0.1" "version": "==6.0.1"
}, },
"redis": {
"hashes": [
"sha256:06570d0b2d84d46c21defc550afbaada381af82f5b83e5b3777600e05d8e2ed0",
"sha256:5cea6c0d335c9a7332a460ed8729ceabb4d0c489c7285b0a86dbbf8a017bd120"
],
"index": "pypi",
"version": "==5.0.0"
},
"referencing": { "referencing": {
"hashes": [ "hashes": [
"sha256:47237742e990457f7512c7d27486394a9aadaf876cbfaa4be65b27b4f4d47c6b", "sha256:449b6669b6121a9e96a7f9e410b245d471e8d48964c67113ce9afe50c8dd7bdf",
"sha256:c257b08a399b6c2f5a3510a50d28ab5dbc7bbde049bcaf954d43c446f83ab548" "sha256:794ad8003c65938edcdbc027f1933215e0d0ccc0291e3ce20a4d87432b59efc0"
], ],
"markers": "python_version >= '3.8'", "markers": "python_version >= '3.8'",
"version": "==0.30.0" "version": "==0.30.2"
}, },
"requests": { "requests": {
"hashes": [ "hashes": [
@ -625,106 +725,106 @@
}, },
"rpds-py": { "rpds-py": {
"hashes": [ "hashes": [
"sha256:0173c0444bec0a3d7d848eaeca2d8bd32a1b43f3d3fde6617aac3731fa4be05f", "sha256:00e97d43a36811b78fa9ad9d3329bf34f76a31e891a7031a2ac01450c9b168ab",
"sha256:01899794b654e616c8625b194ddd1e5b51ef5b60ed61baa7a2d9c2ad7b2a4238", "sha256:013d6c784150d10236a74b4094a79d96a256b814457e388fc5a4ba9efe24c402",
"sha256:02938432352359805b6da099c9c95c8a0547fe4b274ce8f1a91677401bb9a45f", "sha256:0188b580c490bccb031e9b67e9e8c695a3c44ac5e06218b152361eca847317c3",
"sha256:03421628f0dc10a4119d714a17f646e2837126a25ac7a256bdf7c3943400f67f", "sha256:02945ae38fd78efc40900f509890de84cfd5ffe2cd2939eeb3a8800dc68b87cb",
"sha256:03975db5f103997904c37e804e5f340c8fdabbb5883f26ee50a255d664eed58c", "sha256:02b4a2e28eb24dac4ef43dda4f6a6f7766e355179b143f7d0c76a1c5488a307b",
"sha256:0766babfcf941db8607bdaf82569ec38107dbb03c7f0b72604a0b346b6eb3298", "sha256:0527c97dcd8bb983822ee31d3760187083fd3ba18ac4dd22cf5347c89d5628f4",
"sha256:07e2c54bef6838fa44c48dfbc8234e8e2466d851124b551fc4e07a1cfeb37260", "sha256:05a1382905026bdd560f806c8c7c16e0f3e3fb359ba8868203ca6e5799884968",
"sha256:0836d71ca19071090d524739420a61580f3f894618d10b666cf3d9a1688355b1", "sha256:0b309908b6ff5ffbf6394818cb73b5a2a74073acee2c57fe8719046389aeff0d",
"sha256:095b460e117685867d45548fbd8598a8d9999227e9061ee7f012d9d264e6048d", "sha256:0fc625059b83695fbb4fc8b7a8b66fa94ff9c7b78c84fb9986cd53ff88a28d80",
"sha256:0e7521f5af0233e89939ad626b15278c71b69dc1dfccaa7b97bd4cdf96536bb7", "sha256:177c033e467a66a054dd3a9534167234a3d0b2e41445807b13b626e01da25d92",
"sha256:0f2996fbac8e0b77fd67102becb9229986396e051f33dbceada3debaacc7033f", "sha256:18909093944727e068ebfc92e2e6ed1c4fa44135507c1c0555213ce211c53214",
"sha256:1054a08e818f8e18910f1bee731583fe8f899b0a0a5044c6e680ceea34f93876", "sha256:1adb04e4b4e41bf30aaa77eeb169c1b9ba9e5010e2e6ce8d6c17e1446edc9b68",
"sha256:13b602dc3e8dff3063734f02dcf05111e887f301fdda74151a93dbbc249930fe", "sha256:1ed3d5385d14be894e12a9033be989e012214a9811e7194849c94032ad69682a",
"sha256:141acb9d4ccc04e704e5992d35472f78c35af047fa0cfae2923835d153f091be", "sha256:203eb1532d51591d32e8dfafd60b5d31347ea7278c8da02b4b550287f6abe28b",
"sha256:14c408e9d1a80dcb45c05a5149e5961aadb912fff42ca1dd9b68c0044904eb32", "sha256:213f9ef5c02ec2f883c1075d25a873149daadbaea50d18d622e9db55ec9849c2",
"sha256:159fba751a1e6b1c69244e23ba6c28f879a8758a3e992ed056d86d74a194a0f3", "sha256:2275f1a022e2383da5d2d101fe11ccdcbae799148c4b83260a4b9309fa3e1fc2",
"sha256:190ca6f55042ea4649ed19c9093a9be9d63cd8a97880106747d7147f88a49d18", "sha256:22e6de18f00583f06928cc8d0993104ecc62f7c6da6478db2255de89a30e45d1",
"sha256:196cb208825a8b9c8fc360dc0f87993b8b260038615230242bf18ec84447c08d", "sha256:289073f68452b96e70990085324be7223944c7409973d13ddfe0eea1c1b5663b",
"sha256:1fcdee18fea97238ed17ab6478c66b2095e4ae7177e35fb71fbe561a27adf620", "sha256:29ec8507664f94cc08457d98cfc41c3cdbddfa8952438e644177a29b04937876",
"sha256:207f57c402d1f8712618f737356e4b6f35253b6d20a324d9a47cb9f38ee43a6b", "sha256:2a55631b93e47956fbc97d69ba2054a8c6a4016f9a3064ec4e031f5f1030cb90",
"sha256:24a81c177379300220e907e9b864107614b144f6c2a15ed5c3450e19cf536fae", "sha256:2a86d246a160d98d820ee7d02dc18c923c228de095be362e57b9fd8970b2c4a1",
"sha256:29cd8bfb2d716366a035913ced99188a79b623a3512292963d84d3e06e63b496", "sha256:2bca97521ee786087f0c5ef318fef3eef0266a9c3deff88205523cf353af7394",
"sha256:2d8b3b3a2ce0eaa00c5bbbb60b6713e94e7e0becab7b3db6c5c77f979e8ed1f1", "sha256:2c8fc6c841ada60a86d29c9ebe2e8757c47eda6553f3596c560e59ca6e9b6fa1",
"sha256:35da5cc5cb37c04c4ee03128ad59b8c3941a1e5cd398d78c37f716f32a9b7f67", "sha256:2cd0c9fb5d40887500b4ed818770c68ab4fa6e0395d286f9704be6751b1b7d98",
"sha256:44659b1f326214950a8204a248ca6199535e73a694be8d3e0e869f820767f12f", "sha256:2d27d08056fcd61ff47a0cd8407eff4d3e816c82cb6b9c6f0ce9a0ad49225f81",
"sha256:47c5f58a8e0c2c920cc7783113df2fc4ff12bf3a411d985012f145e9242a2764", "sha256:2ffbf1b38c88d0466de542e91b08225d51782282512f8e2b11715126c41fda48",
"sha256:4bd4dc3602370679c2dfb818d9c97b1137d4dd412230cfecd3c66a1bf388a196", "sha256:3fd503c27e7b7034128e30847ecdb4bff4ca5e60f29ad022a9f66ae8940d54ac",
"sha256:4ea6b73c22d8182dff91155af018b11aac9ff7eca085750455c5990cb1cfae6e", "sha256:3ff1f585a0fdc1415bd733b804f33d386064a308672249b14828130dd43e7c31",
"sha256:50025635ba8b629a86d9d5474e650da304cb46bbb4d18690532dd79341467846", "sha256:41bd430b7b63aa802c02964e331ac0b177148fef5f807d2c90d05ce71a52b4d4",
"sha256:517cbf6e67ae3623c5127206489d69eb2bdb27239a3c3cc559350ef52a3bbf0b", "sha256:43e9b1531d6a898bdf086acb75c41265c7ec4331267d7619148d407efc72bd24",
"sha256:5855c85eb8b8a968a74dc7fb014c9166a05e7e7a8377fb91d78512900aadd13d", "sha256:46af4a742b90c7460e94214f923452c2c1d050a9da1d2b8d4c70cbc045e692b7",
"sha256:5a46859d7f947061b4010e554ccd1791467d1b1759f2dc2ec9055fa239f1bc26", "sha256:46c4c550bf59ce05d6bff2c98053822549aaf9fbaf81103edea325e03350bca1",
"sha256:65a0583c43d9f22cb2130c7b110e695fff834fd5e832a776a107197e59a1898e", "sha256:4969592e3cdeefa4cbb15a26cec102cbd4a1d6e5b695fac9fa026e19741138c8",
"sha256:674c704605092e3ebbbd13687b09c9f78c362a4bc710343efe37a91457123044", "sha256:4a0536ed2b9297c75104e1a3da330828ba1b2639fa53b38d396f98bf7e3c68df",
"sha256:682726178138ea45a0766907957b60f3a1bf3acdf212436be9733f28b6c5af3c", "sha256:4a96147791e49e84207dd1530109aa0e9eeaf1c8b7a59f150047fc0fcdf9bb64",
"sha256:686ba516e02db6d6f8c279d1641f7067ebb5dc58b1d0536c4aaebb7bf01cdc5d", "sha256:4c7f9d70f99e1fbcbf57c75328b80e1c0a7f6cad43e75efa90a97221be5efe15",
"sha256:6a5d3fbd02efd9cf6a8ffc2f17b53a33542f6b154e88dd7b42ef4a4c0700fdad", "sha256:4e8474f7233fe1949ce4e03bea698a600c2d5d6b51dab6d6e6336dbe69acf23e",
"sha256:6aa8326a4a608e1c28da191edd7c924dff445251b94653988efb059b16577a4d", "sha256:4f1b804cfad04f862d6a84af9d1ad941b06f671878f0f7ecad6c92007d423de6",
"sha256:700375326ed641f3d9d32060a91513ad668bcb7e2cffb18415c399acb25de2ab", "sha256:529aab727f54a937085184e7436e1d0e19975cf10115eda12d37a683e4ee5342",
"sha256:71f2f7715935a61fa3e4ae91d91b67e571aeb5cb5d10331ab681256bda2ad920", "sha256:5612b0b1de8d5114520094bd5fc3d04eb8af6f3e10d48ef05b7c8e77c1fd9545",
"sha256:745f5a43fdd7d6d25a53ab1a99979e7f8ea419dfefebcab0a5a1e9095490ee5e", "sha256:56777c57246e048908b550af9b81b0ec9cf804fd47cb7502ccd93238bd6025c2",
"sha256:79f594919d2c1a0cc17d1988a6adaf9a2f000d2e1048f71f298b056b1018e872", "sha256:56ba7c1100ed079527f2b995bf5486a2e557e6d5b733c52e8947476338815b69",
"sha256:7d68dc8acded354c972116f59b5eb2e5864432948e098c19fe6994926d8e15c3", "sha256:59d222086daa55421d599609b32d0ebe544e57654c4a0a1490c54a7ebaa67561",
"sha256:7f67da97f5b9eac838b6980fc6da268622e91f8960e083a34533ca710bec8611", "sha256:5aba767e64b494483ad60c4873bec78d16205a21f8247c99749bd990d9c846c2",
"sha256:83b32f0940adec65099f3b1c215ef7f1d025d13ff947975a055989cb7fd019a4", "sha256:5d5eaf988951f6ecb6854ca3300b87123599c711183c83da7ce39717a7cbdbce",
"sha256:876bf9ed62323bc7dcfc261dbc5572c996ef26fe6406b0ff985cbcf460fc8a4c", "sha256:73da69e1f612c3e682e34dcb971272d90d6f27b2c99acff444ca455a89978574",
"sha256:890ba852c16ace6ed9f90e8670f2c1c178d96510a21b06d2fa12d8783a905193", "sha256:75c8766734ac0053e1d683567e65e85306c4ec62631b0591caeb287ac8f72e08",
"sha256:8b08605d248b974eb02f40bdcd1a35d3924c83a2a5e8f5d0fa5af852c4d960af", "sha256:75eea40355a8690459c7291ce6c8ce39c27bd223675c7da6619f510c728feb97",
"sha256:8b2eb034c94b0b96d5eddb290b7b5198460e2d5d0c421751713953a9c4e47d10", "sha256:80c3cf46511653f94dfe07c7c79ab105c4164d6e1dfcb35b7214fb9af53eaef4",
"sha256:8b9ec12ad5f0a4625db34db7e0005be2632c1013b253a4a60e8302ad4d462afd", "sha256:8557c807388e6617161fe51b1a4747ea8d1133f2d2ad8e79583439abebe58fbd",
"sha256:8c8d7594e38cf98d8a7df25b440f684b510cf4627fe038c297a87496d10a174f", "sha256:89438e8885a186c69fe31f7ef98bb2bf29688c466c3caf9060f404c0be89ae80",
"sha256:8d3335c03100a073883857e91db9f2e0ef8a1cf42dc0369cbb9151c149dbbc1b", "sha256:899b03a3be785a7e1ff84b237da71f0efa2f021512f147dd34ffdf7aa82cb678",
"sha256:8d70e8f14900f2657c249ea4def963bed86a29b81f81f5b76b5a9215680de945", "sha256:8de9b88f0cbac73cfed34220d13c57849e62a7099a714b929142425e926d223a",
"sha256:9039a11bca3c41be5a58282ed81ae422fa680409022b996032a43badef2a3752", "sha256:8f4d561f4728f825e3b793a53064b606ca0b6fc264f67d09e54af452aafc5b82",
"sha256:91378d9f4151adc223d584489591dbb79f78814c0734a7c3bfa9c9e09978121c", "sha256:907b214da5d2fcff0b6ddb83de1333890ca92abaf4bbf8d9c61dc1b95c87fd6e",
"sha256:9251eb8aa82e6cf88510530b29eef4fac825a2b709baf5b94a6094894f252387", "sha256:9118de88c16947eaf5b92f749e65b0501ea69e7c2be7bd6aefc12551622360e1",
"sha256:933a7d5cd4b84f959aedeb84f2030f0a01d63ae6cf256629af3081cf3e3426e8", "sha256:9568764e72d85cf7855ca78b48e07ed1be47bf230e2cea8dabda3c95f660b0ff",
"sha256:978fa96dbb005d599ec4fd9ed301b1cc45f1a8f7982d4793faf20b404b56677d", "sha256:9c74cbee9e532dc34371127f7686d6953e5153a1f22beab7f953d95ee4a0fe09",
"sha256:987b06d1cdb28f88a42e4fb8a87f094e43f3c435ed8e486533aea0bf2e53d931", "sha256:9cdfd649011ce2d90cb0dd304c5aba1190fac0c266d19a9e2b96b81cfd150a09",
"sha256:99b1c16f732b3a9971406fbfe18468592c5a3529585a45a35adbc1389a529a03", "sha256:9f00d54b18dd837f1431d66b076737deb7c29ce3ebb8412ceaf44d5e1954ac0c",
"sha256:99e7c4bb27ff1aab90dcc3e9d37ee5af0231ed98d99cb6f5250de28889a3d502", "sha256:a2f416cdfe92f5fbb77177f5f3f7830059d1582db05f2c7119bf80069d1ab69b",
"sha256:9c439fd54b2b9053717cca3de9583be6584b384d88d045f97d409f0ca867d80f", "sha256:a4cb372e22e9c879bd9a9cc9b20b7c1fbf30a605ac953da45ecec05d8a6e1c77",
"sha256:9ea4d00850ef1e917815e59b078ecb338f6a8efda23369677c54a5825dbebb55", "sha256:a65de5c02884760a14a58304fb6303f9ddfc582e630f385daea871e1bdb18686",
"sha256:9f30d205755566a25f2ae0382944fcae2f350500ae4df4e795efa9e850821d82", "sha256:aa3b3a43dabc4cc57a7800f526cbe03f71c69121e21b863fdf497b59b462b163",
"sha256:a06418fe1155e72e16dddc68bb3780ae44cebb2912fbd8bb6ff9161de56e1798", "sha256:ab0f7aabdbce4a202e013083eeab71afdb85efa405dc4a06fea98cde81204675",
"sha256:a0805911caedfe2736935250be5008b261f10a729a303f676d3d5fea6900c96a", "sha256:abe081453166e206e3a8c6d8ace57214c17b6d9477d7601ac14a365344dbc1f4",
"sha256:a1f044792e1adcea82468a72310c66a7f08728d72a244730d14880cd1dabe36b", "sha256:ae141c9017f8f473a6ee07a9425da021816a9f8c0683c2e5442f0ccf56b0fc62",
"sha256:a216b26e5af0a8e265d4efd65d3bcec5fba6b26909014effe20cd302fd1138fa", "sha256:af52078719209bef33e38131486fd784832dd8d1dc9b85f00a44f6e7437dd021",
"sha256:a987578ac5214f18b99d1f2a3851cba5b09f4a689818a106c23dbad0dfeb760f", "sha256:b00150a9a3fd0a8efaa90bc2696c105b04039d50763dd1c95a34c88c5966cb57",
"sha256:aad51239bee6bff6823bbbdc8ad85136c6125542bbc609e035ab98ca1e32a192", "sha256:b2660000e1a113869c86eb5cc07f3343467490f3cd9d0299f81da9ddae7137b7",
"sha256:ab2299e3f92aa5417d5e16bb45bb4586171c1327568f638e8453c9f8d9e0f020", "sha256:b3eb1a0d2b6d232d1bcdfc3fcc5f7b004ab3fbd9203011a3172f051d4527c0b6",
"sha256:ab6919a09c055c9b092798ce18c6c4adf49d24d4d9e43a92b257e3f2548231e7", "sha256:b589d93a60e78fe55d5bc76ee8c2bf945dbdbb7cd16044c53e0307604e448de1",
"sha256:b0c43f8ae8f6be1d605b0465671124aa8d6a0e40f1fb81dcea28b7e3d87ca1e1", "sha256:b8578fc6c8bdd0201327503720fa581000b4bd3934abbf07e2628d1ad3de157d",
"sha256:b1440c291db3f98a914e1afd9d6541e8fc60b4c3aab1a9008d03da4651e67386", "sha256:ba1b28e44f611f3f2b436bd8290050a61db4b59a8e24be4465f44897936b3824",
"sha256:b52e7c5ae35b00566d244ffefba0f46bb6bec749a50412acf42b1c3f402e2c90", "sha256:bb44644371eaa29a3aba7b69b1862d0d56f073bb7585baa32e4271a71a91ee82",
"sha256:bf4151acb541b6e895354f6ff9ac06995ad9e4175cbc6d30aaed08856558201f", "sha256:bcde80aefe7054fad6277762fb7e9d35c72ea479a485ae1bb14629c640987b30",
"sha256:c27ee01a6c3223025f4badd533bea5e87c988cb0ba2811b690395dfe16088cfe", "sha256:bd1142d22fdb183a0fff66d79134bf644401437fed874f81066d314c67ee193c",
"sha256:c545d9d14d47be716495076b659db179206e3fd997769bc01e2d550eeb685596", "sha256:bf77f9017fcfa1232f98598a637406e6c33982ccba8a5922339575c3e2b90ea5",
"sha256:c5934e2833afeaf36bd1eadb57256239785f5af0220ed8d21c2896ec4d3a765f", "sha256:c2772bb95062e3f9774140205cd65d8997e39620715486cf5f843cf4ad8f744c",
"sha256:c7671d45530fcb6d5e22fd40c97e1e1e01965fc298cbda523bb640f3d923b387", "sha256:c4ecc4e9a5d73a816cae36ee6b5d8b7a0c72013cae1e101406e832887c3dc2d8",
"sha256:c861a7e4aef15ff91233751619ce3a3d2b9e5877e0fcd76f9ea4f6847183aa16", "sha256:c86231c66e4f422e7c13ea6200bb4048b3016c8bfd11b4fd0dabd04d2c8e3501",
"sha256:d25b1c1096ef0447355f7293fbe9ad740f7c47ae032c2884113f8e87660d8f6e", "sha256:c8f6526df47953b07c45b95c4d1da6b9a0861c0e5da0271db96bb1d807825412",
"sha256:d55777a80f78dd09410bd84ff8c95ee05519f41113b2df90a69622f5540c4f8b", "sha256:ccfb77f6dc8abffa6f1c7e3975ed9070a41ce5fcc11154d2bead8c1baa940f09",
"sha256:d576c3ef8c7b2d560e301eb33891d1944d965a4d7a2eacb6332eee8a71827db6", "sha256:d9d7efaad48b859053b90dedd69bc92f2095084251e732e4c57ac9726bcb1e64",
"sha256:dd9da77c6ec1f258387957b754f0df60766ac23ed698b61941ba9acccd3284d1", "sha256:dd91a7d7a9ce7f4983097c91ce211f3e5569cc21caa16f2692298a07e396f82b",
"sha256:de0b6eceb46141984671802d412568d22c6bacc9b230174f9e55fc72ef4f57de", "sha256:de4a2fd524993578fe093044f291b4b24aab134390030b3b9b5f87fd41ab7e75",
"sha256:e07e5dbf8a83c66783a9fe2d4566968ea8c161199680e8ad38d53e075df5f0d0", "sha256:df61f818edf7c8626bfa392f825860fb670b5f8336e238eb0ec7e2a5689cdded",
"sha256:e564d2238512c5ef5e9d79338ab77f1cbbda6c2d541ad41b2af445fb200385e3", "sha256:e1147bc3d0dd1e549d991110d0a09557ec9f925dbc1ca62871fcdab2ec9d716b",
"sha256:ed89861ee8c8c47d6beb742a602f912b1bb64f598b1e2f3d758948721d44d468", "sha256:e1954f4b239d1a92081647eecfd51cbfd08ea16eb743b8af1cd0113258feea14",
"sha256:ef1f08f2a924837e112cba2953e15aacfccbbfcd773b4b9b4723f8f2ddded08e", "sha256:e281b71922208e00886e4b7ffbfcf27874486364f177418ab676f102130e7ec9",
"sha256:f411330a6376fb50e5b7a3e66894e4a39e60ca2e17dce258d53768fea06a37bd", "sha256:e69737bd56006a86fd5a78b2b85447580a6138c930a75eb9ef39fe03d90782b1",
"sha256:f68996a3b3dc9335037f82754f9cdbe3a95db42bde571d8c3be26cc6245f2324", "sha256:e82b4a70cc67094f3f3fd77579702f48fcf1de7bdc67d79b8f1e24d089a6162c",
"sha256:f7fdf55283ad38c33e35e2855565361f4bf0abd02470b8ab28d499c663bc5d7c", "sha256:e92e5817eb6bfed23aa5e45bfe30647b83602bdd6f9e25d63524d4e6258458b0",
"sha256:f963c6b1218b96db85fc37a9f0851eaf8b9040aa46dec112611697a7023da535", "sha256:eaba0613c759ebf95988a84f766ca6b7432d55ce399194f95dde588ad1be0878",
"sha256:fa2818759aba55df50592ecbc95ebcdc99917fa7b55cc6796235b04193eb3c55", "sha256:edd74b760a6bb950397e7a7bd2f38e6700f6525062650b1d77c6d851b82f02c2",
"sha256:fae5cb554b604b3f9e2c608241b5d8d303e410d7dfb6d397c335f983495ce7f6", "sha256:f40abbcc0a7d9a8a80870af839d317e6932533f98682aabd977add6c53beeb23",
"sha256:fb39aca7a64ad0c9490adfa719dbeeb87d13be137ca189d2564e596f8ba32c07" "sha256:fce7a8ee8d0f682c953c0188735d823f0fcb62779bf92cd6ba473a8e730e26ad"
], ],
"markers": "python_version >= '3.8'", "markers": "python_version >= '3.8'",
"version": "==0.9.2" "version": "==0.10.2"
}, },
"service-identity": { "service-identity": {
"hashes": [ "hashes": [
@ -735,11 +835,11 @@
}, },
"setuptools": { "setuptools": {
"hashes": [ "hashes": [
"sha256:11e52c67415a381d10d6b462ced9cfb97066179f0e871399e006c4ab101fc85f", "sha256:56ee14884fd8d0cd015411f4a13f40b4356775a0aefd9ebc1d3bfb9a1acb32f1",
"sha256:baf1fdb41c6da4cd2eae722e135500da913332ab3f2f5c7d33af9b492acb5235" "sha256:eff96148eb336377ab11beee0c73ed84f1709a40c0b870298b0d058828761bae"
], ],
"markers": "python_version >= '3.7'", "markers": "python_version >= '3.8'",
"version": "==68.0.0" "version": "==68.2.1"
}, },
"six": { "six": {
"hashes": [ "hashes": [
@ -751,11 +851,11 @@
}, },
"social-auth-app-django": { "social-auth-app-django": {
"hashes": [ "hashes": [
"sha256:0347ca4cd23ea9d15a665da9d22950552fb66b95600e6c2ebae38ca883b3a4ed", "sha256:2e71234656ddebe0c5b5ad450d42ee49f52a3f2d1708687fccf2a2c92d31a624",
"sha256:4a5dae406f3874b4003708ff120c02cb1a4c8eeead56cd163646347309fcd0f8" "sha256:8719d57d01d80dcc9629a46e6806889aa9714fe4b658d2ebe3c120450591031d"
], ],
"markers": "python_version >= '3.7'", "markers": "python_version >= '3.7'",
"version": "==5.2.0" "version": "==5.3.0"
}, },
"social-auth-core": { "social-auth-core": {
"hashes": [ "hashes": [
@ -778,33 +878,36 @@
"tls" "tls"
], ],
"hashes": [ "hashes": [
"sha256:32acbd40a94f5f46e7b42c109bfae2b302250945561783a8b7a059048f2d4d31", "sha256:3c73360add17336a622c0d811c2a2ce29866b6e59b1125fd6509b17252098a24",
"sha256:86c55f712cc5ab6f6d64e02503352464f0400f66d4f079096d744080afcccbd0" "sha256:b8bdba145de120ffb36c20e6e071cce984e89fba798611ed0704216fb7f884cd"
], ],
"markers": "python_full_version >= '3.7.1'", "markers": "python_full_version >= '3.7.1'",
"version": "==22.10.0" "version": "==23.8.0"
}, },
"twisted-iocpsupport": { "twisted-iocpsupport": {
"hashes": [ "hashes": [
"sha256:1bdccbb22199fc69fd7744d6d2dfd22d073c028c8611d994b41d2d2ad0e0f40d", "sha256:0058c963c8957bcd3deda62122e89953c9de1e867a274facc9b15dde1a9f31e8",
"sha256:1dbfac706972bf9ec5ce1ddbc735d2ebba406ad363345df8751ffd5252aa1618", "sha256:0c1b5cf37f0b2d96cc3c9bc86fff16613b9f5d0ca565c96cf1f1fb8cfca4b81c",
"sha256:1ddfc5fa22ec6f913464b736b3f46e642237f17ac41be47eed6fa9bd52f5d0e0", "sha256:196f7c7ccad4ba4d1783b1c4e1d1b22d93c04275cd780bf7498d16c77319ad6e",
"sha256:1ea2c3fbdb739c95cc8b3355305cd593d2c9ec56d709207aa1a05d4d98671e85", "sha256:300437af17396a945a58dcfffd77863303a8b6d9e65c6e81f1d2eed55b50d444",
"sha256:3f39c41c0213a81a9ce0961e30d0d7650f371ad80f8d261007d15a2deb6d5be3", "sha256:391ac4d6002a80e15f35adc4ad6056f4fe1c17ceb0d1f98ba01b0f4f917adfd7",
"sha256:4f249d0baac836bb431d6fa0178be063a310136bc489465a831e3abd2d7acafd", "sha256:3c5dc11d72519e55f727320e3cee535feedfaee09c0f0765ed1ca7badff1ab3c",
"sha256:67bec1716eb8f466ef366bbf262e1467ecc9e20940111207663ac24049785bad", "sha256:3d306fc4d88a6bcf61ce9d572c738b918578121bfd72891625fab314549024b5",
"sha256:6f8c433faaad5d53d30d1da6968d5a3730df415e2efb6864847267a9b51290cd", "sha256:4574eef1f3bb81501fb02f911298af3c02fe8179c31a33b361dd49180c3e644d",
"sha256:7efcdfafb377f32db90f42bd5fc5bb32cd1e3637ee936cdaf3aff4f4786ab3bf", "sha256:4e5f97bcbabdd79cbaa969b63439b89801ea560f11d42b0a387634275c633623",
"sha256:8faceae553cfadc42ad791b1790e7cdecb7751102608c405217f6a26e877e0c5", "sha256:6081bd7c2f4fcf9b383dcdb3b3385d75a26a7c9d2be25b6950c3d8ea652d2d2d",
"sha256:98a6f16ab215f8c1446e9fc60aaed0ab7c746d566aa2f3492a23cea334e6bebb", "sha256:76f7e67cec1f1d097d1f4ed7de41be3d74546e1a4ede0c7d56e775c4dce5dfb0",
"sha256:a379ef56a576c8090889f74441bc3822ca31ac82253cc61e8d50631bcb0c26d0", "sha256:7c66fa0aa4236b27b3c61cb488662d85dae746a6d1c7b0d91cf7aae118445adf",
"sha256:aaca8f30c3b7c80d27a33fe9fe0d0bac42b1b012ddc60f677175c30e1becc1f3", "sha256:858096c0d15e33f15ac157f455d8f86f2f2cdd223963e58c0f682a3af8362d89",
"sha256:afb00801fdfbaccf0d0173a722626500023d4a19719ac9f129d1347a32e2fc66", "sha256:872747a3b64e2909aee59c803ccd0bceb9b75bf27915520ebd32d69687040fa2",
"sha256:db11c80054b52dbdea44d63d5474a44c9a6531882f0e2960268b15123088641a", "sha256:afa2b630797f9ed2f27f3d9f55e3f72b4244911e45a8c82756f44babbf0b243e",
"sha256:dff43136c33665c2d117a73706aef6f7d6433e5c4560332a118fe066b16b8695" "sha256:c2712b778bacf1db434e3e065adfed3db300754186a29aecac1efae9ef4bcaff",
"sha256:c27985e949b9b1a1fb4c20c71d315c10ea0f93fdf3ccdd4a8c158b5926edd8c8",
"sha256:cc86c2ef598c15d824a243c2541c29459881c67fc3c0adb6efe2242f8f0ec3af",
"sha256:e311dfcb470696e3c077249615893cada598e62fa7c4e4ca090167bd2b7d331f"
], ],
"markers": "platform_system == 'Windows'", "markers": "platform_system == 'Windows'",
"version": "==1.0.3" "version": "==1.0.4"
}, },
"txaio": { "txaio": {
"hashes": [ "hashes": [
@ -854,7 +957,7 @@
"index": "pypi", "index": "pypi",
"version": "==6.5.0" "version": "==6.5.0"
}, },
"zope.interface": { "zope-interface": {
"hashes": [ "hashes": [
"sha256:042f2381118b093714081fd82c98e3b189b68db38ee7d35b63c327c470ef8373", "sha256:042f2381118b093714081fd82c98e3b189b68db38ee7d35b63c327c470ef8373",
"sha256:0ec9653825f837fbddc4e4b603d90269b501486c11800d7c761eee7ce46d1bbb", "sha256:0ec9653825f837fbddc4e4b603d90269b501486c11800d7c761eee7ce46d1bbb",

View file

@ -8,12 +8,20 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
image: stude_backend:latest image: stude_backend:latest
ports: ports:
- "8192:8000" # Expose port 8000 for the web server - "8083:8000" # Expose port 8083 for the web server
environment: environment:
- PYTHONBUFFERED=1 - PYTHONBUFFERED=1
command: ["python", "stude/manage.py", "runserver"] command: ["sh", "-c", "python stude/wait_for_redis.py && python stude/manage.py runserver"]
volumes: volumes:
- stude:/app - .:/code # For hotreloading
depends_on:
- redis # Add this to make sure Django can reach the Redis server
# Redis Server
redis:
image: redis:latest
ports:
- "6379:6379" # Expose Redis default port
volumes: volumes:
stude: stude:

Binary file not shown.

View file

@ -5,14 +5,15 @@ from .models import CustomUser
from year_levels.models import Year_Level from year_levels.models import Year_Level
from semesters.models import Semester from semesters.models import Semester
from courses.models import Course from courses.models import Course
from subjects.models import Subject from subjects.models import SubjectInstance
from django.contrib.admin.widgets import FilteredSelectMultiple
class CustomUserForm(forms.ModelForm): class CustomUserForm(forms.ModelForm):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super(CustomUserForm, self).__init__(*args, **kwargs) super(CustomUserForm, self).__init__(*args, **kwargs)
if self.instance: if self.instance:
self.fields['subjects'].queryset = Subject.objects.filter( self.fields['subjects'].queryset = SubjectInstance.objects.filter(
course=self.instance.course) course=self.instance.course)
year_level = forms.ModelChoiceField( year_level = forms.ModelChoiceField(
@ -22,7 +23,7 @@ class CustomUserForm(forms.ModelForm):
course = forms.ModelChoiceField( course = forms.ModelChoiceField(
queryset=Course.objects.all(), required=False) queryset=Course.objects.all(), required=False)
subjects = forms.ModelMultipleChoiceField( subjects = forms.ModelMultipleChoiceField(
queryset=Subject.objects.none(), required=False, widget=forms.CheckboxSelectMultiple) queryset=SubjectInstance.objects.none(), required=False, widget=FilteredSelectMultiple("Subjects", is_stacked=False))
avatar = forms.ImageField(required=False) avatar = forms.ImageField(required=False)
class Meta: class Meta:

View file

@ -21,7 +21,6 @@ load_dotenv() # loads the configs from .env
# Build paths inside the project like this: BASE_DIR / 'subdir'. # Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production # Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/ # See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/
@ -141,12 +140,26 @@ REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': ( 'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework_simplejwt.authentication.JWTAuthentication', 'rest_framework_simplejwt.authentication.JWTAuthentication',
), ),
'DEFAULT_THROTTLE_CLASSES': [
'rest_framework.throttling.AnonRateThrottle',
'rest_framework.throttling.UserRateThrottle'
],
'DEFAULT_THROTTLE_RATES': {
'anon': '360/min',
'user': '1440/min'
},
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema', 'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
} }
WSGI_APPLICATION = 'config.wsgi.application' WSGI_APPLICATION = 'config.wsgi.application'
# Database # Database
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases # https://docs.djangoproject.com/en/4.2/ref/settings/#databases
@ -244,5 +257,34 @@ LEAFLET_CONFIG = {
'DEFAULT_ZOOM': 19, 'DEFAULT_ZOOM': 19,
'MAX_ZOOM': 20, 'MAX_ZOOM': 20,
'MIN_ZOOM': 3, 'MIN_ZOOM': 3,
'SCALE': 'both' 'SCALE': 'both',
'TILES': 'https://openstreetmap.keannu1.duckdns.org/tile/{z}/{x}/{y}.png'
}
REDIS_HOST = os.getenv('REDIS_HOST', 'localhost')
REDIS_PORT = os.getenv('REDIS_PORT', 6379)
# Django Redis Cache
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://redis:6379/1",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
}
}
}
SESSION_ENGINE = "django.contrib.sessions.backends.cache"
SESSION_CACHE_ALIAS = "default"
# Redis Cache for Django Channel Websockets
CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels_redis.core.RedisChannelLayer",
"CONFIG": {
"hosts": [("redis", 6379)],
},
},
} }

View file

@ -1,3 +1,5 @@
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_page
from rest_framework import generics from rest_framework import generics
from .models import Course from .models import Course
from .serializers import CourseSerializer from .serializers import CourseSerializer
@ -6,3 +8,7 @@ from .serializers import CourseSerializer
class CourseListView(generics.ListAPIView): class CourseListView(generics.ListAPIView):
serializer_class = CourseSerializer serializer_class = CourseSerializer
queryset = Course.objects.all() queryset = Course.objects.all()
@method_decorator(cache_page(60*60))
def dispatch(self, *args, **kwargs):
return super().dispatch(*args, **kwargs)

View file

@ -1,3 +1,5 @@
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_page
from rest_framework import generics from rest_framework import generics
from rest_framework.permissions import IsAuthenticated from rest_framework.permissions import IsAuthenticated
from .serializers import LandmarkSerializer from .serializers import LandmarkSerializer
@ -8,3 +10,7 @@ class LandmarkListView(generics.ListAPIView):
serializer_class = LandmarkSerializer serializer_class = LandmarkSerializer
# permission_classes = [IsAuthenticated] # permission_classes = [IsAuthenticated]
queryset = Landmark.objects.all() queryset = Landmark.objects.all()
@method_decorator(cache_page(60*60))
def dispatch(self, *args, **kwargs):
return super().dispatch(*args, **kwargs)

View file

@ -1,3 +1,5 @@
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_page
from rest_framework import generics from rest_framework import generics
from .models import Semester from .models import Semester
from .serializers import SemesterSerializer from .serializers import SemesterSerializer
@ -6,3 +8,7 @@ from .serializers import SemesterSerializer
class SemesterListView(generics.ListAPIView): class SemesterListView(generics.ListAPIView):
serializer_class = SemesterSerializer serializer_class = SemesterSerializer
queryset = Semester.objects.all() queryset = Semester.objects.all()
@method_decorator(cache_page(60*60))
def dispatch(self, *args, **kwargs):
return super().dispatch(*args, **kwargs)

View file

@ -0,0 +1,20 @@
# Generated by Django 4.2.3 on 2023-09-05 12:19
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('subjects', '0002_alter_subject_name_alter_subjectinstance_subject'),
('student_status', '0002_initial'),
]
operations = [
migrations.AlterField(
model_name='studentstatus',
name='subject',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='subjects.subject', to_field='name'),
),
]

View file

@ -11,7 +11,7 @@ class StudentStatus(models.Model):
CustomUser, on_delete=models.CASCADE, primary_key=True) CustomUser, on_delete=models.CASCADE, primary_key=True)
location = gis_models.PointField(blank=True, null=True, srid=4326) location = gis_models.PointField(blank=True, null=True, srid=4326)
subject = models.ForeignKey( subject = models.ForeignKey(
'subjects.Subject', on_delete=models.SET_NULL, null=True) 'subjects.Subject', on_delete=models.SET_NULL, null=True, to_field='name')
active = models.BooleanField(default=False) active = models.BooleanField(default=False)
timestamp = models.DateTimeField(auto_now_add=True) timestamp = models.DateTimeField(auto_now_add=True)
landmark = models.ForeignKey( landmark = models.ForeignKey(

View file

@ -7,6 +7,7 @@ from django.contrib.gis.db.models.functions import Distance
from django.contrib.gis.geos import fromstr from django.contrib.gis.geos import fromstr
from .models import StudentStatus from .models import StudentStatus
from .serializers import StudentStatusLocationSerializer, StudentStatusSerializer from .serializers import StudentStatusLocationSerializer, StudentStatusSerializer
from subjects.models import Subject, SubjectInstance
class StudentStatusAPIView(generics.RetrieveUpdateAPIView): class StudentStatusAPIView(generics.RetrieveUpdateAPIView):
@ -26,7 +27,7 @@ class ActiveStudentStatusListAPIView(generics.ListAPIView):
def get_queryset(self): def get_queryset(self):
user = self.request.user user = self.request.user
return StudentStatus.objects.filter(active=True and user != user) return StudentStatus.objects.exclude(user=user).filter(active=True)
class StudentStatusListByStudentStatusLocation(generics.ListAPIView): class StudentStatusListByStudentStatusLocation(generics.ListAPIView):
@ -44,7 +45,15 @@ class StudentStatusListByStudentStatusLocation(generics.ListAPIView):
if user_status.active is False: if user_status.active is False:
raise exceptions.ValidationError("Student Status is not active") raise exceptions.ValidationError("Student Status is not active")
return StudentStatus.objects.filter(active=True and user != user).filter(subject__in=user.subjects.all()).annotate(distance=Distance('location', user_location)).filter(distance__lte=50) # Get names of all subjects of the user
user_subject_names = user.subjects.values_list('subject', flat=True)
# Exclude user
# Filter those only with the same subjects as the user
# Annotate the queryset with distance to the user
# Then filter so that only those within 50m remain
return StudentStatus.objects.exclude(user=user).filter(active=True).filter(
subject__name__in=user_subject_names).annotate(distance=Distance('location', user_location)).filter(distance__lte=50)
class StudentStatusListByCurrentLocation(viewsets.ViewSet): class StudentStatusListByCurrentLocation(viewsets.ViewSet):
@ -60,8 +69,17 @@ class StudentStatusListByCurrentLocation(viewsets.ViewSet):
if not location_str: if not location_str:
raise exceptions.ValidationError("Location is required") raise exceptions.ValidationError("Location is required")
# Parse user location from the POST request
user_location = fromstr(location_str, srid=4326) user_location = fromstr(location_str, srid=4326)
queryset = StudentStatus.objects.filter(active=True and user != user).filter(subject__in=user.subjects.all()).annotate(
# Get names of all subjects of the user
user_subject_names = user.subjects.values_list('subject', flat=True)
# Exclude user
# Filter those only with the same subjects as the user
# Annotate the queryset with distance to the user
# Then filter so that only those within 50m remain
queryset = StudentStatus.objects.exclude(user=user).filter(active=True).filter(subject__name__in=user_subject_names).annotate(
distance=Distance('location', user_location)).filter(distance__lte=50) distance=Distance('location', user_location)).filter(distance__lte=50)
serializer = StudentStatusLocationSerializer(queryset, many=True) serializer = StudentStatusLocationSerializer(queryset, many=True)
return Response(serializer.data) return Response(serializer.data)

View file

@ -0,0 +1,24 @@
# Generated by Django 4.2.3 on 2023-09-05 12:19
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('subjects', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='subject',
name='name',
field=models.CharField(max_length=64, unique=True),
),
migrations.AlterField(
model_name='subjectinstance',
name='subject',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subjects.subject', to_field='name'),
),
]

View file

@ -12,7 +12,7 @@ from semesters.models import Semester
class Subject(models.Model): class Subject(models.Model):
name = models.CharField(max_length=64) name = models.CharField(max_length=64, unique=True)
students = models.ManyToManyField( students = models.ManyToManyField(
CustomUser, blank=True) CustomUser, blank=True)
@ -22,7 +22,7 @@ class Subject(models.Model):
class SubjectInstance(models.Model): class SubjectInstance(models.Model):
subject = models.ForeignKey( subject = models.ForeignKey(
Subject, on_delete=models.CASCADE) Subject, on_delete=models.CASCADE, to_field='name')
code = models.CharField(max_length=16) code = models.CharField(max_length=16)
course = models.ForeignKey( course = models.ForeignKey(
Course, on_delete=models.CASCADE) Course, on_delete=models.CASCADE)

View file

@ -1,3 +1,5 @@
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_page
from rest_framework import generics, viewsets from rest_framework import generics, viewsets
from .models import Subject, SubjectInstance from .models import Subject, SubjectInstance
from .serializers import SubjectInstanceSerializer from .serializers import SubjectInstanceSerializer
@ -10,6 +12,10 @@ class SubjectListAllView(generics.ListAPIView):
serializer_class = SubjectInstanceSerializer serializer_class = SubjectInstanceSerializer
queryset = SubjectInstance.objects.all() queryset = SubjectInstance.objects.all()
@method_decorator(cache_page(60*60))
def dispatch(self, *args, **kwargs):
return super().dispatch(*args, **kwargs)
class SubjectListView(generics.ListAPIView): class SubjectListView(generics.ListAPIView):
permission_classes = [IsAuthenticated] permission_classes = [IsAuthenticated]

14
stude/wait_for_redis.py Normal file
View file

@ -0,0 +1,14 @@
import time
import os
import redis
REDIS_HOST = os.getenv('REDIS_HOST', 'localhost')
REDIS_PORT = os.getenv('REDIS_PORT', 6379)
if __name__ == '__main__':
while True:
try:
redis.Redis(host=REDIS_HOST, port=REDIS_PORT)
print('Redis is up!')
break
except redis.ConnectionError:
time.sleep(0.1)

View file

@ -1,3 +1,5 @@
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_page
from rest_framework import generics from rest_framework import generics
from .models import Year_Level from .models import Year_Level
from .serializers import YearLevelSerializer from .serializers import YearLevelSerializer
@ -6,3 +8,7 @@ from .serializers import YearLevelSerializer
class CourseListView(generics.ListAPIView): class CourseListView(generics.ListAPIView):
serializer_class = YearLevelSerializer serializer_class = YearLevelSerializer
queryset = Year_Level.objects.all() queryset = Year_Level.objects.all()
@method_decorator(cache_page(60*60))
def dispatch(self, *args, **kwargs):
return super().dispatch(*args, **kwargs)