Skip to content

Commit

Permalink
Backend serializer formatting and fix for allowed hosts assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed Oct 15, 2023
1 parent a3bb23a commit 9a10853
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
3 changes: 1 addition & 2 deletions backend/authentication/serializers.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import re
from typing import Any, Dict, Union

from content.models import Resource, Task, Topic
from django.utils.translation import gettext as _
from rest_framework import serializers

from content.models import Resource, Task, Topic
from utils.utils import (
validate_creation_and_deletion_dates,
validate_empty,
Expand Down
2 changes: 1 addition & 1 deletion backend/backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = int(os.environ.get("DEBUG", default=0))

ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS").split(" ")
ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS", "*").split(" ")

# Application definition

Expand Down
3 changes: 1 addition & 2 deletions backend/content/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
from typing import Any, Dict, Union

from django.utils.translation import gettext as _
from rest_framework import serializers

from events.models import Format
from rest_framework import serializers
from utils.utils import (
validate_creation_and_deletion_dates,
validate_creation_and_deprecation_dates,
Expand Down
5 changes: 2 additions & 3 deletions backend/entities/serializers.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from typing import Dict, Union

from django.utils.translation import gettext as _
from rest_framework import serializers

from authentication.models import User
from content.models import Resource, Task, Topic
from django.utils.translation import gettext as _
from events.models import Event
from rest_framework import serializers
from utils.utils import (
validate_creation_and_deletion_dates,
validate_empty,
Expand Down
5 changes: 2 additions & 3 deletions backend/events/serializers.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from typing import Dict, Union

from django.utils.translation import gettext as _
from rest_framework import serializers

from authentication.models import User
from content.models import Resource, Task, Topic
from django.utils.translation import gettext as _
from rest_framework import serializers
from utils.utils import (
validate_creation_and_deletion_dates,
validate_creation_and_deprecation_dates,
Expand Down

0 comments on commit 9a10853

Please sign in to comment.