fix daphne deployment

This commit is contained in:
Alexander Laevens
2022-11-30 14:47:23 -07:00
parent 339b0c6ad9
commit 2e7a306279
6 changed files with 44 additions and 5 deletions

View File

@@ -8,6 +8,9 @@ https://docs.djangoproject.com/en/4.1/howto/deployment/asgi/
"""
import os
import django
django.setup()
from django.core.asgi import get_asgi_application
from channels.routing import ProtocolTypeRouter, URLRouter

View File

@@ -1,6 +1,16 @@
asgiref==3.5.2
async-timeout==4.0.2
attrs==22.1.0
autobahn==22.7.1
Automat==22.10.0
certifi==2022.9.24
cffi==1.15.1
channels==4.0.0
channels-redis==4.0.0
charset-normalizer==2.1.1
constantly==15.1.0
cryptography==38.0.4
daphne==4.0.0
Django==4.1.3
django-cors-headers==3.13.0
django-filter==22.1
@@ -8,14 +18,29 @@ django-nested-admin==4.0.2
djangorestframework==3.14.0
docopt==0.6.2
gunicorn==20.1.0
hyperlink==21.0.0
idna==3.4
incremental==22.10.0
Markdown==3.4.1
msgpack==1.0.4
packaging==21.3
Pillow==9.3.0
pipreqs==0.4.11
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.21
pyOpenSSL==22.1.0
pyparsing==3.0.9
python-monkey-business==1.0.0
pytz==2022.6
redis==4.3.5
requests==2.28.1
service-identity==21.1.0
six==1.16.0
sqlparse==0.4.3
Twisted==22.10.0
txaio==22.2.1
typing_extensions==4.4.0
urllib3==1.26.13
yarg==0.1.9
zope.interface==5.5.2

View File

@@ -21,6 +21,10 @@ class UserSerializer(serializers.ModelSerializer): # https://stackoverflow.com/
return super().update(instance, validated_data)
image = serializers.ImageField(
max_length=None, use_url=False
)
class Meta:
model = User
fields = ("id", "username", "first_name", "last_name", "password", "image", "homegroup", "homegroup_invites")