diff --git a/Pipfile b/Pipfile index a8067abe..dc1c6a60 100644 --- a/Pipfile +++ b/Pipfile @@ -41,9 +41,13 @@ django-oauth-toolkit = ">=1.5.0" dateparser = "*" nordigen = "*" django-constance = {extras = ["database"], version = "*"} +typing-extensions = "*" [requires] +# Debian stable python_version = "3.9" +# Ubuntu 24.04 +# python_version = "3.11" [pipenv] # diff --git a/Pipfile.lock b/Pipfile.lock index af06f424..10e3bebf 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,11 +1,11 @@ { "_meta": { "hash": { - "sha256": "464ad10d645f98d7a4dd4363d819697d1ca93508276b8e1c4c043b46dd3a5bdb" + "sha256": "91e63d7984b6948d0228da90df15bb2b08d71fcc4d7e854b551b91cda50248c5" }, "pipfile-spec": 6, "requires": { - "python_version": "3.9" + "python_version": "3.11" }, "sources": [ { @@ -255,22 +255,6 @@ "index": "pypi", "version": "==1.2.0" }, - "defusedxml": { - "hashes": [ - "sha256:138c7d540a78775182206c7c97fe65b246a2f40b29471e1a2f1b0da76e7a3942", - "sha256:1c812964311154c3bf4aaf3bc1443b31ee13530b7f255eaaa062c0553c76103d" - ], - "markers": "python_version >= '3.6'", - "version": "==0.8.0rc2" - }, - "deprecated": { - "hashes": [ - "sha256:6fac8b097794a90302bdbb17b9b815e732d3c4720583ff1b198499d78470466c", - "sha256:e5323eb936458dccc2582dc6f9c322c852a775a27065ff2b0c4970b9d53d01b3" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==1.2.14" - }, "dj-rest-auth": { "hashes": [ "sha256:760b45f3a07cd6182e6a20fe07d0c55230c5f950167df724d7914d0dd8c50133" @@ -284,16 +268,15 @@ "sha256:a17fcba2aad3fc7d46fdb23215095dbbd64e6174bf4589171e732b18b07e426a" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==4.2.13" }, "django-admin-rangefilter": { "hashes": [ - "sha256:1a86deda4331ee56ccec85ece2fdc166619fcf0b336195ac340b40c6f15844a4", - "sha256:963df82cc948f938bd437df27db4b2649688034ae3045d748bbaf7686f712a70" + "sha256:57970e7714f14f2a9b14619143b3695f6c727fa8fad50352ecf4286ec77a1d25", + "sha256:c2be9ca82115cadb5b5ea04b20bbe96a8aa6935b8921972cd797c2893d272c5d" ], "index": "pypi", - "version": "==0.12.4" + "version": "==0.12.5" }, "django-allauth": { "hashes": [ @@ -377,14 +360,6 @@ "markers": "python_version >= '3'", "version": "==3.2" }, - "django-rest-auth-forked": { - "hashes": [ - "sha256:23aa7fafde3eb10b934d8a1ae2d8d7d0d8a69769d2fafd8c02c19715d424d4ce", - "sha256:4f768d6492aa8b8dde487042a314b3ca4029fa63e34e57ae080e70eb05d1c04f" - ], - "index": "pypi", - "version": "==0.9.5" - }, "djangorestframework": { "hashes": [ "sha256:3ccc0475bce968608cf30d07fb17d8e52d1d7fc8bfe779c905463200750cbca6", @@ -422,7 +397,6 @@ "sha256:4a0b436239ff76fb33f11c07a16482c521a7e09c1ce3cc293c2330afe01bec63" ], "index": "pypi", - "markers": "python_version >= '3.7'", "version": "==22.0.0" }, "idna": { @@ -430,18 +404,9 @@ "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc", "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0" ], - "index": "pypi", "markers": "python_version >= '3.5'", "version": "==3.7" }, - "importlib-metadata": { - "hashes": [ - "sha256:30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570", - "sha256:b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2" - ], - "markers": "python_version < '3.10'", - "version": "==7.1.0" - }, "itypes": { "hashes": [ "sha256:03da6872ca89d29aef62773672b2d408f490f80db48b23079a4b194c86dd04c6", @@ -454,7 +419,6 @@ "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369", "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d" ], - "index": "pypi", "markers": "python_version >= '3.7'", "version": "==3.1.4" }, @@ -463,7 +427,6 @@ "sha256:150d2b0ebbdb8f40b77f543fb44ffd2baeff48788be71f67f03566692fd55789", "sha256:771a87762a0c081ae6166958a954f80848820b2ab066937dc8b8379d65b1b039" ], - "index": "pypi", "markers": "python_version >= '3.8'", "version": "==1.5.6" }, @@ -597,11 +560,11 @@ }, "phonenumbers": { "hashes": [ - "sha256:68e06d20ae2f8fe5c7c7fd5b433f4257bc3cc747dc5196a029c7898ea449b012", - "sha256:b4e2371e35a1172aa2c91c9200b1e48e87b9355eb575768dd38058fc8d72c9ff" + "sha256:4ea00ef5012422c08c7955c21131e7ae5baa9a3ef52cf2d561e963f023006b80", + "sha256:bd315fed159aea0516f7c367231810fe8344d5bec26156b88fa18374c11d1cf2" ], "index": "pypi", - "version": "==8.13.36" + "version": "==8.13.37" }, "pycparser": { "hashes": [ @@ -611,32 +574,14 @@ "markers": "python_version >= '3.8'", "version": "==2.22" }, - "pyjwt": { - "extras": [ - "crypto" - ], - "hashes": [ - "sha256:57e28d156e3d5c10088e0c68abb90bfac3df82b40a71bd0daa20c65ccd5c23de", - "sha256:59127c392cc44c2da5bb3192169a91f429924e17aff6534d70fdc02ab3e04320" - ], - "markers": "python_version >= '3.7'", - "version": "==2.8.0" - }, "python-dateutil": { "hashes": [ "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", "version": "==2.9.0.post0" }, - "python3-openid": { - "hashes": [ - "sha256:33fbf6928f401e0b790151ed2b5290b02545e8775f982485205a066f874aaeaf", - "sha256:6626f771e0417486701e0b4daff762e7212e820ca5b29fcc0d05f6f8736dfa6b" - ], - "version": "==3.2.0" - }, "pytz": { "hashes": [ "sha256:2a29735ea9c18baf14b448846bde5a48030ed267578472d8955cd0e7443a9812", @@ -644,14 +589,6 @@ ], "version": "==2024.1" }, - "pytz-deprecation-shim": { - "hashes": [ - "sha256:8314c9692a636c8eb3bda879b9f119e350e93223ae83e70e80c31675a0fdc1a6", - "sha256:af097bae1b616dde5c5744441e2ddc69e74dfdcb0c263129610d85b87445a59d" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", - "version": "==0.1.0.post0" - }, "regex": { "hashes": [ "sha256:0721931ad5fe0dda45d07f9820b90b2148ccdd8e45bb9e9b42a146cb4f695649", @@ -745,28 +682,12 @@ "markers": "python_version >= '3.7'", "version": "==2.31.0" }, - "requests-oauthlib": { - "hashes": [ - "sha256:2577c501a2fb8d05a304c09d090d6e47c306fef15809d102b327cf8364bddab5", - "sha256:75beac4a47881eeb94d5ea5d6ad31ef88856affe2332b9aafb52c6452ccf0d7a" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==1.3.1" - }, - "setuptools": { - "hashes": [ - "sha256:e5fd0a713141a4a105412233c63dc4e17ba0090c8e8334594ac790ec97792330", - "sha256:f106dee1b506dee5102cc3f3e9e68137bbad6d47b616be7991714b0c62204251" - ], - "markers": "python_version >= '3.7'", - "version": "==67.4.0" - }, "six": { "hashes": [ "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", "version": "==1.16.0" }, "soupsieve": { @@ -782,7 +703,6 @@ "sha256:714d0a4932c059d16189f58ef5411ec2287a4360f17cdd0edd2d09d4c5087c93", "sha256:c204494cd97479d0e39f28c93d46c0b2d5959c7b9ab904762ea6c7af211c8663" ], - "index": "pypi", "markers": "python_version >= '3.8'", "version": "==0.5.0" }, @@ -791,17 +711,9 @@ "sha256:be199d06d8f09ca2c9425e3aa04a9afba33e892fe079dea959e72df7f8442343", "sha256:f933a7b288a919ca97adbff656e52ff81f7ff25d98a2aabb9355ca4090f772fe" ], - "markers": "python_version < '3.11'", + "index": "pypi", "version": "==4.12.0rc1" }, - "tzdata": { - "hashes": [ - "sha256:2b88858b0e3120792a3c0635c23daf36a7d7eeeca657c323da299d2094402a0d", - "sha256:fe5f866eddd8b96e9fcba978f8e503c909b19ea7efda11e52e39494bad3a7bfa" - ], - "markers": "python_version >= '3.6'", - "version": "==2022.7" - }, "tzlocal": { "hashes": [ "sha256:49816ef2fe65ea8ac19d19aa7a1ae0551c834303d5014c6d5a62e4cbda8047b8", @@ -825,101 +737,9 @@ ], "markers": "python_version >= '3.8'", "version": "==2.2.1" - }, - "wrapt": { - "hashes": [ - "sha256:0d2691979e93d06a95a26257adb7bfd0c93818e89b1406f5a28f36e0d8c1e1fc", - "sha256:14d7dc606219cdd7405133c713f2c218d4252f2a469003f8c46bb92d5d095d81", - "sha256:1a5db485fe2de4403f13fafdc231b0dbae5eca4359232d2efc79025527375b09", - "sha256:1acd723ee2a8826f3d53910255643e33673e1d11db84ce5880675954183ec47e", - "sha256:1ca9b6085e4f866bd584fb135a041bfc32cab916e69f714a7d1d397f8c4891ca", - "sha256:1dd50a2696ff89f57bd8847647a1c363b687d3d796dc30d4dd4a9d1689a706f0", - "sha256:2076fad65c6736184e77d7d4729b63a6d1ae0b70da4868adeec40989858eb3fb", - "sha256:2a88e6010048489cda82b1326889ec075a8c856c2e6a256072b28eaee3ccf487", - "sha256:3ebf019be5c09d400cf7b024aa52b1f3aeebeff51550d007e92c3c1c4afc2a40", - "sha256:418abb18146475c310d7a6dc71143d6f7adec5b004ac9ce08dc7a34e2babdc5c", - "sha256:43aa59eadec7890d9958748db829df269f0368521ba6dc68cc172d5d03ed8060", - "sha256:44a2754372e32ab315734c6c73b24351d06e77ffff6ae27d2ecf14cf3d229202", - "sha256:490b0ee15c1a55be9c1bd8609b8cecd60e325f0575fc98f50058eae366e01f41", - "sha256:49aac49dc4782cb04f58986e81ea0b4768e4ff197b57324dcbd7699c5dfb40b9", - "sha256:5eb404d89131ec9b4f748fa5cfb5346802e5ee8836f57d516576e61f304f3b7b", - "sha256:5f15814a33e42b04e3de432e573aa557f9f0f56458745c2074952f564c50e664", - "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d", - "sha256:66027d667efe95cc4fa945af59f92c5a02c6f5bb6012bff9e60542c74c75c362", - "sha256:66dfbaa7cfa3eb707bbfcd46dab2bc6207b005cbc9caa2199bcbc81d95071a00", - "sha256:685f568fa5e627e93f3b52fda002c7ed2fa1800b50ce51f6ed1d572d8ab3e7fc", - "sha256:6906c4100a8fcbf2fa735f6059214bb13b97f75b1a61777fcf6432121ef12ef1", - "sha256:6a42cd0cfa8ffc1915aef79cb4284f6383d8a3e9dcca70c445dcfdd639d51267", - "sha256:6dcfcffe73710be01d90cae08c3e548d90932d37b39ef83969ae135d36ef3956", - "sha256:6f6eac2360f2d543cc875a0e5efd413b6cbd483cb3ad7ebf888884a6e0d2e966", - "sha256:72554a23c78a8e7aa02abbd699d129eead8b147a23c56e08d08dfc29cfdddca1", - "sha256:73870c364c11f03ed072dda68ff7aea6d2a3a5c3fe250d917a429c7432e15228", - "sha256:73aa7d98215d39b8455f103de64391cb79dfcad601701a3aa0dddacf74911d72", - "sha256:75ea7d0ee2a15733684badb16de6794894ed9c55aa5e9903260922f0482e687d", - "sha256:7bd2d7ff69a2cac767fbf7a2b206add2e9a210e57947dd7ce03e25d03d2de292", - "sha256:807cc8543a477ab7422f1120a217054f958a66ef7314f76dd9e77d3f02cdccd0", - "sha256:8e9723528b9f787dc59168369e42ae1c3b0d3fadb2f1a71de14531d321ee05b0", - "sha256:9090c9e676d5236a6948330e83cb89969f433b1943a558968f659ead07cb3b36", - "sha256:9153ed35fc5e4fa3b2fe97bddaa7cbec0ed22412b85bcdaf54aeba92ea37428c", - "sha256:9159485323798c8dc530a224bd3ffcf76659319ccc7bbd52e01e73bd0241a0c5", - "sha256:941988b89b4fd6b41c3f0bfb20e92bd23746579736b7343283297c4c8cbae68f", - "sha256:94265b00870aa407bd0cbcfd536f17ecde43b94fb8d228560a1e9d3041462d73", - "sha256:98b5e1f498a8ca1858a1cdbffb023bfd954da4e3fa2c0cb5853d40014557248b", - "sha256:9b201ae332c3637a42f02d1045e1d0cccfdc41f1f2f801dafbaa7e9b4797bfc2", - "sha256:a0ea261ce52b5952bf669684a251a66df239ec6d441ccb59ec7afa882265d593", - "sha256:a33a747400b94b6d6b8a165e4480264a64a78c8a4c734b62136062e9a248dd39", - "sha256:a452f9ca3e3267cd4d0fcf2edd0d035b1934ac2bd7e0e57ac91ad6b95c0c6389", - "sha256:a86373cf37cd7764f2201b76496aba58a52e76dedfaa698ef9e9688bfd9e41cf", - "sha256:ac83a914ebaf589b69f7d0a1277602ff494e21f4c2f743313414378f8f50a4cf", - "sha256:aefbc4cb0a54f91af643660a0a150ce2c090d3652cf4052a5397fb2de549cd89", - "sha256:b3646eefa23daeba62643a58aac816945cadc0afaf21800a1421eeba5f6cfb9c", - "sha256:b47cfad9e9bbbed2339081f4e346c93ecd7ab504299403320bf85f7f85c7d46c", - "sha256:b935ae30c6e7400022b50f8d359c03ed233d45b725cfdd299462f41ee5ffba6f", - "sha256:bb2dee3874a500de01c93d5c71415fcaef1d858370d405824783e7a8ef5db440", - "sha256:bc57efac2da352a51cc4658878a68d2b1b67dbe9d33c36cb826ca449d80a8465", - "sha256:bf5703fdeb350e36885f2875d853ce13172ae281c56e509f4e6eca049bdfb136", - "sha256:c31f72b1b6624c9d863fc095da460802f43a7c6868c5dda140f51da24fd47d7b", - "sha256:c5cd603b575ebceca7da5a3a251e69561bec509e0b46e4993e1cac402b7247b8", - "sha256:d2efee35b4b0a347e0d99d28e884dfd82797852d62fcd7ebdeee26f3ceb72cf3", - "sha256:d462f28826f4657968ae51d2181a074dfe03c200d6131690b7d65d55b0f360f8", - "sha256:d5e49454f19ef621089e204f862388d29e6e8d8b162efce05208913dde5b9ad6", - "sha256:da4813f751142436b075ed7aa012a8778aa43a99f7b36afe9b742d3ed8bdc95e", - "sha256:db2e408d983b0e61e238cf579c09ef7020560441906ca990fe8412153e3b291f", - "sha256:db98ad84a55eb09b3c32a96c576476777e87c520a34e2519d3e59c44710c002c", - "sha256:dbed418ba5c3dce92619656802cc5355cb679e58d0d89b50f116e4a9d5a9603e", - "sha256:dcdba5c86e368442528f7060039eda390cc4091bfd1dca41e8046af7c910dda8", - "sha256:decbfa2f618fa8ed81c95ee18a387ff973143c656ef800c9f24fb7e9c16054e2", - "sha256:e4fdb9275308292e880dcbeb12546df7f3e0f96c6b41197e0cf37d2826359020", - "sha256:eb1b046be06b0fce7249f1d025cd359b4b80fc1c3e24ad9eca33e0dcdb2e4a35", - "sha256:eb6e651000a19c96f452c85132811d25e9264d836951022d6e81df2fff38337d", - "sha256:ed867c42c268f876097248e05b6117a65bcd1e63b779e916fe2e33cd6fd0d3c3", - "sha256:edfad1d29c73f9b863ebe7082ae9321374ccb10879eeabc84ba3b69f2579d537", - "sha256:f2058f813d4f2b5e3a9eb2eb3faf8f1d99b81c3e51aeda4b168406443e8ba809", - "sha256:f6b2d0c6703c988d334f297aa5df18c45e97b0af3679bb75059e0e0bd8b1069d", - "sha256:f8212564d49c50eb4565e502814f694e240c55551a5f1bc841d4fcaabb0a9b8a", - "sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4" - ], - "markers": "python_version >= '3.6'", - "version": "==1.16.0" - }, - "zipp": { - "hashes": [ - "sha256:6278d9ddbcfb1f1089a88fde84481528b07b0e10474e09dcfe53dad4069fa059", - "sha256:dce197b859eb796242b0622af1b8beb0a722d52aa2f57133ead08edd5bf5374e" - ], - "markers": "python_version >= '3.8'", - "version": "==3.18.2" } }, "develop": { - "appnope": { - "hashes": [ - "sha256:02bd91c4de869fbb1e1c50aafc4098827a7a54ab2f39d9dcba6c9547ed920e24", - "sha256:265a455292d0bd8a72453494fa24df5a11eb18373a60c7c0430889f22548605e" - ], - "markers": "sys_platform == 'darwin'", - "version": "==0.1.3" - }, "astroid": { "hashes": [ "sha256:902564b36796ba1eab3ad2c7a694861fbd926f574d5dbb5fa1d86778a2ba2d91", @@ -943,13 +763,6 @@ "index": "pypi", "version": "==2.1.0" }, - "backcall": { - "hashes": [ - "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e", - "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255" - ], - "version": "==0.2.0" - }, "black": { "hashes": [ "sha256:257d724c2c9b1660f353b36c802ccece186a30accc7742c176d29c146df6e474", @@ -976,7 +789,6 @@ "sha256:ef703f83fc32e131e9bcc0a5094cfe85599e7109f896fe8bc96cc402f3eb4b6e" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==24.4.2" }, "cachetools": { @@ -1194,7 +1006,7 @@ "sha256:3ebe3c479ad625c4553aca177444d89b486b1d84982eeacded644afc0cf797ca", "sha256:c36ca9ffb54365bdd2f8eb3eff7d2a21237f8452b57ace88b1ac615b7e815bd7" ], - "markers": "python_version < '3.11'", + "markers": "python_version >= '3.11'", "version": "==0.3.8" }, "distlib": { @@ -1210,14 +1022,6 @@ ], "version": "==0.6.2" }, - "exceptiongroup": { - "hashes": [ - "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad", - "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16" - ], - "markers": "python_version < '3.11'", - "version": "==1.2.1" - }, "executing": { "hashes": [ "sha256:35afe2ce3affba8ee97f2d69927fa823b08b472b7b994e36a52a964b93d16147", @@ -1247,17 +1051,16 @@ "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc", "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0" ], - "index": "pypi", "markers": "python_version >= '3.5'", "version": "==3.7" }, "ipython": { "hashes": [ - "sha256:ca6f079bb33457c66e233e4580ebfc4128855b4cf6370dddd73842a9563e8a27", - "sha256:e8267419d72d81955ec1177f8a29aaa90ac80ad647499201119e2f05e99aa397" + "sha256:010db3f8a728a578bb641fdd06c063b9fb8e96a9464c63aec6310fbcb5e80501", + "sha256:d7bf2f6c4314984e3e02393213bab8703cf163ede39672ce5918c51fe253a2a3" ], "index": "pypi", - "version": "==8.18.1" + "version": "==8.24.0" }, "isort": { "hashes": [ @@ -1275,48 +1078,6 @@ "markers": "python_version >= '3.6'", "version": "==0.19.1" }, - "lazy-object-proxy": { - "hashes": [ - "sha256:09763491ce220c0299688940f8dc2c5d05fd1f45af1e42e636b2e8b2303e4382", - "sha256:0a891e4e41b54fd5b8313b96399f8b0e173bbbfc03c7631f01efbe29bb0bcf82", - "sha256:189bbd5d41ae7a498397287c408617fe5c48633e7755287b21d741f7db2706a9", - "sha256:18b78ec83edbbeb69efdc0e9c1cb41a3b1b1ed11ddd8ded602464c3fc6020494", - "sha256:1aa3de4088c89a1b69f8ec0dcc169aa725b0ff017899ac568fe44ddc1396df46", - "sha256:212774e4dfa851e74d393a2370871e174d7ff0ebc980907723bb67d25c8a7c30", - "sha256:2d0daa332786cf3bb49e10dc6a17a52f6a8f9601b4cf5c295a4f85854d61de63", - "sha256:5f83ac4d83ef0ab017683d715ed356e30dd48a93746309c8f3517e1287523ef4", - "sha256:659fb5809fa4629b8a1ac5106f669cfc7bef26fbb389dda53b3e010d1ac4ebae", - "sha256:660c94ea760b3ce47d1855a30984c78327500493d396eac4dfd8bd82041b22be", - "sha256:66a3de4a3ec06cd8af3f61b8e1ec67614fbb7c995d02fa224813cb7afefee701", - "sha256:721532711daa7db0d8b779b0bb0318fa87af1c10d7fe5e52ef30f8eff254d0cd", - "sha256:7322c3d6f1766d4ef1e51a465f47955f1e8123caee67dd641e67d539a534d006", - "sha256:79a31b086e7e68b24b99b23d57723ef7e2c6d81ed21007b6281ebcd1688acb0a", - "sha256:81fc4d08b062b535d95c9ea70dbe8a335c45c04029878e62d744bdced5141586", - "sha256:8fa02eaab317b1e9e03f69aab1f91e120e7899b392c4fc19807a8278a07a97e8", - "sha256:9090d8e53235aa280fc9239a86ae3ea8ac58eff66a705fa6aa2ec4968b95c821", - "sha256:946d27deaff6cf8452ed0dba83ba38839a87f4f7a9732e8f9fd4107b21e6ff07", - "sha256:9990d8e71b9f6488e91ad25f322898c136b008d87bf852ff65391b004da5e17b", - "sha256:9cd077f3d04a58e83d04b20e334f678c2b0ff9879b9375ed107d5d07ff160171", - "sha256:9e7551208b2aded9c1447453ee366f1c4070602b3d932ace044715d89666899b", - "sha256:9f5fa4a61ce2438267163891961cfd5e32ec97a2c444e5b842d574251ade27d2", - "sha256:b40387277b0ed2d0602b8293b94d7257e17d1479e257b4de114ea11a8cb7f2d7", - "sha256:bfb38f9ffb53b942f2b5954e0f610f1e721ccebe9cce9025a38c8ccf4a5183a4", - "sha256:cbf9b082426036e19c6924a9ce90c740a9861e2bdc27a4834fd0a910742ac1e8", - "sha256:d9e25ef10a39e8afe59a5c348a4dbf29b4868ab76269f81ce1674494e2565a6e", - "sha256:db1c1722726f47e10e0b5fdbf15ac3b8adb58c091d12b3ab713965795036985f", - "sha256:e7c21c95cae3c05c14aafffe2865bbd5e377cfc1348c4f7751d9dc9a48ca4bda", - "sha256:e8c6cfb338b133fbdbc5cfaa10fe3c6aeea827db80c978dbd13bc9dd8526b7d4", - "sha256:ea806fd4c37bf7e7ad82537b0757999264d5f70c45468447bb2b91afdbe73a6e", - "sha256:edd20c5a55acb67c7ed471fa2b5fb66cb17f61430b7a6b9c3b4a1e40293b1671", - "sha256:f0117049dd1d5635bbff65444496c90e0baa48ea405125c088e93d9cf4525b11", - "sha256:f0705c376533ed2a9e5e97aacdbfe04cecd71e0aa84c7c0595d02ef93b6e4455", - "sha256:f12ad7126ae0c98d601a7ee504c1122bcef553d1d5e0c3bfa77b16b3968d2734", - "sha256:f2457189d8257dd41ae9b434ba33298aec198e30adf2dcdaaa3a28b9994f6adb", - "sha256:f699ac1c768270c9e384e4cbd268d6e67aebcfae6cd623b4d7c3bfde5a35db59" - ], - "markers": "python_version >= '3.7'", - "version": "==1.9.0" - }, "markupsafe": { "hashes": [ "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf", @@ -1444,16 +1205,9 @@ "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523", "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f" ], - "markers": "sys_platform != 'win32'", + "markers": "sys_platform != 'win32' and sys_platform != 'emscripten'", "version": "==4.9.0" }, - "pickleshare": { - "hashes": [ - "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca", - "sha256:9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56" - ], - "version": "==0.7.5" - }, "platformdirs": { "hashes": [ "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee", @@ -1513,7 +1267,6 @@ "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199", "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a" ], - "index": "pypi", "markers": "python_version >= '3.8'", "version": "==2.18.0" }, @@ -1560,20 +1313,12 @@ "index": "pypi", "version": "==1.13.0" }, - "setuptools": { - "hashes": [ - "sha256:e5fd0a713141a4a105412233c63dc4e17ba0090c8e8334594ac790ec97792330", - "sha256:f106dee1b506dee5102cc3f3e9e68137bbad6d47b616be7991714b0c62204251" - ], - "markers": "python_version >= '3.7'", - "version": "==67.4.0" - }, "six": { "hashes": [ "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", "version": "==1.16.0" }, "stack-data": { @@ -1583,14 +1328,6 @@ ], "version": "==0.6.3" }, - "tomli": { - "hashes": [ - "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc", - "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f" - ], - "markers": "python_version < '3.11'", - "version": "==2.0.1" - }, "tomlkit": { "hashes": [ "sha256:af914f5a9c59ed9d0762c7b64d3b5d5df007448eb9cd2edc8a46b1eafead172f", @@ -1620,7 +1357,7 @@ "sha256:be199d06d8f09ca2c9425e3aa04a9afba33e892fe079dea959e72df7f8442343", "sha256:f933a7b288a919ca97adbff656e52ff81f7ff25d98a2aabb9355ca4090f772fe" ], - "markers": "python_version < '3.11'", + "index": "pypi", "version": "==4.12.0rc1" }, "urllib3": { @@ -1652,84 +1389,7 @@ "sha256:fc9645dc43e03e4d630d23143a04a7f947a9a3b5727cd535fdfe155a17cc48c8" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==3.0.3" - }, - "wrapt": { - "hashes": [ - "sha256:0d2691979e93d06a95a26257adb7bfd0c93818e89b1406f5a28f36e0d8c1e1fc", - "sha256:14d7dc606219cdd7405133c713f2c218d4252f2a469003f8c46bb92d5d095d81", - "sha256:1a5db485fe2de4403f13fafdc231b0dbae5eca4359232d2efc79025527375b09", - "sha256:1acd723ee2a8826f3d53910255643e33673e1d11db84ce5880675954183ec47e", - "sha256:1ca9b6085e4f866bd584fb135a041bfc32cab916e69f714a7d1d397f8c4891ca", - "sha256:1dd50a2696ff89f57bd8847647a1c363b687d3d796dc30d4dd4a9d1689a706f0", - "sha256:2076fad65c6736184e77d7d4729b63a6d1ae0b70da4868adeec40989858eb3fb", - "sha256:2a88e6010048489cda82b1326889ec075a8c856c2e6a256072b28eaee3ccf487", - "sha256:3ebf019be5c09d400cf7b024aa52b1f3aeebeff51550d007e92c3c1c4afc2a40", - "sha256:418abb18146475c310d7a6dc71143d6f7adec5b004ac9ce08dc7a34e2babdc5c", - "sha256:43aa59eadec7890d9958748db829df269f0368521ba6dc68cc172d5d03ed8060", - "sha256:44a2754372e32ab315734c6c73b24351d06e77ffff6ae27d2ecf14cf3d229202", - "sha256:490b0ee15c1a55be9c1bd8609b8cecd60e325f0575fc98f50058eae366e01f41", - "sha256:49aac49dc4782cb04f58986e81ea0b4768e4ff197b57324dcbd7699c5dfb40b9", - "sha256:5eb404d89131ec9b4f748fa5cfb5346802e5ee8836f57d516576e61f304f3b7b", - "sha256:5f15814a33e42b04e3de432e573aa557f9f0f56458745c2074952f564c50e664", - "sha256:5f370f952971e7d17c7d1ead40e49f32345a7f7a5373571ef44d800d06b1899d", - "sha256:66027d667efe95cc4fa945af59f92c5a02c6f5bb6012bff9e60542c74c75c362", - "sha256:66dfbaa7cfa3eb707bbfcd46dab2bc6207b005cbc9caa2199bcbc81d95071a00", - "sha256:685f568fa5e627e93f3b52fda002c7ed2fa1800b50ce51f6ed1d572d8ab3e7fc", - "sha256:6906c4100a8fcbf2fa735f6059214bb13b97f75b1a61777fcf6432121ef12ef1", - "sha256:6a42cd0cfa8ffc1915aef79cb4284f6383d8a3e9dcca70c445dcfdd639d51267", - "sha256:6dcfcffe73710be01d90cae08c3e548d90932d37b39ef83969ae135d36ef3956", - "sha256:6f6eac2360f2d543cc875a0e5efd413b6cbd483cb3ad7ebf888884a6e0d2e966", - "sha256:72554a23c78a8e7aa02abbd699d129eead8b147a23c56e08d08dfc29cfdddca1", - "sha256:73870c364c11f03ed072dda68ff7aea6d2a3a5c3fe250d917a429c7432e15228", - "sha256:73aa7d98215d39b8455f103de64391cb79dfcad601701a3aa0dddacf74911d72", - "sha256:75ea7d0ee2a15733684badb16de6794894ed9c55aa5e9903260922f0482e687d", - "sha256:7bd2d7ff69a2cac767fbf7a2b206add2e9a210e57947dd7ce03e25d03d2de292", - "sha256:807cc8543a477ab7422f1120a217054f958a66ef7314f76dd9e77d3f02cdccd0", - "sha256:8e9723528b9f787dc59168369e42ae1c3b0d3fadb2f1a71de14531d321ee05b0", - "sha256:9090c9e676d5236a6948330e83cb89969f433b1943a558968f659ead07cb3b36", - "sha256:9153ed35fc5e4fa3b2fe97bddaa7cbec0ed22412b85bcdaf54aeba92ea37428c", - "sha256:9159485323798c8dc530a224bd3ffcf76659319ccc7bbd52e01e73bd0241a0c5", - "sha256:941988b89b4fd6b41c3f0bfb20e92bd23746579736b7343283297c4c8cbae68f", - "sha256:94265b00870aa407bd0cbcfd536f17ecde43b94fb8d228560a1e9d3041462d73", - "sha256:98b5e1f498a8ca1858a1cdbffb023bfd954da4e3fa2c0cb5853d40014557248b", - "sha256:9b201ae332c3637a42f02d1045e1d0cccfdc41f1f2f801dafbaa7e9b4797bfc2", - "sha256:a0ea261ce52b5952bf669684a251a66df239ec6d441ccb59ec7afa882265d593", - "sha256:a33a747400b94b6d6b8a165e4480264a64a78c8a4c734b62136062e9a248dd39", - "sha256:a452f9ca3e3267cd4d0fcf2edd0d035b1934ac2bd7e0e57ac91ad6b95c0c6389", - "sha256:a86373cf37cd7764f2201b76496aba58a52e76dedfaa698ef9e9688bfd9e41cf", - "sha256:ac83a914ebaf589b69f7d0a1277602ff494e21f4c2f743313414378f8f50a4cf", - "sha256:aefbc4cb0a54f91af643660a0a150ce2c090d3652cf4052a5397fb2de549cd89", - "sha256:b3646eefa23daeba62643a58aac816945cadc0afaf21800a1421eeba5f6cfb9c", - "sha256:b47cfad9e9bbbed2339081f4e346c93ecd7ab504299403320bf85f7f85c7d46c", - "sha256:b935ae30c6e7400022b50f8d359c03ed233d45b725cfdd299462f41ee5ffba6f", - "sha256:bb2dee3874a500de01c93d5c71415fcaef1d858370d405824783e7a8ef5db440", - "sha256:bc57efac2da352a51cc4658878a68d2b1b67dbe9d33c36cb826ca449d80a8465", - "sha256:bf5703fdeb350e36885f2875d853ce13172ae281c56e509f4e6eca049bdfb136", - "sha256:c31f72b1b6624c9d863fc095da460802f43a7c6868c5dda140f51da24fd47d7b", - "sha256:c5cd603b575ebceca7da5a3a251e69561bec509e0b46e4993e1cac402b7247b8", - "sha256:d2efee35b4b0a347e0d99d28e884dfd82797852d62fcd7ebdeee26f3ceb72cf3", - "sha256:d462f28826f4657968ae51d2181a074dfe03c200d6131690b7d65d55b0f360f8", - "sha256:d5e49454f19ef621089e204f862388d29e6e8d8b162efce05208913dde5b9ad6", - "sha256:da4813f751142436b075ed7aa012a8778aa43a99f7b36afe9b742d3ed8bdc95e", - "sha256:db2e408d983b0e61e238cf579c09ef7020560441906ca990fe8412153e3b291f", - "sha256:db98ad84a55eb09b3c32a96c576476777e87c520a34e2519d3e59c44710c002c", - "sha256:dbed418ba5c3dce92619656802cc5355cb679e58d0d89b50f116e4a9d5a9603e", - "sha256:dcdba5c86e368442528f7060039eda390cc4091bfd1dca41e8046af7c910dda8", - "sha256:decbfa2f618fa8ed81c95ee18a387ff973143c656ef800c9f24fb7e9c16054e2", - "sha256:e4fdb9275308292e880dcbeb12546df7f3e0f96c6b41197e0cf37d2826359020", - "sha256:eb1b046be06b0fce7249f1d025cd359b4b80fc1c3e24ad9eca33e0dcdb2e4a35", - "sha256:eb6e651000a19c96f452c85132811d25e9264d836951022d6e81df2fff38337d", - "sha256:ed867c42c268f876097248e05b6117a65bcd1e63b779e916fe2e33cd6fd0d3c3", - "sha256:edfad1d29c73f9b863ebe7082ae9321374ccb10879eeabc84ba3b69f2579d537", - "sha256:f2058f813d4f2b5e3a9eb2eb3faf8f1d99b81c3e51aeda4b168406443e8ba809", - "sha256:f6b2d0c6703c988d334f297aa5df18c45e97b0af3679bb75059e0e0bd8b1069d", - "sha256:f8212564d49c50eb4565e502814f694e240c55551a5f1bc841d4fcaabb0a9b8a", - "sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4" - ], - "markers": "python_version >= '3.6'", - "version": "==1.16.0" } } } diff --git a/README.md b/README.md index 943180d5..069934c3 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,8 @@ pipenv sync --dev pipenv shell ``` +If pipenv sync fails due to wrong Python version, change it in Pipfile, delete Pipfile.lock and try again. + Create your own `drfx/settings_local.py` file with at least this to get cookies working without ssl ``` @@ -96,6 +98,12 @@ CSRF_COOKIE_NAME = '__NotReallyHost-csrf' ./manage.py runserver ``` +## To create a initial superuser account + +```bash +./manage.py createsuperuser +``` + ## To update localizations Always start everything by opening the pipenv shell for this project first! (`pipenv shell`) or by prepending individual commands with (`pipenv run`) for system users that does not have shell access normally. diff --git a/drfx/settings.py b/drfx/settings.py index 6103367a..e03a8da6 100644 --- a/drfx/settings.py +++ b/drfx/settings.py @@ -51,6 +51,14 @@ RECEIPTREGID = "1234567-8" RECEIPTSTREET = "Street 12, Somewhere Finland" +# Matrix integration + +# Access token for user you want to use. Leave empty for no Matrix integration. +MATRIX_ACCESS_TOKEN = "" +# Matrix homeserver URL +MATRIX_SERVER = "https://matrix.hacklab.fi/" +# Room ID to invite new users. Default points to Hacklab.fi Matrix space. +MATRIX_ROOM_ID = "!yNczWCtqHFeWuTbmhB:hacklab.fi" # External urls, like links to members guide and rules ASSOCIATION_RULES_URL = ( @@ -382,6 +390,9 @@ str, ), "GITHUB_URL": (GITHUB_URL, "Link to the github repository", str), + "MATRIX_ACCESS_TOKEN": (MATRIX_ACCESS_TOKEN, "Matrix user access token", str), + "MATRIX_SERVER": (MATRIX_SERVER, "Matrix server", str), + "MATRIX_MEMBER_ROOM_ID": (MATRIX_ROOM_ID, "Matrix room id for members", str), # Uncomment this if you would like to be able to edit the bank account details in the admin panel # "ACCOUNT_IBAN": (ACCOUNT_IBAN, "IBAN of the association's bank account"), # "ACCOUNT_BIC": (ACCOUNT_BIC, "BIC of the association's bank account"), diff --git a/emails/locale/fi/LC_MESSAGES/django.po b/emails/locale/fi/LC_MESSAGES/django.po index 00ec0081..e50b072c 100644 --- a/emails/locale/fi/LC_MESSAGES/django.po +++ b/emails/locale/fi/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-01 18:23+0200\n" +"POT-Creation-Date: 2024-05-19 13:14+0000\n" "PO-Revision-Date: 2020-09-26 14:09+0300\n" "Last-Translator: Sami Olmari \n" "Language-Team: \n" @@ -22,11 +22,11 @@ msgstr "" msgid "Show browser version" msgstr "Näytä selaimen versio" -#: emails/admin.py:46 emails/templates/admin/send-email.html:15 +#: emails/admin.py:47 emails/templates/admin/send-email.html:13 msgid "Send now" msgstr "Lähetä heti" -#: emails/admin.py:84 +#: emails/admin.py:85 msgid "Send email" msgstr "Lähetä email" @@ -54,15 +54,15 @@ msgstr "" "Sähköpostin sisältö. Kaikki viestit alkavat 'Katsele viestiä selaimessa' ja " "loppuvat 'Sait tämän viestin koska' teksteillä" -#: emails/models.py:41 +#: emails/models.py:43 msgid "Creation date" msgstr "Luontipäivä" -#: emails/models.py:44 +#: emails/models.py:48 msgid "Last modified datetime" msgstr "Muokattu viimeksi päiväys" -#: emails/models.py:48 +#: emails/models.py:52 msgid "Datetime the message was sent" msgstr "Viestin lähetyksen päiväys" @@ -70,10 +70,11 @@ msgstr "Viestin lähetyksen päiväys" msgid "Body" msgstr "Sisältö" -#: emails/templates/admin/send-email.html:19 +#: emails/templates/admin/send-email.html:17 msgid "Cancel" msgstr "Peruuta" +#: emails/templates/mail_content_and_post.html:5 #: emails/templates/mail_content_and_post.txt:5 #, python-format msgid "" diff --git a/users/locale/fi/LC_MESSAGES/django.po b/users/locale/fi/LC_MESSAGES/django.po index 7bad88ab..5ba663f3 100644 --- a/users/locale/fi/LC_MESSAGES/django.po +++ b/users/locale/fi/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-01 18:23+0200\n" +"POT-Creation-Date: 2024-05-19 13:14+0000\n" "PO-Revision-Date: 2020-11-14 21:45+0200\n" "Last-Translator: Sami Olmari \n" "Language-Team: \n" @@ -20,75 +20,206 @@ msgstr "" "X-Source-Language: en\n" "X-Generator: Poedit 2.4.2\n" -#: users/models.py:24 -#, python-format -msgid "" -"%(value)s is not a valid Matrix id. It must be in format @user:example.org" +#: users/custom_user_manager.py:34 +msgid "User must have an email address" +msgstr "Sähköpostiosoite vaaditaan" + +#: users/filters.py:12 +msgid "Age" msgstr "" -"%(value)s ei ole kelvollinen Matrix id. Sen tulee olla muodossa @käyttäjä:" -"esimerkki.org" -#: users/models.py:34 +#: users/filters.py:20 +msgid "Under 18 years" +msgstr "" + +#: users/filters.py:21 +msgid "Over 18 years" +msgstr "" + +#: users/filters.py:22 +msgid "Under 30 years" +msgstr "" + +#: users/filters.py:23 +msgid "20 to 60" +msgstr "" + +#: users/filters.py:24 +msgid "Over 63 years" +msgstr "" + +#: users/filters.py:55 users/filters.py:63 users/models/custom_user.py:130 +msgid "Marked for deletion" +msgstr "Merkattu poistettavaksi" + +#: users/filters.py:64 +#, fuzzy +#| msgid "Marked for deletion" +msgid "NOT Marked for deletion" +msgstr "Merkattu poistettavaksi" + +#: users/models/bank_transaction.py:20 +msgid "Archival reference" +msgstr "Arkistointitunnus" + +#: users/models/bank_transaction.py:24 +msgid "Date" +msgstr "Päiväys" + +#: users/models/bank_transaction.py:25 +msgid "Date of the transaction" +msgstr "Tilisiirron päiväys" + +#: users/models/bank_transaction.py:28 users/models/custom_invoice.py:36 +msgid "Amount" +msgstr "Määrä" + +#: users/models/bank_transaction.py:29 +msgid "Amount of money transferred to account" +msgstr "Tilisiirron summa" + +#: users/models/bank_transaction.py:35 +#: users/models/membership_application.py:17 users/models/users_log.py:17 +msgid "Message" +msgstr "Terveiset" + +#: users/models/bank_transaction.py:37 +msgid "Message attached to transaction by sender. Should not normally be used." +msgstr "Tilisiirron maksajan kirjoittama viesti." + +#: users/models/bank_transaction.py:44 +msgid "Sender" +msgstr "Maksaja" + +#: users/models/bank_transaction.py:45 +msgid "Sender of the transaction, if known." +msgstr "Tilisiirron maksaja, jos tiedossa." + +#: users/models/bank_transaction.py:52 +msgid "Transaction reference" +msgstr "Tilisiirron viitenumero" + +#: users/models/bank_transaction.py:54 +msgid "" +"Reference number is set by transaction sender and should normally always be " +"used." +msgstr "Viitenumeron asettaa maksaja ja se pitäisi aina olla käytössä." + +#: users/models/bank_transaction.py:61 +msgid "Transaction id" +msgstr "Tilisiirron tunniste" + +#: users/models/bank_transaction.py:62 +msgid "Bank transaction id" +msgstr "Tilisiirron tunniste" + +#: users/models/bank_transaction.py:68 users/models/bank_transaction.py:69 +msgid "Code" +msgstr "Koodi" + +#: users/models/bank_transaction.py:77 +msgid "True, if this transaction has already been used to pay for service." +msgstr "Tosi, jos tilisiirtoa on käytetty jäsenpalvelun maksuun." + +#: users/models/bank_transaction.py:84 +msgid "free form comment field for strange transaction" +msgstr "Vapaamuotoinen kommenttikenttä erityisille tilisiirroille" + +#: users/models/custom_invoice.py:19 +msgid "How many days of service this invoice pays" +msgstr "Montako päivää tämä lasku maksaa" + +#: users/models/custom_invoice.py:21 +msgid "" +"For example value 14 with access right service pays two weeks of access." +msgstr "Esimerkiksi arvo 14 tilankäyttöoikeutta maksaa 2 viikkoa tilankäyttöä." + +#: users/models/custom_invoice.py:29 +msgid "Reference number for paying invoice" +msgstr "Tilisiirron viitenumero" + +#: users/models/custom_invoice.py:31 +msgid "Reference number is set by transaction sender and must match this." +msgstr "Viitenumeron asettaa maksaja ja se pitäisi aina olla käytössä." + +#: users/models/custom_invoice.py:37 +msgid "Minimum amount of money to satisfy this invoice." +msgstr "Minimisumma laskun maksamiseksi." + +#: users/models/custom_invoice.py:44 +msgid "Invoice creation date" +msgstr "Laskun luontipäivä" + +#: users/models/custom_invoice.py:45 +msgid "Automatically set to now when invoice is created" +msgstr "Asetetaan automaattisesti kun lasku luodaan" + +#: users/models/custom_invoice.py:49 users/models/custom_user.py:121 +#: users/models/membership_application.py:30 users/models/nfc_card.py:22 +msgid "Last modified datetime" +msgstr "Viimeksi muokattu" + +#: users/models/custom_invoice.py:50 +msgid "Last time this invoice was modified" +msgstr "Päiväys, kun laskun tietoja on viimeksi muokattu" + +#: users/models/custom_invoice.py:60 #, python-format msgid "" -"%(value)s is not a valid phone number. It must be in international format " -"+35840123567" +"Custom invoice to pay %(days)s days of %(servicename)s for %(username)s - " +"%(amount)s€, reference: %(reference)s" msgstr "" -"%(value)s ei ole kelvollinen puhelinnumero. Käytä kansainvälistä muotoa, " -"esimerkiksi +35840123567" - -#: users/models.py:61 -msgid "User must have an email address" -msgstr "Sähköpostiosoite vaaditaan" +"Vapaamuotoinen lasku joka maksaa %(days)s päivää palvelua %(servicename)s " +"käyttäjälle %(username)s - %(amount)s€, viitenumero: %(reference)s" -#: users/models.py:97 +#: users/models/custom_user.py:36 msgid "Email address" msgstr "Sähköpostiosoite" -#: users/models.py:99 +#: users/models/custom_user.py:38 msgid "" "Your email address will be used for important notifications about your " "membership" msgstr "" "Sähköpostia käytetään labin toimintaan ja jäsenyyteen liittyvään viestintään" -#: users/models.py:106 +#: users/models/custom_user.py:45 msgid "First name" msgstr "Etunimi" -#: users/models.py:109 +#: users/models/custom_user.py:48 msgid "Last name" msgstr "Sukunimi" -#: users/models.py:113 +#: users/models/custom_user.py:53 msgid "Municipality / City" msgstr "Kotikunta" -#: users/models.py:119 +#: users/models/custom_user.py:60 msgid "Nick" msgstr "Nimimerkki" -#: users/models.py:120 +#: users/models/custom_user.py:61 msgid "Nickname you are known with on Internet" msgstr "Nimimerkki jolla sinut tunnetaan internetissä" -#: users/models.py:128 +#: users/models/custom_user.py:69 msgid "Matrix ID" msgstr "Matrix ID" -#: users/models.py:129 +#: users/models/custom_user.py:70 msgid "Matrix ID (@user:example.org)" msgstr "Matrix ID (@käyttäjä:esimerkki.org)" -#: users/models.py:134 +#: users/models/custom_user.py:77 msgid "Birthday" msgstr "Syntymäpäivä" -#: users/models.py:140 +#: users/models/custom_user.py:84 msgid "Mobile phone number" msgstr "Matkapuhelinnumero" -#: users/models.py:142 +#: users/models/custom_user.py:86 msgid "" "This number will also be the one that gets access to the hacklab premises. " "International format (+35840123567)." @@ -96,220 +227,169 @@ msgstr "" "Tätä numeroa käytetään myös esim. hacklabin oven avaamiseen. Kansainvälinen " "muoto (+35840123567)." -#: users/models.py:152 +#: users/models/custom_user.py:90 +msgid "This phone number is already registered to a member" +msgstr "" + +#: users/models/custom_user.py:99 msgid "Bank account" msgstr "Pankkitili" -#: users/models.py:153 +#: users/models/custom_user.py:100 msgid "Bank account for paying invoices (IBAN format: FI123567890)" msgstr "Pankkitili mahdolliseen laskujen maksamiseen (IBAN-muoto: FI123567890)" -#: users/models.py:159 +#: users/models/custom_user.py:106 msgid "Language" msgstr "Kieli" -#: users/models.py:160 +#: users/models/custom_user.py:107 msgid "Language preferred by user" msgstr "Käyttämäsi kieli" -#: users/models.py:168 +#: users/models/custom_user.py:115 msgid "User creation date" msgstr "Käyttäjän luontipäivä" -#: users/models.py:169 +#: users/models/custom_user.py:116 msgid "Automatically set to now when user is create" msgstr "Asetetaan automaattisesti kun käyttäjä luodaan" -#: users/models.py:174 users/models.py:269 users/models.py:699 -#: users/models.py:735 -msgid "Last modified datetime" -msgstr "Viimeksi muokattu" - -#: users/models.py:175 +#: users/models/custom_user.py:122 msgid "Last time this user was modified" msgstr "Päiväys, kun käyttäjän tietoja on viimeksi muokattu" -#: users/models.py:183 -msgid "Marked for deletion" -msgstr "Merkattu poistettavaksi" - -#: users/models.py:185 +#: users/models/custom_user.py:132 msgid "" "Filled if the user has marked themself as wanting to end their membership" msgstr "Täytetty, jos käyttäjä on ilmoittanut haluavansa lopettaa jäsenyyden" -#: users/models.py:244 -msgid "You must agree to the terms" -msgstr "Sinun tulee hyväksyä jäsenyyden ehdot" - -#: users/models.py:256 users/models.py:446 users/models.py:653 -msgid "Message" -msgstr "Terveiset" - -#: users/models.py:257 -msgid "Free-form message to hacklab board" -msgstr "Vapaamuotoinen viesti hacklabin hallitukselle" - -#: users/models.py:264 -msgid "Application creation date" -msgstr "Hakemuksen luontipäivä" - -#: users/models.py:265 -msgid "Automatically set to now when membership application is created" -msgstr "Asetetaan automaattisesti kun jäsenhakemus luodaan" - -#: users/models.py:270 -msgid "Last time this membership application was modified" -msgstr "Päiväys, kun jäsenhakemuksen tietoja on viimeksi muokattu" - -#: users/models.py:275 -msgid "I agree to the terms presented" -msgstr "Hyväksyn annetut ehdot" - -#: users/models.py:283 -#, python-format -msgid "Membership application for %(name)s" -msgstr "%(name)s:n jäsenhakemus" - -#: users/models.py:295 +#: users/models/member_service.py:15 msgid "Service name" msgstr "Palvelun nimi" -#: users/models.py:296 +#: users/models/member_service.py:16 msgid "Name of the service" msgstr "Palvelun nimi" -#: users/models.py:369 +#: users/models/member_service.py:90 msgid "" "True, if this service should not be shown for user member application form " "etc." msgstr "Tosi, jos palvelua ei pitäisi näyttää jäsenhakemuskaavakkeessa yms." -#: users/models.py:377 +#: users/models/member_service.py:98 msgid "Phone number that can be used to use this memberservice" msgstr "Puhelinnumero joka on rekisteröity tähän palveluun" -#: users/models.py:386 +#: users/models/member_service.py:107 msgid "" "True, if this service can be subscribed and unsubscribed by users themselves." msgstr "" "Tosi, jos käyttäjät voivat omatoimisesti ottaa tämän palvelun käyttöön." -#: users/models.py:391 +#: users/models/member_service.py:113 +msgid "For accounting export" +msgstr "" + +#: users/models/member_service.py:117 msgid "Member service" msgstr "Jäsenpalvelu" -#: users/models.py:407 +#: users/models/member_service.py:133 msgid "month" msgstr "kuukausi" -#: users/models.py:409 +#: users/models/member_service.py:135 msgid "year" msgstr "vuosi" -#: users/models.py:410 +#: users/models/member_service.py:136 msgid "days" msgstr "päivää" -#: users/models.py:432 -msgid "Archival reference" -msgstr "Arkistointitunnus" - -#: users/models.py:436 -msgid "Date" -msgstr "Päiväys" - -#: users/models.py:436 -msgid "Date of the transaction" -msgstr "Tilisiirron päiväys" - -#: users/models.py:439 users/models.py:686 -msgid "Amount" -msgstr "Määrä" - -#: users/models.py:440 -msgid "Amount of money transferred to account" -msgstr "Tilisiirron summa" +#: users/models/membership_application.py:18 +msgid "Free-form message to hacklab board" +msgstr "Vapaamuotoinen viesti hacklabin hallitukselle" -#: users/models.py:448 -msgid "Message attached to transaction by sender. Should not normally be used." -msgstr "Tilisiirron maksajan kirjoittama viesti." +#: users/models/membership_application.py:25 +msgid "Application creation date" +msgstr "Hakemuksen luontipäivä" -#: users/models.py:455 -msgid "Sender" -msgstr "Maksaja" +#: users/models/membership_application.py:26 +msgid "Automatically set to now when membership application is created" +msgstr "Asetetaan automaattisesti kun jäsenhakemus luodaan" -#: users/models.py:456 -msgid "Sender of the transaction, if known." -msgstr "Tilisiirron maksaja, jos tiedossa." +#: users/models/membership_application.py:31 +msgid "Last time this membership application was modified" +msgstr "Päiväys, kun jäsenhakemuksen tietoja on viimeksi muokattu" -#: users/models.py:463 -msgid "Transaction reference" -msgstr "Tilisiirron viitenumero" +#: users/models/membership_application.py:36 +msgid "I agree to the terms presented" +msgstr "Hyväksyn annetut ehdot" -#: users/models.py:465 -msgid "" -"Reference number is set by transaction sender and should normally always be " -"used." -msgstr "Viitenumeron asettaa maksaja ja se pitäisi aina olla käytössä." +#: users/models/membership_application.py:44 +#, python-format +msgid "Membership application for %(name)s" +msgstr "%(name)s:n jäsenhakemus" -#: users/models.py:472 -msgid "Transaction id" -msgstr "Tilisiirron tunniste" +#: users/models/nfc_card.py:17 +msgid "Creation date" +msgstr "Luontipäivä" -#: users/models.py:473 -msgid "Bank transaction id" -msgstr "Tilisiirron tunniste" +#: users/models/nfc_card.py:18 +msgid "Automatically set to now when is created" +msgstr "Asetetaan automaattisesti kun luodaan" -#: users/models.py:479 users/models.py:480 -msgid "Code" -msgstr "Koodi" +#: users/models/nfc_card.py:23 +msgid "Last time this object was modified" +msgstr "Päiväys, kun tätä on viimeksi muokattu" -#: users/models.py:488 -msgid "True, if this transaction has already been used to pay for service." -msgstr "Tosi, jos tilisiirtoa on käytetty jäsenpalvelun maksuun." +#: users/models/nfc_card.py:29 +msgid "NFC card id number as read by the card reader" +msgstr "NFC-kortin tunniste kortinlukijan lukemana" -#: users/models.py:495 -msgid "free form comment field for strange transaction" -msgstr "Vapaamuotoinen kommenttikenttä erityisille tilisiirroille" +#: users/models/nfc_card.py:30 +msgid "Usually hex format" +msgstr "Yleensä heksamuodossa" -#: users/models.py:530 +#: users/models/service_subscription.py:29 msgid "Active" msgstr "Käytettävissä" -#: users/models.py:531 +#: users/models/service_subscription.py:30 msgid "Payment overdue" msgstr "Maksamatta" -#: users/models.py:532 +#: users/models/service_subscription.py:31 msgid "Suspended" msgstr "Keskeytetty" -#: users/models.py:537 +#: users/models/service_subscription.py:36 msgid "Service state" msgstr "Jäsenpalvelun tila" -#: users/models.py:538 +#: users/models/service_subscription.py:37 msgid "State of this service" msgstr "Jäsenpalvelun tila" -#: users/models.py:549 +#: users/models/service_subscription.py:48 msgid "Paid until" msgstr "Maksettu tähän asti" -#: users/models.py:550 +#: users/models/service_subscription.py:49 msgid "The service will stay active until this date" msgstr "Palvelu pysyy aktiivisena tähän päivämäärään asti" -#: users/models.py:563 +#: users/models/service_subscription.py:62 msgid "Reference number for paying for this service subscription" msgstr "Viitenumero palvelun maksamiseen" -#: users/models.py:564 +#: users/models/service_subscription.py:63 msgid "Pay for this service with this reference number" msgstr "Maksa palvelu tällä viitteellä" -#: users/models.py:572 +#: users/models/service_subscription.py:71 msgid "" "Set date when a expiration reminder message has been sent to user. Reset to " "NULL when state changes." @@ -317,90 +397,73 @@ msgstr "" "Päiväys jolloin muistutusviesti on lähetetty käyttäjälle. Palautetaan " "NULLiksi kun palvelun tila muuttuu." -#: users/models.py:637 +#: users/models/service_subscription.py:136 #, python-format msgid "Service %(servicename)s for %(username)s" msgstr "Jäsenpalvelu %(servicename)s %(username)s:lle" -#: users/models.py:669 -msgid "How many days of service this invoice pays" -msgstr "Montako päivää tämä lasku maksaa" - -#: users/models.py:671 -msgid "" -"For example value 14 with access right service pays two weeks of access." -msgstr "Esimerkiksi arvo 14 tilankäyttöoikeutta maksaa 2 viikkoa tilankäyttöä." +#: users/models/statistics.py:79 +#, fuzzy +#| msgid "Date of the transaction" +msgid "Date of this statistics event" +msgstr "Tilisiirron päiväys" -#: users/models.py:679 -msgid "Reference number for paying invoice" -msgstr "Tilisiirron viitenumero" +#: users/models/statistics.py:82 +msgid "Total number of users" +msgstr "" -#: users/models.py:681 -msgid "Reference number is set by transaction sender and must match this." -msgstr "Viitenumeron asettaa maksaja ja se pitäisi aina olla käytössä." +#: users/models/statistics.py:84 +#, fuzzy +#| msgid "Active" +msgid "Active users" +msgstr "Käytettävissä" -#: users/models.py:687 -msgid "Minimum amount of money to satisfy this invoice." -msgstr "Minimisumma laskun maksamiseksi." +#: users/models/statistics.py:86 +msgid "Users pending deletion" +msgstr "" -#: users/models.py:694 -msgid "Invoice creation date" -msgstr "Laskun luontipäivä" +#: users/models/statistics.py:90 +#, fuzzy +#| msgid "New membership application" +msgid "Number of open membership applications" +msgstr "Uusi jäsenhakemus vastaanotettu" -#: users/models.py:695 -msgid "Automatically set to now when invoice is created" -msgstr "Asetetaan automaattisesti kun lasku luodaan" +#: users/models/statistics.py:94 +msgid "Number of open custom invoices" +msgstr "" -#: users/models.py:700 -msgid "Last time this invoice was modified" -msgstr "Päiväys, kun laskun tietoja on viimeksi muokattu" +#: users/models/statistics.py:97 +msgid "Total amount of open custom invoices" +msgstr "" -#: users/models.py:710 -#, python-format +#: users/models/statistics.py:103 msgid "" -"Custom invoice to pay %(days)s days of %(servicename)s for %(username)s - " -"%(amount)s€, reference: %(reference)s" +"Statistics for service subscriptions. Each service will be its own key with " +"counts for Active, Overdue and Suspended states" msgstr "" -"Vapaamuotoinen lasku joka maksaa %(days)s päivää palvelua %(servicename)s " -"käyttäjälle %(username)s - %(amount)s€, viitenumero: %(reference)s" - -#: users/models.py:730 -msgid "Creation date" -msgstr "Luontipäivä" -#: users/models.py:731 -msgid "Automatically set to now when is created" -msgstr "Asetetaan automaattisesti kun luodaan" - -#: users/models.py:736 -msgid "Last time this object was modified" -msgstr "Päiväys, kun tätä on viimeksi muokattu" - -#: users/models.py:742 -msgid "NFC card id number as read by the card reader" -msgstr "NFC-kortin tunniste kortinlukijan lukemana" - -#: users/models.py:743 -msgid "Usually hex format" -msgstr "Yleensä heksamuodossa" - -#: users/signals.py:139 +#: users/signals.py:150 msgid "Thank you for applying membership and next steps" msgstr "Kiitos hakemuksestasi, ja seuraavat toimenpiteet" -#: users/signals.py:161 +#: users/signals.py:173 msgid "New membership application received" msgstr "Uusi jäsenhakemus vastaanotettu" -#: users/signals.py:180 +#: users/signals.py:199 msgid "Your application has been approved" msgstr "Hakemuksesi on hyväksytty" -#: users/signals.py:199 +#: users/signals.py:217 msgid "Your application has been rejected" msgstr "Hakemuksesi on hylätty" -#: users/signals.py:255 +#: users/signals.py:291 +#: users/templates/mail/account_deactivated_and_marked_for_deletion.txt:5 +msgid "Your account has been deactivated and marked for deletion" +msgstr "" + +#: users/signals.py:320 msgid "Door access denied" msgstr "Ovipääsy kielletty" @@ -478,6 +541,18 @@ msgstr "" "\n" "%(siteurl)s\n" +#: users/templates/mail/door_access_denied.txt:16 +#, fuzzy +#| msgid "Your services" +msgid "Your services status:" +msgstr "Jäsenpalvelusi" + +#: users/templates/mail/door_access_denied.txt:20 +#, fuzzy +#| msgid "Your services" +msgid "No services" +msgstr "Jäsenpalvelusi" + #: users/templates/mail/new_application.txt:4 msgid "New membership application" msgstr "Uusi jäsenhakemus vastaanotettu" @@ -579,6 +654,27 @@ msgstr "" "\n" "Tervetuloa!\n" +#: users/validators.py:13 +#, python-format +msgid "" +"%(value)s is not a valid Matrix id. It must be in format @user:example.org" +msgstr "" +"%(value)s ei ole kelvollinen Matrix id. Sen tulee olla muodossa @käyttäjä:" +"esimerkki.org" + +#: users/validators.py:23 +#, python-format +msgid "" +"%(value)s is not a valid phone number. It must be in international format " +"+35840123567" +msgstr "" +"%(value)s ei ole kelvollinen puhelinnumero. Käytä kansainvälistä muotoa, " +"esimerkiksi +35840123567" + +#: users/validators.py:31 +msgid "You must agree to the terms" +msgstr "Sinun tulee hyväksyä jäsenyyden ehdot" + #~ msgid "Reference number of transaction" #~ msgstr "Tilisiirron viitenumero" diff --git a/utils/businesslogic.py b/utils/businesslogic.py index ba018917..5eadd310 100644 --- a/utils/businesslogic.py +++ b/utils/businesslogic.py @@ -18,6 +18,7 @@ from users.signals import application_approved, application_denied from utils import referencenumber +from utils.matrixoperations import MatrixOperations logger = logging.getLogger(__name__) @@ -195,8 +196,14 @@ def accept_application(application): ) application.delete() + BusinessLogic.updateuser(user) + # If user has Matrix ID and Matrix room is configured, invite the user + if len(config.MATRIX_ACCESS_TOKEN) > 0 and user.mxid is not None: + mo = MatrixOperations(config.MATRIX_ACCESS_TOKEN, config.MATRIX_SERVER) + mo.invite_user(user.mxid, config.MATRIX_ROOM_ID, _("Accepted as member")) + @staticmethod def create_servicesubscription(user, service, state): """ diff --git a/utils/locale/fi/LC_MESSAGES/django.po b/utils/locale/fi/LC_MESSAGES/django.po index 11a508db..49adffde 100644 --- a/utils/locale/fi/LC_MESSAGES/django.po +++ b/utils/locale/fi/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-01 18:23+0200\n" +"POT-Creation-Date: 2024-05-19 13:46+0000\n" "PO-Revision-Date: 2020-10-21 02:15+0300\n" "Last-Translator: Sami Olmari \n" "Language-Team: \n" @@ -20,27 +20,27 @@ msgstr "" "X-Source-Language: en\n" "X-Generator: Poedit 2.4.1\n" -#: utils/businesslogic.py:56 +#: utils/businesslogic.py:65 #, python-format msgid "Your subscription %(service_name)s is about to expire" msgstr "Tilauksesi palveluun %(service_name)s on päättymässä" -#: utils/businesslogic.py:113 +#: utils/businesslogic.py:127 #, python-format msgid "Bank transaction of %(amount)s€ dated %(date)s" msgstr "Tilisiirto %(amount)s€ päiväyksellä %(date)s" -#: utils/businesslogic.py:175 +#: utils/businesslogic.py:189 utils/businesslogic.py:205 msgid "Accepted as member" msgstr "Hyväksytty jäseneksi" -#: utils/businesslogic.py:260 +#: utils/businesslogic.py:280 #, python-format msgid "Service %(servicename)s state changed from %(oldstate)s to %(newstate)s" msgstr "" "Jäsenpalvelun %(servicename)s tila muuttui %(oldstate)s:sta %(newstate)s:ksi" -#: utils/businesslogic.py:299 +#: utils/businesslogic.py:319 #, python-format msgid "" "Paid %(days)s days of %(name)s, ending at %(until)s with transaction " @@ -49,13 +49,13 @@ msgstr "" "%(name)s on nyt maksettu %(days)s päivää lisää, %(until)s asti tilisiirrolla " "%(transaction)s" -#: utils/businesslogic.py:425 +#: utils/businesslogic.py:445 #, python-format msgid "%(servicename)s is now paid until %(until)s due to %(transaction)s" msgstr "" "%(servicename)s on nyt maksettu %(until)s asti tilisiirrolla %(transaction)s" -#: utils/businesslogic.py:455 +#: utils/businesslogic.py:475 #, python-format msgid "" "%(servicename)s is now paid until %(until)s due to %(anotherservicename)s " diff --git a/utils/matrixoperations.py b/utils/matrixoperations.py new file mode 100755 index 00000000..ff4457be --- /dev/null +++ b/utils/matrixoperations.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python3 +import requests +import logging +logger = logging.getLogger(__name__) + +class MatrixOperations: + """ + Various basic single-request Matrix client-server API operations + + For more advanced operations you'll need a bot on Matrix side.. + """ + + def __init__(self, access_token, matrix_server): + self.access_token = access_token + self.matrix_server = matrix_server + self.headers = { 'Authorization' : f'Bearer {self.access_token}', 'Content-Type': 'application/json' } + + def send_message(self, room_id, message): + api_url=f'{self.matrix_server}_matrix/client/v3/rooms/{room_id}/send/m.room.message' + payload={ "msgtype": "m.text", "body": message } + r = requests.post(api_url, headers=self.headers, json = payload) + if r.status_code == 200: + logger.debug(f"Sent Matrix message {message} to room {room_id}") + else: + logger.warn(f"Sending Matrix message failed:", r.content) + + + def invite_user(self, user_id, room_id, reason): + api_url=f'{self.matrix_server}_matrix/client/v3/rooms/{room_id}/invite' + payload={ "reason": reason, "user_id": user_id } + r = requests.post(api_url, headers=self.headers, json = payload) + if r.status_code == 200: + logger.debug(f"Invited Matrix user {user_id} to room {room_id} because of {reason}") + else: + logger.warn(f"Inviting Matrix user {user_id} failed:", r.content) + + def kick_user(self, user_id, room_id, reason): + api_url=f'{self.matrix_server}_matrix/client/v3/rooms/{room_id}/kick' + payload={ "reason": reason, "user_id": user_id } + r = requests.post(api_url, headers=self.headers, json = payload) + if r.status_code == 200: + logger.debug(f"Kicked Matrix user {user_id} from room {room_id} because of {reason}") + else: + logger.warn(f"Kicking Matrix user {user_id} failed:", r.content) diff --git a/www/locale/fi/LC_MESSAGES/django.po b/www/locale/fi/LC_MESSAGES/django.po index 1e41092d..60b355f4 100644 --- a/www/locale/fi/LC_MESSAGES/django.po +++ b/www/locale/fi/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-01 18:23+0200\n" +"POT-Creation-Date: 2024-05-19 13:46+0000\n" "PO-Revision-Date: 2020-12-01 18:35+0200\n" "Last-Translator: Sami Olmari \n" "Language-Team: \n" @@ -37,9 +37,9 @@ msgstr "Valitse vähintään yksi jäsenpalvelu" msgid "%(servicename)s, %(cost)s" msgstr "%(servicename)s, %(cost)s" -#: www/forms.py:100 www/templates/www/custominvoice.html:28 -#: www/templates/www/custominvoice.html:51 www/templates/www/user.html:96 -#: www/templates/www/usersettings.html:37 +#: www/forms.py:100 www/templates/www/custominvoice.html:32 +#: www/templates/www/custominvoice.html:55 www/templates/www/user.html:92 +#: www/templates/www/usersettings.html:47 msgid "Service" msgstr "Jäsenpalvelu" @@ -78,7 +78,7 @@ msgstr "Hinnan pitää olla palvelun hinta: %(cost)s" #: www/templates/registration/login.html:11 #: www/templates/registration/login.html:21 #: www/templates/registration/password_reset_complete.html:15 -#: www/templates/www/base.html:50 +#: www/templates/www/base.html:52 msgid "Log in" msgstr "Kirjaudu sisään" @@ -147,18 +147,19 @@ msgstr "Anna sähköpostiosoitteesi, niin lähetämme ohjeet uuden asettamiseksi msgid "Send me instructions!" msgstr "Lähetä minulle ohjeet!" -#: www/templates/www/applications.html:6 www/templates/www/base.html:34 +#: www/templates/www/applications.html:6 www/templates/www/base.html:36 msgid "Member applications" msgstr "Jäsenhakemukset" #: www/templates/www/applications.html:12 -#: www/templates/www/custominvoice.html:27 -#: www/templates/www/custominvoice.html:50 www/templates/www/user.html:95 -#: www/templates/www/user.html:123 www/templates/www/user.html:139 +#: www/templates/www/custominvoice.html:31 +#: www/templates/www/custominvoice.html:54 www/templates/www/user.html:91 +#: www/templates/www/user.html:119 www/templates/www/user.html:135 msgid "Date" msgstr "Päiväys" -#: www/templates/www/applications.html:13 www/templates/www/user.html:19 +#: www/templates/www/applications.html:13 www/templates/www/user.html:12 +#: www/templates/www/users.html:16 msgid "Name" msgstr "Nimi" @@ -166,8 +167,8 @@ msgstr "Nimi" msgid "E-mail" msgstr "Sähköposti" -#: www/templates/www/applications.html:15 www/templates/www/user.html:124 -#: www/templates/www/user.html:143 +#: www/templates/www/applications.html:15 www/templates/www/user.html:120 +#: www/templates/www/user.html:139 msgid "Message" msgstr "Viesti" @@ -175,7 +176,7 @@ msgstr "Viesti" msgid "Agreement" msgstr "Hyväksyntä" -#: www/templates/www/applications.html:22 www/templates/www/users.html:45 +#: www/templates/www/applications.html:22 www/templates/www/users.html:46 msgid "days" msgstr "päivää" @@ -220,59 +221,69 @@ msgstr "" " Kiitos ja kerrohan kavereillekkin %(name)s:sta :)\n" " " -#: www/templates/www/base.html:28 www/templates/www/index.html:19 +#: www/templates/www/base.html:29 www/templates/www/index.html:19 msgid "Show my user information" msgstr "Näytä käyttäjätietoni" -#: www/templates/www/base.html:30 +#: www/templates/www/base.html:31 msgid "Change my settings" msgstr "Omat asetukset" -#: www/templates/www/base.html:33 +#: www/templates/www/base.html:32 +msgid "Graphs" +msgstr "" + +#: www/templates/www/base.html:35 msgid "Users" msgstr "Käyttäjät" -#: www/templates/www/base.html:35 +#: www/templates/www/base.html:37 msgid "Import" msgstr "Tiedon tuonti" -#: www/templates/www/base.html:36 +#: www/templates/www/base.html:38 msgid "Export" msgstr "Tiedon vienti" -#: www/templates/www/base.html:37 +#: www/templates/www/base.html:39 msgid "Bank Ledger" msgstr "Tiliote" -#: www/templates/www/base.html:38 www/templates/www/custominvoice.html:5 -#: www/templates/www/custominvoices.html:4 www/templates/www/user.html:92 +#: www/templates/www/base.html:40 www/templates/www/custominvoice.html:5 +#: www/templates/www/custominvoices.html:4 www/templates/www/user.html:88 msgid "Custom invoices" msgstr "Vapaamuotoiset laskut" -#: www/templates/www/base.html:41 +#: www/templates/www/base.html:43 msgid "Apply membership" msgstr "Hae jäsenyyttä" -#: www/templates/www/base.html:48 +#: www/templates/www/base.html:50 msgid "log out" msgstr "kirjaudu ulos" -#: www/templates/www/base.html:58 +#: www/templates/www/base.html:59 msgid "Language" msgstr "Kieli" -#: www/templates/www/base.html:85 +#: www/templates/www/base.html:86 msgid "Privacy policy" msgstr "Tietosuojakäytäntö" -#: www/templates/www/base.html:86 +#: www/templates/www/base.html:87 msgid "Report bugs at" msgstr "Raportoi bugit ja osallistu projektiin" -#: www/templates/www/base.html:86 +#: www/templates/www/base.html:87 msgid "GitHub" msgstr "GitHub" +#: www/templates/www/base.html:88 +#, fuzzy +#| msgid "Save changes" +msgid "View changelog" +msgstr "Tallenna muutokset" + #: www/templates/www/createuser.html:8 msgid "Create user" msgstr "Luo käyttäjä" @@ -282,56 +293,63 @@ msgid "Create" msgstr "Luo" #: www/templates/www/custominvoice.html:8 -msgid "Note: You can always delete invoice if you choose not to pay it" -msgstr "Huomaa: Voit koska tahansa poistaa laskun jos et haluakaan maksaa sitä" +msgid "" +"\n" +" NOTE: Custominvoices are meant for special situations " +"where you are paying for \n" +" multiple months using one transaction. We suggest using monthly " +"recurring \n" +" payments for all regular situations.\n" +" " +msgstr "" -#: www/templates/www/custominvoice.html:15 +#: www/templates/www/custominvoice.html:19 msgid "Preview.." msgstr "Esikatsele.." -#: www/templates/www/custominvoice.html:18 +#: www/templates/www/custominvoice.html:22 #, python-format msgid "" "This will pay %(days)s days of service %(servicename)s and costs %(amount)s€" msgstr "" "Tämä maksaa %(days)s päivää palvelua %(servicename)s ja maksaa %(amount)s€" -#: www/templates/www/custominvoice.html:20 +#: www/templates/www/custominvoice.html:24 msgid "Create invoice" msgstr "Luo lasku" -#: www/templates/www/custominvoice.html:23 +#: www/templates/www/custominvoice.html:27 msgid "Pending invoices" msgstr "Maksamattomat laskut" -#: www/templates/www/custominvoice.html:29 -#: www/templates/www/custominvoice.html:52 www/templates/www/user.html:97 -#: www/templates/www/user.html:140 +#: www/templates/www/custominvoice.html:33 +#: www/templates/www/custominvoice.html:56 www/templates/www/user.html:93 +#: www/templates/www/user.html:136 msgid "Amount" msgstr "Määrä" -#: www/templates/www/custominvoice.html:30 -#: www/templates/www/custominvoice.html:53 www/templates/www/user.html:55 -#: www/templates/www/user.html:98 www/templates/www/user.html:141 +#: www/templates/www/custominvoice.html:34 +#: www/templates/www/custominvoice.html:57 www/templates/www/user.html:48 +#: www/templates/www/user.html:94 www/templates/www/user.html:137 msgid "Reference number" msgstr "Viitenumero" -#: www/templates/www/custominvoice.html:31 -#: www/templates/www/usersettings.html:39 -#: www/templates/www/usersettings.html:92 +#: www/templates/www/custominvoice.html:35 +#: www/templates/www/usersettings.html:49 +#: www/templates/www/usersettings.html:102 msgid "Action" msgstr "Toiminto" -#: www/templates/www/custominvoice.html:36 -#: www/templates/www/custominvoice.html:59 www/templates/www/user.html:104 +#: www/templates/www/custominvoice.html:40 +#: www/templates/www/custominvoice.html:63 www/templates/www/user.html:100 msgid "days of" msgstr "päivää" -#: www/templates/www/custominvoice.html:39 +#: www/templates/www/custominvoice.html:43 msgid "delete" msgstr "poista" -#: www/templates/www/custominvoice.html:44 +#: www/templates/www/custominvoice.html:48 #, python-format msgid "" " Custominvoices are paid with the custominvoice specific amount and " @@ -342,19 +360,27 @@ msgstr "" "Maksut tilille: %(bank_iban)s. Jos suorituksen summa tai viitenumero " "ei ole oikein maksua ei rekisteröidä" -#: www/templates/www/custominvoice.html:46 +#: www/templates/www/custominvoice.html:50 msgid "Paid invoices" msgstr "Maksetut laskut" -#: www/templates/www/custominvoice.html:54 www/templates/www/user.html:99 +#: www/templates/www/custominvoice.html:58 www/templates/www/user.html:95 msgid "Paid" msgstr "Maksettu" -#: www/templates/www/custominvoice.html:66 -#: www/templates/www/custominvoices.html:35 www/templates/www/user.html:111 +#: www/templates/www/custominvoice.html:70 +#: www/templates/www/custominvoices.html:35 www/templates/www/user.html:107 msgid "Not paid yet" msgstr "Ei maksettu" +#: www/templates/www/graphs.html:8 +msgid "Statistics" +msgstr "" + +#: www/templates/www/graphs.html:10 +msgid "Transactions rolling 12 months" +msgstr "" + #: www/templates/www/index.html:11 msgid "Welcome back!" msgstr "Tervetuloa takaisin!" @@ -423,15 +449,15 @@ msgid "" " members guide\n" " and\n" -" association rules." msgstr "" -"Jäsenyyden ehdot: Olen lukenut ja ymmärtänyt jäsenen ohjeen ja yhdistyksen säännöt." +"Jäsenyyden ehdot: Olen lukenut ja ymmärtänyt jäsenen ohjeen ja yhdistyksen säännöt." #: www/templates/www/register.html:36 msgid "" @@ -461,23 +487,15 @@ msgstr "" msgid "User data for" msgstr "Tiedot käyttäjälle" -#: www/templates/www/user.html:12 -msgid "Update user's data" -msgstr "Päivitä käyttäjän data" - -#: www/templates/www/user.html:13 -msgid "View in admin" -msgstr "Tarkastele admin-näkymässä" - -#: www/templates/www/user.html:23 +#: www/templates/www/user.html:16 www/templates/www/users.html:18 msgid "Email" msgstr "Sähköposti" -#: www/templates/www/user.html:27 +#: www/templates/www/user.html:20 www/templates/www/users.html:19 msgid "Phone" msgstr "Puhelin" -#: www/templates/www/user.html:34 +#: www/templates/www/user.html:27 msgid "" "Your membership application is being processed. You will receive e-mail when " "the process is finished. This may take up to two weeks." @@ -485,31 +503,31 @@ msgstr "" "Jäsenhakemuksesi on vireillä. Saat sähköpostia kun hakemuksesi on käsitelty. " "Tämä voi kestää parikin viikkoa." -#: www/templates/www/user.html:37 +#: www/templates/www/user.html:30 msgid "Service subscriptions" msgstr "Jäsenpalvelut" -#: www/templates/www/user.html:45 +#: www/templates/www/user.html:38 msgid "State" msgstr "Tila" -#: www/templates/www/user.html:51 +#: www/templates/www/user.html:44 msgid "Paid until" msgstr "Voimassaoloaika" -#: www/templates/www/user.html:52 +#: www/templates/www/user.html:45 msgid "days left" msgstr "päivää jäljellä" -#: www/templates/www/user.html:59 +#: www/templates/www/user.html:52 msgid "Last payment" msgstr "Viimeisin maksu" -#: www/templates/www/user.html:64 +#: www/templates/www/user.html:57 msgid "Door opening number" msgstr "Oven avausnumero" -#: www/templates/www/user.html:72 +#: www/templates/www/user.html:65 msgid "" "This service has been suspended. Please contact management if you want to re-" "apply for it." @@ -517,40 +535,46 @@ msgstr "" "Tämä jäsenpalvelu on osaltasi keskeytetty. Ota yhteyttä hallitukseen jos " "haluat anoa sitä uudestaan." -#: www/templates/www/user.html:75 +#: www/templates/www/user.html:68 msgid "This is paid by other member services - you do not need to pay for it." msgstr "" "Tätä jäsenpalvelua ei tarvitse erikseen maksaa - toinen sinulla oleva " "jäsenpalvelu maksaa sen." -#: www/templates/www/user.html:82 -#, python-format +#: www/templates/www/user.html:76 +#, fuzzy, python-format +#| msgid "" +#| "This service can be paid with reference number %(ref)s\n" +#| " to bank account %(bank_iban)s. Service price is %(cost)s." msgid "" -"This service can be paid with reference number %(ref)s\n" -" to bank account %(bank_iban)s. Service price is %(cost)s." +"This service is paid with reference number %(ref)s\n" +" to bank account %(bank_iban)s (recurring " +"monthly payments).
Service price is %(cost)s." msgstr "" "Tämä palvelu tulee maksaa viitenumerolla %(ref)s\n" "tilille %(bank_iban)s. Palvelun hinta on %(cost)s." -#: www/templates/www/user.html:84 -msgid "To pay this service multiple times, you can create a custom invoice." +#: www/templates/www/user.html:79 +#, fuzzy +#| msgid "To pay this service multiple times, you can create a custom invoice." +msgid "To pay for multiple months at once, you can create a custom invoice. " msgstr "" "Jos haluat maksaa palvelun useaan kertaan yhdellä tilisiirrolla, voit tehdä " "vapaamuotoisen laskun." -#: www/templates/www/user.html:85 www/templates/www/user.html:118 +#: www/templates/www/user.html:80 www/templates/www/user.html:114 msgid "Create and view custom invoices" msgstr "Luo ja katsele vapaamuotoisia laskuja" -#: www/templates/www/user.html:120 +#: www/templates/www/user.html:116 msgid "Activity log" msgstr "Loki" -#: www/templates/www/user.html:134 +#: www/templates/www/user.html:130 msgid "Bank transactions" msgstr "Tilisiirrot" -#: www/templates/www/user.html:135 +#: www/templates/www/user.html:131 msgid "" "Transactions are not processed in real time. Newest bank transactions " "uploaded to the system" @@ -558,18 +582,66 @@ msgstr "" "Tilisiirrot eivät tule näkyviin reaaliajassa. Viimeisimmän tuodun " "tilisiirron päiväys on" -#: www/templates/www/user.html:142 +#: www/templates/www/user.html:138 msgid "Sender" msgstr "Lähettäjä" -#: www/templates/www/user.html:144 +#: www/templates/www/user.html:140 msgid "Comment" msgstr "Kommentti" -#: www/templates/www/users.html:10 +#: www/templates/www/users.html:7 +#, fuzzy +#| msgid "Users" +msgid "User list" +msgstr "Käyttäjät" + +#: www/templates/www/users.html:7 msgid "Create new user" msgstr "Luo uusi käyttäjä" +#: www/templates/www/users.html:15 +#, fuzzy +#| msgid "Action" +msgid "Active" +msgstr "Toiminto" + +#: www/templates/www/users.html:17 +#, fuzzy +#| msgid "Nickname" +msgid "Nick" +msgstr "Kutsumanimi" + +#: www/templates/www/users.html:23 +#, fuzzy +#| msgid "Extra Services" +msgid "Extra services" +msgstr "Lisäpalvelut" + +#: www/templates/www/users.html:24 +#, fuzzy +#| msgid "Back to login" +msgid "Last login" +msgstr "Takaisin sisäänkirjautumiseen" + +#: www/templates/www/users.html:25 +#, fuzzy +#| msgid "Agreement" +msgid "Management" +msgstr "Hyväksyntä" + +#: www/templates/www/users.html:64 +msgid "Edit" +msgstr "" + +#: www/templates/www/users.html:71 +msgid "Recalc" +msgstr "" + +#: www/templates/www/users.html:75 +msgid "View in admin" +msgstr "Tarkastele admin-näkymässä" + #: www/templates/www/usersettings.html:7 msgid "User settings" msgstr "Omat asetukset" @@ -578,11 +650,19 @@ msgstr "Omat asetukset" msgid "Save" msgstr "Tallenna" -#: www/templates/www/usersettings.html:30 +#: www/templates/www/usersettings.html:29 +msgid "Matrix Community" +msgstr "" + +#: www/templates/www/usersettings.html:34 +msgid "Invite me to member\\" +msgstr "" + +#: www/templates/www/usersettings.html:40 msgid "Extra Services" msgstr "Lisäpalvelut" -#: www/templates/www/usersettings.html:31 +#: www/templates/www/usersettings.html:41 msgid "" "Here you can see extra services that you can subscribe yourself. You can " "only unsubscribe services when you have\n" @@ -591,47 +671,47 @@ msgstr "" "Tässä näet lisäpalvelut jotka voit halutessasi ottaa käyttöön. Voit poistaa " "käytöstä palveluita ainoastaan kun ne ovat maksettu ja aktiivisessa tilassa." -#: www/templates/www/usersettings.html:38 +#: www/templates/www/usersettings.html:48 msgid "Information" msgstr "Tietoja" -#: www/templates/www/usersettings.html:53 +#: www/templates/www/usersettings.html:63 msgid "Subscribe service" msgstr "Ota käyttöön" -#: www/templates/www/usersettings.html:70 +#: www/templates/www/usersettings.html:80 msgid "Unsubscribe service" msgstr "Poista käytöstä" -#: www/templates/www/usersettings.html:81 +#: www/templates/www/usersettings.html:91 msgid "No services available to subscribe or unsubscribe " msgstr "Ei käyttöönotettavia tai poistettavia palveluita" -#: www/templates/www/usersettings.html:87 +#: www/templates/www/usersettings.html:97 msgid "NFC Card access" msgstr "NFC-Kortti sisäänpääsy" -#: www/templates/www/usersettings.html:91 +#: www/templates/www/usersettings.html:101 msgid "NFC Card" msgstr "NFC-Kortti" -#: www/templates/www/usersettings.html:105 +#: www/templates/www/usersettings.html:115 msgid "Release" msgstr "Vapauta" -#: www/templates/www/usersettings.html:121 +#: www/templates/www/usersettings.html:131 msgid "Claim" msgstr "Varaa" -#: www/templates/www/usersettings.html:128 +#: www/templates/www/usersettings.html:138 msgid "" "No recent unclaimed NFC cards. Go to door, use a card and claim it here in 5 " "minutes" msgstr "" -"Ei varattavissa olevia NFC-kortteja - mene ovelle, leimaa kortti ja yhdistä se " -"täällä 5 minuutin kuluessa" +"Ei varattavissa olevia NFC-kortteja - mene ovelle, leimaa kortti ja yhdistä " +"se täällä 5 minuutin kuluessa" -#: www/templates/www/usersettings.html:139 +#: www/templates/www/usersettings.html:149 msgid "" "If you have questions and or want to change something that is not available " "here, please send an email." @@ -639,37 +719,45 @@ msgstr "" "Jos sinulla on kysyttävää tai haluat muuttaa jotain mitä ei ole saatavilla " "täällä, voit lähettää ehdotuksen sähköpostilla." -#: www/views.py:181 +#: www/views.py:196 #, python-format msgid "Rejected member application from %(name)s" msgstr "Hylätty %(name)s:n jäsenhakemus" -#: www/views.py:186 +#: www/views.py:201 #, python-format msgid "Accepted member application from %(name)s" msgstr "Hyväksytty %(name)sn jäsenhakemus" -#: www/views.py:243 +#: www/views.py:254 msgid "User details saved" msgstr "Käyttäjän tiedot tallennettu" -#: www/views.py:302 +#: www/views.py:306 +msgid "Welcome to member's Matrix space" +msgstr "" + +#: www/views.py:307 +msgid "You have been invited" +msgstr "" + +#: www/views.py:326 msgid "You already have this service" msgstr "Sinulla on jo tämä jäsenpalvelu" -#: www/views.py:305 +#: www/views.py:329 msgid "This service cannot be self subscribed to" msgstr "Tätä palvelua ei voi ottaa käyttöön itsepalveluna" -#: www/views.py:313 +#: www/views.py:337 msgid "Service subscribed. You may now pay for it." msgstr "Palvelu otettu käyttöön. Ole hyvä ja maksa se seuraavaksi." -#: www/views.py:335 +#: www/views.py:357 msgid "Service unsubscribed" msgstr "Palvelu poistettu käytöstä" -#: www/views.py:340 +#: www/views.py:362 msgid "" "Service is not active. You must pay for the service first. Contact staff if " "needed." @@ -677,29 +765,35 @@ msgstr "" "Palvelu ei ole aktiivinen. Maksa se ensin. Ota yhtes hallitukseen jos on " "kysyttävää." -#: www/views.py:372 +#: www/views.py:394 msgid "NFC Card successfully claimed" msgstr "NFC-Kortti varattu onnistuneesti" -#: www/views.py:396 +#: www/views.py:416 msgid "NFC Card successfully deleted" msgstr "NFC-Kortti poistettu onnistuneesti" +#: www/views.py:528 +#, python-brace-format +msgid "Updateuser ran for user {user}" +msgstr "" + +#~ msgid "Note: You can always delete invoice if you choose not to pay it" +#~ msgstr "" +#~ "Huomaa: Voit koska tahansa poistaa laskun jos et haluakaan maksaa sitä" + +#~ msgid "Update user's data" +#~ msgstr "Päivitä käyttäjän data" + #~ msgid "capture" #~ msgstr "haltuunota" -#~ msgid "Nickname" -#~ msgstr "Kutsumanimi" - #~ msgid "Matrix ID" #~ msgstr "Matrix ID" #~ msgid "Claim NFC card" #~ msgstr "Käytä NFC-korttia" -#~ msgid "Save changes" -#~ msgstr "Tallenna muutokset" - #~ msgid "Matrix ID already in use" #~ msgstr "Matrix ID on jo käytössä" diff --git a/www/templates/www/user.html b/www/templates/www/user.html index 16a55a79..b2280cee 100644 --- a/www/templates/www/user.html +++ b/www/templates/www/user.html @@ -6,7 +6,7 @@

