diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 44dfb755b..688b86508 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,8 +14,8 @@ jobs: strategy: matrix: python: - - "3.9" - - "3.13" + - "3.11" # Debian Bookworm + - "3.13" # Debian Trixie services: db: diff --git a/.gitignore b/.gitignore index 6785819bd..8964fb350 100644 --- a/.gitignore +++ b/.gitignore @@ -80,3 +80,8 @@ __pycache__/ # Pipenv /requirements.txt + +# Static files (runtime) +serveradmin/_static +serveradmin/_media + diff --git a/Pipfile b/Pipfile index f36300909..6a6d817f9 100644 --- a/Pipfile +++ b/Pipfile @@ -10,7 +10,7 @@ name = "pypi" # Like ipaddress but for MACs netaddr = ">=0.8.0,<1.4.0" # Debian stretch version -Django = "~=4.2" +Django = "~=5.2" # postgres lib used by django psycopg2-binary = "~=2.9" # Django support for network address fields on PostgreSQL @@ -21,7 +21,7 @@ Pillow = "~=10.0" dateparser = "~=1.1" # Use Twelve-factor methodology to configure environment variables django-environ = "<1.0.0" -django_compressor = "~=4.4" +django_compressor = "~=4.6" # Serveradmin extras: paramiko = ">=2.7,<4" pexpect = "<5.0.0" @@ -33,7 +33,7 @@ typing-extensions = "*" sphinx = "~=7.0" sphinx-rtd-theme = "~=2.0" # Provides runserver_plus and other gadgets -django-extensions = "<4.0.0" +django-extensions = "<5.0.0" # Required for runserver_plus to work Werkzeug = "<4.0.0" # Used to package a single executable according to PEP 441 @@ -46,7 +46,7 @@ faker = "<14.0.0" tblib = "*" [requires] -python_version = "3.13" +python_version = ">=3.11,<3.14" [production] sentry-sdk = {version = "*", extras = ["django"]} diff --git a/Pipfile.lock b/Pipfile.lock index 916797da7..a219c0657 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,11 +1,11 @@ { "_meta": { "hash": { - "sha256": "883d5e86bc1346dd8a52f3af2d2925bbc3c68ec79b26a34d695ef965a10c55a4" + "sha256": "c53e3ab83eb9a83ef95ae1c6a523eb40f26077e60100ee147aa682aadc1875bc" }, "pipfile-spec": 6, "requires": { - "python_version": "3.13" + "python_version": ">=3.11,<3.14" }, "sources": [ { @@ -185,58 +185,58 @@ }, "cryptography": { "hashes": [ - "sha256:0890f502ddf7d9c6426129c3f49f5c0a39278ed7cd6322c8755ffca6ee675a13", - "sha256:0c558d2cdffd8f4bbb30fc7134c74d2ca9a476f830bb053074498fbc86f41ed6", - "sha256:16cd65b9330583e4619939b3a3843eec1e6e789744bb01e7c7e2e62e33c239c8", - "sha256:18349bbc56f4743c8b12dc32e2bccb2cf83ee8b69a3bba74ef8ae857e26b3d25", - "sha256:1e2d54c8be6152856a36f0882ab231e70f8ec7f14e93cf87db8a2ed056bf160c", - "sha256:22a5cb272895dce158b2cacdfdc3debd299019659f42947dbdac6f32d68fe832", - "sha256:27241b1dc9962e056062a8eef1991d02c3a24569c95975bd2322a8a52c6e5e12", - "sha256:2b4d59804e8408e2fea7d1fbaf218e5ec984325221db76e6a241a9abd6cdd95c", - "sha256:2eb992bbd4661238c5a397594c83f5b4dc2bc5b848c365c8f991b6780efcc5c7", - "sha256:369a6348999f94bbd53435c894377b20ab95f25a9065c283570e70150d8abc3c", - "sha256:3cb07a3ed6431663cd321ea8a000a1314c74211f823e4177fefa2255e057d1ec", - "sha256:40ba1f85eaa6959837b1d51c9767e230e14612eea4ef110ee8854ada22da1bf5", - "sha256:4defde8685ae324a9eb9d818717e93b4638ef67070ac9bc15b8ca85f63048355", - "sha256:55b7718303bf06a5753dcdccf2f3945cf18ad7bffde41b61226e4db31ab89a9c", - "sha256:561215ea3879cb1cbbf272867e2efda62476f240fb58c64de6b393ae19246741", - "sha256:58d00498e8933e4a194f3076aee1b4a97dfec1a6da444535755822fe5d8b0b86", - "sha256:59baa2cb386c4f0b9905bd6eb4c2a79a69a128408fd31d32ca4d7102d4156321", - "sha256:5a5ed8fde7a1d09376ca0b40e68cd59c69fe23b1f9768bd5824f54681626032a", - "sha256:5b012212e08b8dd5edc78ef54da83dd9892fd9105323b3993eff6bea65dc21d7", - "sha256:5c3932f4436d1cccb036cb0eaef46e6e2db91035166f1ad6505c3c9d5a635920", - "sha256:614d0949f4790582d2cc25553abd09dd723025f0c0e7c67376a1d77196743d6e", - "sha256:76341972e1eff8b4bea859f09c0d3e64b96ce931b084f9b9b7db8ef364c30eff", - "sha256:77a2ccbbe917f6710e05ba9adaa25fb5075620bf3ea6fb751997875aff4ae4bd", - "sha256:7995ef305d7165c3f11ae07f2517e5a4f1d5c18da1376a0a9ed496336b69e5f3", - "sha256:7ce4bfae76319a532a2dc68f82cc32f5676ee792a983187dac07183690e5c66f", - "sha256:7e8eac43dfca5c4cccc6dad9a80504436fca53bb9bc3100a2386d730fbe6b602", - "sha256:84cf79f0dc8b36ac5da873481716e87aef31fcfa0444f9e1d8b4b2cece142855", - "sha256:8c7378637d7d88016fa6791c159f698b3d3eed28ebf844ac36b9dc04a14dae18", - "sha256:8cd666227ef7af430aa5914a9910e0ddd703e75f039cef0825cd0da71b6b711a", - "sha256:906cbf0670286c6e0044156bc7d4af9cbb0ef6db9f73e52c3ec56ba6bdde5336", - "sha256:9071196d81abc88b3516ac8cdfad32e2b66dd4a5393a8e68a961e9161ddc6239", - "sha256:9249e3cd978541d665967ac2cb2787fd6a62bddf1e75b3e347a594d7dacf4f74", - "sha256:984a20b0f62a26f48a3396c72e4bc34c66e356d356bf370053066b3b6d54634a", - "sha256:9be5aafa5736574f8f15f262adc81b2a9869e2cfe9014d52a44633905b40d52c", - "sha256:9c459db21422be75e2809370b829a87eb37f74cd785fc4aa9ea1e5f43b47cda4", - "sha256:9ccdac7d40688ecb5a3b4a604b8a88c8002e3442d6c60aead1db2a89a041560c", - "sha256:a0e692c683f4df67815a2d258b324e66f4738bd7a96a218c826dce4f4bd05d8f", - "sha256:a5da777e32ffed6f85a7b2b3f7c5cbc88c146bfcd0a1d7baf5fcc6c52ee35dd4", - "sha256:a64697c641c7b1b2178e573cbc31c7c6684cd56883a478d75143dbb7118036db", - "sha256:ad64688338ed4bc1a6618076ba75fd7194a5f1797ac60b47afe926285adb3166", - "sha256:bd72e68b06bb1e96913f97dd4901119bc17f39d4586a5adf2d3e47bc2b9d58b5", - "sha256:c17dfe85494deaeddc5ce251aebd1d60bbe6afc8b62071bb0b469431a000124f", - "sha256:c18684a7f0cc9a3cb60328f496b8e3372def7c5d2df39ac267878b05565aaaae", - "sha256:cc90c0b39b2e3c65ef52c804b72e3c58f8a04ab2a1871272798e5f9572c17d20", - "sha256:db63bf618e5dea46c07de12e900fe1cdd2541e6dc9dbae772a70b7d4d4765f6a", - "sha256:ea8990436d914540a40ab24b6a77c0969695ed52f4a4874c5137ccf7045a7057", - "sha256:ecde28a596bead48b0cfd2a1b4416c3d43074c2d785e3a398d7ec1fc4d0f7fbb", - "sha256:f5333311663ea94f75dd408665686aaf426563556bb5283554a3539177e03b8c", - "sha256:fdfef35d751d510fcef5252703621574364fec16418c4a1e5e1055248401054b" + "sha256:08a597acce1ff37f347400087776599e2348a3a8bc53b44120e463cd274efe4a", + "sha256:09f73a725d582cef64b91281a322cd798d14a33b2b6f2b7ad9531dc336d84c02", + "sha256:0df56b056bc17c1b7d6821dfa65216e62bd232d8ab05eb3db44e71d235651471", + "sha256:0ee6ea481db1ab889cba043ec1eda17bb9c1ea79db6722f779c3667f9f70322f", + "sha256:15254441469dd6bf027039453288e2072124f8b6603563f5d759e1c9b69273fa", + "sha256:266f4ee051abb2f725b74ef8072b521ce1feacf685a3364fa6a6b45548db791a", + "sha256:2c37f2461406063b417837f5f3daab668652acd82423efcd7f0a9f04be972de1", + "sha256:32143b24adb918f078134e1e230f1eb8cc04886b92c28b5f0041aaf3e5699225", + "sha256:33842cf0888951cef5bc7ac724ab844a42044c1727b967b7f8997289a0464f92", + "sha256:3752f2dbc8f07a30aad2932c986cea495b03bb554887828225da104f732852b6", + "sha256:39489bfca54c7a1f6b297efcd8bc608ab92d16c4ca631b0cad4da46724588b24", + "sha256:3e4a1a3232eef2e6c732827d5722db29a0cc8b27af2a4d865b094cf954be9ca1", + "sha256:3fd2ca57062b241c856670b073487d2e86c4637937ca5601e48f97bf8e11fc8f", + "sha256:42fcd8e26fe555d9b3577a135f5091fefa0aa4e99129c23fb56787a1bd4ada72", + "sha256:43c5835e2cb98c8733d86f57d6fc879b613f5c3478607281c3e36daffc6dd8a6", + "sha256:48fe40804d4caa2288f24e70ca8c64c42dd826da0ad7e4f1b41b2128d679e6c8", + "sha256:4ab0a343c807bbcd90c971cd1ecf072937cd01847a9e002bef88fb47ac6be577", + "sha256:4fdc69f8e4316bcf0c8c8ec1f26f285d12e8142d88d96c876a59a03be3f6ae67", + "sha256:6184ca7b174f28d7c703f1290d4b297217c45355f77a98f67e9b7f14549ac54a", + "sha256:66fd0771e7b9c6dcd44cf1120690d2338d16d72795cf40cae2786a39eba65429", + "sha256:6b2c0c3e6ccf3ade7750f836ef3ee36eea250cc467d45c256895573ac08cc6f1", + "sha256:735824ec41b7f74a7c45fb1591349333e4c696cb6c044e5f46356e560143e4cd", + "sha256:7e234ac052af99f2700826a5c29ea99d9c1b1f80341cde62d11c8154dc8e0bd9", + "sha256:869c3b8a53bfe27147832df48b32adadf558249d50e76cb3769d40e986b13265", + "sha256:86be3b1b0b6bf09482fb50a979c508d2950ed95f5621ec77f4e385962006b83a", + "sha256:86fe77abb1bd87afb251d4d02ada7ecf53a32cee9b67d976abb2e45a13297475", + "sha256:88c852a0ae366e262e5a1744b685e6a433dc8788dd2a277e418bf4904203609d", + "sha256:8ace4507d1e6533c125f4fac754f8bb8b6a74c08e92179dabd7e16571a3efbf3", + "sha256:92a46e1d638daa264ba2971c0b0489c9409787943efae4d60ffda3d091ef832c", + "sha256:9621de99d2da096006b629979efd8ae7eb2d8b822488d0c89ee4000c306c59b1", + "sha256:9a49ca6c81417f6a5edb50375a60cccdd70fa0a91a5211829dbea74eba94d2ac", + "sha256:9bd3f92d76217892b15df84ca256c2c113d386fdda7a7d8691aeeced976507c6", + "sha256:9de21387aa95e2a895823d0745b430bed4f33503ba9ab5e0b5311f33e37d66d2", + "sha256:b024e784ad6c077ee0147b35ea9cbfc1e34e1fd4c1dcca214c2794d73a12df08", + "sha256:b4e391975f038e66432328639620a4aff2d307513b004f1ca06d6225bced815c", + "sha256:b74ca3b8e5ecdd833bf6a002ca41b4793bb27fb8f1c06ffaf2643c9e9140e31b", + "sha256:b7a2d1a937a738a881737cec135a38bb61470589b17515b9f73f571d0ae10401", + "sha256:b9a32b876490d66c8bcc9963ef220199569748434ab01a9d6aaeabf88e7f5158", + "sha256:bd81490cd5801d755cf97bb68ac191f14b708470b1c7cf4580f669b9c9264cd8", + "sha256:c1400da5e32a43253392277eac7490a60e497d810a63dd5608d71bbd7af507c9", + "sha256:d069066deead00ac7f090be101be875a06855908f7ec004c27b8fefb4acfb411", + "sha256:d5d30989c6917b478b5817902e85fddaea2261efa8648383d965381ccb9e1ac4", + "sha256:df637c05205ea7c1d7fbcbe54bbfea648a52951155f997af13d895d0ecc96991", + "sha256:e361afba8918070d376df76f408a4f67fec0ee9cff81a99e48fe9a233ef59e17", + "sha256:eb86ce1af36fe65041b6db9a8bb064ee621a7e5fded0f80d475ec243477cd242", + "sha256:f0d27a5696721ef7a672b8c810f6aded391058e0b9486e63e6d93baf765da691", + "sha256:f2ceef93cb096aa3c4cc4b5c94ca6131f9196d28c64d6111533402a9b2054d41", + "sha256:f817adc181390bd54f2f700107a7419040fb7c1bdf2fc26f36551a06a68c3345", + "sha256:fe0180af5bf9236518a087e35bf2d9a347d5f5f51e63c579d683ddff424e3d46" ], "markers": "python_version >= '3.9' and python_full_version not in '3.9.0, 3.9.1'", - "version": "==48.0.0" + "version": "==48.0.1" }, "dateparser": { "hashes": [ @@ -249,12 +249,12 @@ }, "django": { "hashes": [ - "sha256:4d07aaf1c62f9984842b67c2874ebbf7056a17be253860299b93ae1881faad65", - "sha256:4ebc7a434e3819db6cf4b399fb5b3f536310a30e8486f08b66886840be84b37c" + "sha256:0eb4a9bb1853a35b0286dbc6d916bd352c8c2687195a7f2d6f80cefd840e4970", + "sha256:5154a9bf84ac01dde011e367f355c07dbb329532e06810dcf3ef2af269e236e7" ], "index": "pypi", - "markers": "python_version >= '3.8'", - "version": "==4.2.30" + "markers": "python_version >= '3.10'", + "version": "==5.2.15" }, "django-appconf": { "hashes": [ @@ -1048,21 +1048,21 @@ }, "django": { "hashes": [ - "sha256:4d07aaf1c62f9984842b67c2874ebbf7056a17be253860299b93ae1881faad65", - "sha256:4ebc7a434e3819db6cf4b399fb5b3f536310a30e8486f08b66886840be84b37c" + "sha256:0eb4a9bb1853a35b0286dbc6d916bd352c8c2687195a7f2d6f80cefd840e4970", + "sha256:5154a9bf84ac01dde011e367f355c07dbb329532e06810dcf3ef2af269e236e7" ], "index": "pypi", - "markers": "python_version >= '3.8'", - "version": "==4.2.30" + "markers": "python_version >= '3.10'", + "version": "==5.2.15" }, "django-extensions": { "hashes": [ - "sha256:44d27919d04e23b3f40231c4ab7af4e61ce832ef46d610cc650d53e68328410a", - "sha256:9600b7562f79a92cbf1fde6403c04fee314608fefbb595502e34383ae8203401" + "sha256:0699a7af28f2523bf8db309a80278519362cd4b6e1fd0a8cd4bf063e1e023336", + "sha256:7b70a4d28e9b840f44694e3f7feb54f55d495f8b3fa6c5c0e5e12bcb2aa3cdeb" ], "index": "pypi", - "markers": "python_version >= '3.6'", - "version": "==3.2.3" + "markers": "python_version >= '3.9'", + "version": "==4.1" }, "docutils": { "hashes": [ @@ -1396,23 +1396,23 @@ }, "django": { "hashes": [ - "sha256:4d07aaf1c62f9984842b67c2874ebbf7056a17be253860299b93ae1881faad65", - "sha256:4ebc7a434e3819db6cf4b399fb5b3f536310a30e8486f08b66886840be84b37c" + "sha256:0eb4a9bb1853a35b0286dbc6d916bd352c8c2687195a7f2d6f80cefd840e4970", + "sha256:5154a9bf84ac01dde011e367f355c07dbb329532e06810dcf3ef2af269e236e7" ], "index": "pypi", - "markers": "python_version >= '3.8'", - "version": "==4.2.30" + "markers": "python_version >= '3.10'", + "version": "==5.2.15" }, "sentry-sdk": { "extras": [ "django" ], "hashes": [ - "sha256:9c6adccb3feefa9ba032c8d295ca477575c2f11896046a2b0ad686c47c4af555", - "sha256:fa36eaf4b8ad708f718500d4bdcc1532637526a22beb874d88cbc0a46458b5ae" + "sha256:27f61d13a86c3c1648dec666dd5a64f79772dd6a84b446f11866601ecab24f6f", + "sha256:3c870b9f50d9fd15b58c817dbde1c7cfaa9fe3f05df0a4c6edd5571cb82f5491" ], "markers": "python_version >= '3.6'", - "version": "==2.61.1" + "version": "==2.62.0" }, "sqlparse": { "hashes": [ diff --git a/serveradmin/api/decorators.py b/serveradmin/api/decorators.py index f2f637cda..dc29f2903 100644 --- a/serveradmin/api/decorators.py +++ b/serveradmin/api/decorators.py @@ -3,7 +3,7 @@ Copyright (c) 2019 InnoGames GmbH """ -from datetime import datetime, timedelta +from datetime import datetime, timedelta, timezone as dt_timezone from functools import update_wrapper from logging import getLogger from base64 import b64decode @@ -55,7 +55,7 @@ def _wrapper(request): token = request.META.get('HTTP_X_SECURITYTOKEN') then = datetime.utcfromtimestamp( int(request.META['HTTP_X_TIMESTAMP']) - ).replace(tzinfo=timezone.utc) + ).replace(tzinfo=dt_timezone.utc) body_json = json.loads(body) if body else None status_code = 200 diff --git a/serveradmin/graphite/migrations/0003_alter_collection_params_alter_numeric_params_and_more.py b/serveradmin/graphite/migrations/0003_alter_collection_params_alter_numeric_params_and_more.py new file mode 100644 index 000000000..5d24aa089 --- /dev/null +++ b/serveradmin/graphite/migrations/0003_alter_collection_params_alter_numeric_params_and_more.py @@ -0,0 +1,34 @@ +# Generated by Django 4.2.30 on 2026-06-12 14:08 + +from django.db import migrations, models +import serveradmin.graphite.validators + + +class Migration(migrations.Migration): + + dependencies = [ + ('graphite', '0002_template_and_variation_name_validation'), + ] + + operations = [ + migrations.AlterField( + model_name='collection', + name='params', + field=models.TextField(blank=True, help_text='\n Part of the URL after "?" to GET the graph or the value from\n the Graphite. It will be concatenated with the params for\n the template and the variation. Make sure it doesn\'t include\n any character that doesn\'t allowed on URL\'s. Also do not include "?"\n and do not put "&" at the end.\n\n The params can include variables inside curly brackets like\n "{hostname}".\n Variables can be any string attribute except multiple ones related to\n the servers. See Python String Formatting documentation [1] for other\n formatting options. The dots inside the values are replaced with\n underscores in advance. If you need to include a brace character in\n the parameters, it can be escaped by doubling: \'{{ and }}\'.\n\n Example params:\n\n width=500&height=500\n\n [1] https://docs.python.org/2/library/string.html#formatstrings\n ', validators=[serveradmin.graphite.validators.validate_unique_uri_parameters]), + ), + migrations.AlterField( + model_name='numeric', + name='params', + field=models.TextField(blank=True, help_text='Same as the params of the collections', validators=[serveradmin.graphite.validators.validate_unique_uri_parameters]), + ), + migrations.AlterField( + model_name='template', + name='params', + field=models.TextField(blank=True, help_text='\n Same as the params of the collections.\n ', validators=[serveradmin.graphite.validators.validate_unique_uri_parameters]), + ), + migrations.AlterField( + model_name='variation', + name='params', + field=models.TextField(blank=True, help_text='\n Same as the params of the collections.\n ', validators=[serveradmin.graphite.validators.validate_unique_uri_parameters]), + ), + ] diff --git a/serveradmin/serverdb/migrations/0024_rename_serverbooleanattribute_attribute_server_bool_attribu_25fb6c_idx_and_more.py b/serveradmin/serverdb/migrations/0024_rename_serverbooleanattribute_attribute_server_bool_attribu_25fb6c_idx_and_more.py new file mode 100644 index 000000000..cf7030596 --- /dev/null +++ b/serveradmin/serverdb/migrations/0024_rename_serverbooleanattribute_attribute_server_bool_attribu_25fb6c_idx_and_more.py @@ -0,0 +1,53 @@ +# Generated by Django 5.2.15 on 2026-06-12 14:00 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('serverdb', '0023_attribute_multi_target_servertype'), + ] + + operations = [ + migrations.RenameIndex( + model_name='serverbooleanattribute', + new_name='server_bool_attribu_25fb6c_idx', + old_fields=('attribute',), + ), + migrations.RenameIndex( + model_name='serverdateattribute', + new_name='server_date_attribu_12cbb2_idx', + old_fields=('attribute', 'value'), + ), + migrations.RenameIndex( + model_name='serverdatetimeattribute', + new_name='server_date_attribu_f35d26_idx', + old_fields=('attribute', 'value'), + ), + migrations.RenameIndex( + model_name='serverinetattribute', + new_name='server_inet_attribu_8feba2_idx', + old_fields=('attribute', 'value'), + ), + migrations.RenameIndex( + model_name='servermacaddressattribute', + new_name='server_maca_attribu_1bcfb5_idx', + old_fields=('attribute', 'value'), + ), + migrations.RenameIndex( + model_name='servernumberattribute', + new_name='server_numb_attribu_6223e1_idx', + old_fields=('attribute', 'value'), + ), + migrations.RenameIndex( + model_name='serverrelationattribute', + new_name='server_rela_attribu_ecf9db_idx', + old_fields=('attribute', 'value'), + ), + migrations.RenameIndex( + model_name='serverstringattribute', + new_name='server_stri_attribu_59edc4_idx', + old_fields=('attribute', 'value'), + ), + ] diff --git a/serveradmin/serverdb/models.py b/serveradmin/serverdb/models.py index e91f0ccfa..f60aad064 100644 --- a/serveradmin/serverdb/models.py +++ b/serveradmin/serverdb/models.py @@ -612,7 +612,7 @@ class Meta: app_label = "serverdb" db_table = "server_string_attribute" unique_together = [["server", "attribute", "value"]] - index_together = [["attribute", "value"]] + indexes = [models.Index(fields=["attribute", "value"])] def save_value(self, value): for char in "'\"": @@ -659,7 +659,7 @@ class Meta: app_label = "serverdb" db_table = "server_relation_attribute" unique_together = [["server", "attribute", "value"]] - index_together = [["attribute", "value"]] + indexes = [models.Index(fields=["attribute", "value"])] def save_value(self, value): try: @@ -690,7 +690,7 @@ class Meta: app_label = "serverdb" db_table = "server_boolean_attribute" unique_together = [["server", "attribute"]] - index_together = [["attribute"]] + indexes = [models.Index(fields=["attribute"])] def get_value(self): return True @@ -715,7 +715,7 @@ class Meta: app_label = "serverdb" db_table = "server_number_attribute" unique_together = [["server", "attribute", "value"]] - index_together = [["attribute", "value"]] + indexes = [models.Index(fields=["attribute", "value"])] def get_value(self): return ( @@ -738,8 +738,8 @@ class Meta: app_label = "serverdb" db_table = "server_inet_attribute" unique_together = [["server", "attribute", "value"]] - index_together = [["attribute", "value"]] indexes = [ + models.Index(fields=["attribute", "value"]), GistIndex(fields=["value"], opclasses=["inet_ops"], name="server_inet_attribute_value_idx"), ] @@ -798,7 +798,7 @@ class Meta: app_label = "serverdb" db_table = "server_macaddr_attribute" unique_together = [["server", "attribute", "value"]] - index_together = [["attribute", "value"]] + indexes = [models.Index(fields=["attribute", "value"])] class ServerDateAttribute(ServerAttribute): @@ -814,7 +814,7 @@ class Meta: app_label = "serverdb" db_table = "server_date_attribute" unique_together = [["server", "attribute", "value"]] - index_together = [["attribute", "value"]] + indexes = [models.Index(fields=["attribute", "value"])] class ServerDateTimeAttribute(ServerAttribute): @@ -830,7 +830,7 @@ class Meta: app_label = "serverdb" db_table = "server_datetime_attribute" unique_together = [["server", "attribute", "value"]] - index_together = [["attribute", "value"]] + indexes = [models.Index(fields=["attribute", "value"])] class ChangeCommit(models.Model): diff --git a/serveradmin/settings.py b/serveradmin/settings.py index 65aedf48c..999c16ce3 100644 --- a/serveradmin/settings.py +++ b/serveradmin/settings.py @@ -92,10 +92,6 @@ # to load the internationalization machinery. USE_I18N = False -# If you set this to False, Django will not format dates, numbers and -# calendars according to the current locale. -USE_L10N = False - # If you set this to False, Django will not use timezone-aware datetimes. USE_TZ = True diff --git a/setup.py b/setup.py index ae2dab8ce..a1ab4bbaa 100755 --- a/setup.py +++ b/setup.py @@ -66,7 +66,7 @@ 'paramiko>=2.7,<4', 'netaddr>=0.8.0,<1.4.0', ], - python_requires=">=3.9,<3.14", + python_requires=">=3.11,<3.14", author='InnoGames System Administration', author_email='it@innogames.com', )