From 6fce3f17751a0649190a4dbb5c7ef05c79cb22f8 Mon Sep 17 00:00:00 2001 From: Chneemann Date: Mon, 19 Aug 2024 15:31:36 +0200 Subject: [PATCH] update allowed hosts & clean code --- backend/videoflix/content/signals.py | 2 -- backend/videoflix/content/tasks.py | 2 -- backend/videoflix/videoflix/settings.py | 6 ++---- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/backend/videoflix/content/signals.py b/backend/videoflix/content/signals.py index 623d407..b1458f7 100644 --- a/backend/videoflix/content/signals.py +++ b/backend/videoflix/content/signals.py @@ -2,9 +2,7 @@ from .models import Video from .tasks import convert_video_to_hls, create_thumbnails, delete_original_video from django.dispatch import receiver from django.db.models.signals import post_save, post_delete -from django.conf import settings import os -import django_rq import shutil @receiver(post_save, sender=Video) diff --git a/backend/videoflix/content/tasks.py b/backend/videoflix/content/tasks.py index 7ec0ed7..df7eeba 100644 --- a/backend/videoflix/content/tasks.py +++ b/backend/videoflix/content/tasks.py @@ -3,8 +3,6 @@ import subprocess import ffmpeg import os from django.conf import settings -from .models import Video -from django_rq import get_queue def convert_video_to_hls(source, resolution, model_id): target_dir = os.path.join(os.path.dirname(source), str(model_id)) diff --git a/backend/videoflix/videoflix/settings.py b/backend/videoflix/videoflix/settings.py index 0db2b7f..b65310e 100644 --- a/backend/videoflix/videoflix/settings.py +++ b/backend/videoflix/videoflix/settings.py @@ -37,15 +37,13 @@ DEFAULT_FROM_EMAIL = 'noreply@videoflix.com' ALLOWED_HOSTS = [ 'videoflix-django.andre-kempf.com', - '35.198.182.146', - '34.65.133.166', + '45.157.177.172', 'localhost', '127.0.0.1', ] CORS_ALLOWED_ORIGINS = [ - 'https://35.198.182.146', - 'https://34.65.133.166', + 'https://45.157.177.172', 'http://localhost:4200', 'https://videoflix.andre-kempf.com', ]