aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2021-12-11 19:20:56 +0000
committerGravatar GitHub <[email protected]>2021-12-11 19:20:56 +0000
commit6b8cce5e3f013dfd3f33744127a02e52ed82ce36 (patch)
treee2f930f42ac2ed36d2d5e2255a3e80c9cf4af754
parentUse new approx message count view (diff)
parentMerge pull request #630 from python-discord/dependabot/pip/django-3.1.13 (diff)
Merge branch 'main' into use-new-message-view
-rw-r--r--poetry.lock21
-rw-r--r--pydis_site/apps/api/migrations/0077_use_generic_jsonfield.py25
-rw-r--r--pydis_site/apps/api/models/bot/bot_setting.py3
-rw-r--r--pydis_site/apps/api/models/bot/message.py2
-rw-r--r--pydis_site/apps/api/models/utils.py3
-rw-r--r--pyproject.toml4
6 files changed, 41 insertions, 17 deletions
diff --git a/poetry.lock b/poetry.lock
index eac58fdb..23dcfbb1 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -122,14 +122,14 @@ python-versions = "*"
[[package]]
name = "django"
-version = "3.0.14"
+version = "3.1.13"
description = "A high-level Python Web framework that encourages rapid development and clean, pragmatic design."
category = "main"
optional = false
python-versions = ">=3.6"
[package.dependencies]
-asgiref = ">=3.2,<4.0"
+asgiref = ">=3.2.10,<4"
pytz = "*"
sqlparse = ">=0.2.2"
@@ -159,14 +159,14 @@ python-versions = "*"
[[package]]
name = "django-filter"
-version = "2.1.0"
+version = "21.1"
description = "Django-filter is a reusable Django application for allowing users to filter querysets dynamically."
category = "main"
optional = false
-python-versions = ">=3.4"
+python-versions = ">=3.6"
[package.dependencies]
-Django = ">=1.11"
+Django = ">=2.2"
[[package]]
name = "django-prometheus"
@@ -769,7 +769,7 @@ brotli = ["brotli"]
[metadata]
lock-version = "1.1"
python-versions = "3.9.*"
-content-hash = "9f0c069c14e2dbff63d58474702693f0c02b8cfd30e5af38303975a73b71bcfd"
+content-hash = "52569d311f19fb121cd6f824bf35bdb9611705b393d8aa013b8a1ce6e4ebbcbb"
[metadata.files]
asgiref = [
@@ -867,8 +867,8 @@ distlib = [
{file = "distlib-0.3.3.zip", hash = "sha256:d982d0751ff6eaaab5e2ec8e691d949ee80eddf01a62eaa96ddb11531fe16b05"},
]
django = [
- {file = "Django-3.0.14-py3-none-any.whl", hash = "sha256:9bc7aa619ed878fedba62ce139abe663a147dccfd20e907725ec11e02a1ca225"},
- {file = "Django-3.0.14.tar.gz", hash = "sha256:d58d8394036db75a81896037d757357e79406e8f68816c3e8a28721c1d9d4c11"},
+ {file = "Django-3.1.13-py3-none-any.whl", hash = "sha256:a6e0d1ff11095b7394c079ade7094c73b2dc3df4a7a373c9b58ed73b77a97feb"},
+ {file = "Django-3.1.13.tar.gz", hash = "sha256:9f8be75646f62204320b195062b1d696ba28aa3d45ee72fb7c888ffaebc5bdb2"},
]
django-distill = [
{file = "django-distill-2.9.0.tar.gz", hash = "sha256:08f31dcde2e79e73c0bc4f36941830603a811cc89472be11f79f14affb460d84"},
@@ -878,8 +878,8 @@ django-environ = [
{file = "django_environ-0.4.5-py2.py3-none-any.whl", hash = "sha256:c57b3c11ec1f319d9474e3e5a79134f40174b17c7cc024bbb2fad84646b120c4"},
]
django-filter = [
- {file = "django-filter-2.1.0.tar.gz", hash = "sha256:3dafb7d2810790498895c22a1f31b2375795910680ac9c1432821cbedb1e176d"},
- {file = "django_filter-2.1.0-py3-none-any.whl", hash = "sha256:a3014de317bef0cd43075a0f08dfa1d319a7ccc5733c3901fb860da70b0dda68"},
+ {file = "django-filter-21.1.tar.gz", hash = "sha256:632a251fa8f1aadb4b8cceff932bb52fe2f826dd7dfe7f3eac40e5c463d6836e"},
+ {file = "django_filter-21.1-py3-none-any.whl", hash = "sha256:f4a6737a30104c98d2e2a5fb93043f36dd7978e0c7ddc92f5998e85433ea5063"},
]
django-prometheus = [
{file = "django-prometheus-2.1.0.tar.gz", hash = "sha256:dd3f8da1399140fbef5c00d1526a23d1ade286b144281c325f8e409a781643f2"},
@@ -967,6 +967,7 @@ libsass = [
{file = "libsass-0.21.0-cp36-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:e2b1a7d093f2e76dc694c17c0c285e846d0b0deb0e8b21dc852ba1a3a4e2f1d6"},
{file = "libsass-0.21.0-cp36-abi3-win32.whl", hash = "sha256:abc29357ee540849faf1383e1746d40d69ed5cb6d4c346df276b258f5aa8977a"},
{file = "libsass-0.21.0-cp36-abi3-win_amd64.whl", hash = "sha256:659ae41af8708681fa3ec73f47b9735a6725e71c3b66ff570bfce78952f2314e"},
+ {file = "libsass-0.21.0-cp38-abi3-macosx_12_0_arm64.whl", hash = "sha256:c9ec490609752c1d81ff6290da33485aa7cb6d7365ac665b74464c1b7d97f7da"},
{file = "libsass-0.21.0.tar.gz", hash = "sha256:d5ba529d9ce668be9380563279f3ffe988f27bc5b299c5a28453df2e0b0fbaf2"},
]
markdown = [
diff --git a/pydis_site/apps/api/migrations/0077_use_generic_jsonfield.py b/pydis_site/apps/api/migrations/0077_use_generic_jsonfield.py
new file mode 100644
index 00000000..9e8f2fb9
--- /dev/null
+++ b/pydis_site/apps/api/migrations/0077_use_generic_jsonfield.py
@@ -0,0 +1,25 @@
+# Generated by Django 3.1.13 on 2021-11-27 12:27
+
+import django.contrib.postgres.fields
+from django.db import migrations, models
+import pydis_site.apps.api.models.utils
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('api', '0076_merge_20211125_1941'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='botsetting',
+ name='data',
+ field=models.JSONField(help_text='The actual settings of this setting.'),
+ ),
+ migrations.AlterField(
+ model_name='deletedmessage',
+ name='embeds',
+ field=django.contrib.postgres.fields.ArrayField(base_field=models.JSONField(validators=[pydis_site.apps.api.models.utils.validate_embed]), blank=True, help_text='Embeds attached to this message.', size=None),
+ ),
+ ]
diff --git a/pydis_site/apps/api/models/bot/bot_setting.py b/pydis_site/apps/api/models/bot/bot_setting.py
index 2a3944f8..1bcb1ae6 100644
--- a/pydis_site/apps/api/models/bot/bot_setting.py
+++ b/pydis_site/apps/api/models/bot/bot_setting.py
@@ -1,4 +1,3 @@
-from django.contrib.postgres import fields as pgfields
from django.core.exceptions import ValidationError
from django.db import models
@@ -24,6 +23,6 @@ class BotSetting(ModelReprMixin, models.Model):
max_length=50,
validators=(validate_bot_setting_name,)
)
- data = pgfields.JSONField(
+ data = models.JSONField(
help_text="The actual settings of this setting."
)
diff --git a/pydis_site/apps/api/models/bot/message.py b/pydis_site/apps/api/models/bot/message.py
index 60e2a553..bab3368d 100644
--- a/pydis_site/apps/api/models/bot/message.py
+++ b/pydis_site/apps/api/models/bot/message.py
@@ -48,7 +48,7 @@ class Message(ModelReprMixin, models.Model):
blank=True
)
embeds = pgfields.ArrayField(
- pgfields.JSONField(
+ models.JSONField(
validators=(validate_embed,)
),
blank=True,
diff --git a/pydis_site/apps/api/models/utils.py b/pydis_site/apps/api/models/utils.py
index 0e220a1d..859394d2 100644
--- a/pydis_site/apps/api/models/utils.py
+++ b/pydis_site/apps/api/models/utils.py
@@ -103,11 +103,10 @@ def validate_embed(embed: Any) -> None:
Example:
- >>> from django.contrib.postgres import fields as pgfields
>>> from django.db import models
>>> from pydis_site.apps.api.models.utils import validate_embed
>>> class MyMessage(models.Model):
- ... embed = pgfields.JSONField(
+ ... embed = models.JSONField(
... validators=(
... validate_embed,
... )
diff --git a/pyproject.toml b/pyproject.toml
index 2de2bf35..14310ce8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -7,9 +7,9 @@ license = "MIT"
[tool.poetry.dependencies]
python = "3.9.*"
-django = "~=3.0.4"
+django = "~=3.1.13"
django-environ = "~=0.4.5"
-django-filter = "~=2.1.0"
+django-filter = "~=21.1"
djangorestframework = "~=3.11.0"
psycopg2-binary = "~=2.8.0"
django-simple-bulma = "~=2.1"