{% trans 'User data for' %} {{ userdetails.first_name }} {{ userdetails.last_name }}

- + {% bootstrap_messages %} diff --git a/www/templates/www/usersettings.html b/www/templates/www/usersettings.html index 33a540a3..6d355eb0 100644 --- a/www/templates/www/usersettings.html +++ b/www/templates/www/usersettings.html @@ -24,7 +24,17 @@

{% trans 'User settings' %}

/> {% endbuttons %} - + {% if has_matrix %} +
+

{% trans 'Matrix Community' %}

+ {% csrf_token %} + + + {% endif %}

{% trans 'Extra Services' %}

diff --git a/www/urls.py b/www/urls.py index a048c6a0..a8f2707d 100644 --- a/www/urls.py +++ b/www/urls.py @@ -39,6 +39,11 @@ views.usersettings_delete_nfc, name="usersettings_delete_nfc", ), + path( + "usersettings//matrixinvite", + views.usersettings_matrixinvite, + name="usersettings_matrixinvite", + ), path("custominvoice", views.custominvoice, name="custominvoice"), path( "custominvoice///", diff --git a/www/views.py b/www/views.py index 95b5d235..df4fef0a 100644 --- a/www/views.py +++ b/www/views.py @@ -16,6 +16,7 @@ from api.models import DeviceAccessLogEntry from drfx import config +from utils.matrixoperations import MatrixOperations from users.models import ( BankTransaction, CustomInvoice, @@ -278,7 +279,6 @@ def usersettings(request, id): .exclude(payload__isnull=True) .order_by("-date") ) - return render( request, "www/usersettings.html", @@ -288,9 +288,24 @@ def usersettings(request, id): "subscribable_services": subscribable_services, "unsubscribable_services": unsubscribable_services, "unclaimed_nfccards": unclaimed_nfccards, + "has_matrix": len(config.MATRIX_ACCESS_TOKEN) > 0 and customuser.mxid is not None }, ) +@login_required +@self_or_staff_member_required +def usersettings_matrixinvite(request, id): + """ + Invite user to matrix room/space + """ + customuser = get_object_or_404(CustomUser, id=id) + mxid = customuser.mxid + print('Invite', mxid) + mo = MatrixOperations(config.MATRIX_ACCESS_TOKEN, config.MATRIX_SERVER) + mo.invite_user(mxid, config.MATRIX_ROOM_ID, _("Welcome to member's Matrix space")) + messages.success(request, _("You have been invited")) + return userdetails(request, id) + @login_required @self_or_staff_member_required
{% trans 'Name' %}