12237 upgrade django and psycopg

This commit is contained in:
Arthur 2023-06-15 11:20:26 -07:00
parent e635f0defd
commit 4defbd11bf
4 changed files with 10 additions and 8 deletions

View File

@ -121,8 +121,8 @@ netaddr
Pillow Pillow
# PostgreSQL database adapter for Python # PostgreSQL database adapter for Python
# https://www.psycopg.org/docs/news.html # https://github.com/psycopg/psycopg2/blob/master/NEWS
psycopg2-binary psycopg-binary
# YAML rendering library # YAML rendering library
# https://github.com/yaml/pyyaml/blob/master/CHANGES # https://github.com/yaml/pyyaml/blob/master/CHANGES

View File

@ -290,8 +290,10 @@ class DataFile(models.Model):
@property @property
def data_as_string(self): def data_as_string(self):
if not self.data:
return None
try: try:
return self.data.tobytes().decode('utf-8') return bytes(self.data, 'utf-8')
except UnicodeDecodeError: except UnicodeDecodeError:
return None return None

View File

@ -61,6 +61,4 @@ class TaggedItem(GenericTaggedItemBase):
) )
class Meta: class Meta:
index_together = ( indexes = [models.Index(fields=["content_type", "object_id"])]
("content_type", "object_id")
)

View File

@ -1,6 +1,6 @@
bleach==6.0.0 bleach==6.0.0
boto3==1.26.145 boto3==1.26.145
Django==4.1.9 Django==4.2.2
django-cors-headers==4.0.0 django-cors-headers==4.0.0
django-debug-toolbar==4.1.0 django-debug-toolbar==4.1.0
django-filter==23.2 django-filter==23.2
@ -27,7 +27,9 @@ mkdocs-material==9.1.15
mkdocstrings[python-legacy]==0.22.0 mkdocstrings[python-legacy]==0.22.0
netaddr==0.8.0 netaddr==0.8.0
Pillow==9.5.0 Pillow==9.5.0
psycopg2-binary==2.9.6 psycopg==3.1.9
psycopg-binary==3.1.9
psycopg-pool==3.1.7
PyYAML==6.0 PyYAML==6.0
sentry-sdk==1.25.0 sentry-sdk==1.25.0
social-auth-app-django==5.2.0 social-auth-app-django==5.2.0