clean code
This commit is contained in:
parent
1d192e35e1
commit
9465ba7f18
5 changed files with 11 additions and 10 deletions
|
|
@ -20,7 +20,6 @@ imageio-ffmpeg==0.5.1
|
|||
MarkupSafe==2.1.5
|
||||
numpy==2.0.1
|
||||
packaging==24.1
|
||||
pillow==10.4.0
|
||||
psutil==6.0.0
|
||||
psycopg2-binary==2.9.9
|
||||
pubcontrol==3.5.0
|
||||
|
|
@ -33,3 +32,4 @@ six==1.16.0
|
|||
sqlparse==0.5.1
|
||||
tablib==3.5.0
|
||||
urllib3==2.2.2
|
||||
Werkzeug==3.0.3
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
from django.conf import settings
|
||||
from rest_framework.views import APIView
|
||||
from rest_framework.response import Response
|
||||
from rest_framework import status, authentication
|
||||
|
|
@ -64,8 +65,8 @@ class RegisterView(APIView):
|
|||
message = EmailMultiAlternatives(
|
||||
subject='Confirm your email',
|
||||
body=strip_tags(html_body), # Plain text fallback
|
||||
from_email='noreply@videoflix.com',
|
||||
to=user.email
|
||||
from_email=settings.DEFAULT_FROM_EMAIL,
|
||||
to=[user.email]
|
||||
)
|
||||
message.attach_alternative(html_body, "text/html")
|
||||
message.send(fail_silently=False)
|
||||
|
|
@ -115,8 +116,8 @@ class ForgotPasswordView(APIView):
|
|||
message = EmailMultiAlternatives(
|
||||
subject='Reset your Password',
|
||||
body=strip_tags(html_body), # Plain text fallback
|
||||
from_email='noreply@videoflix.com',
|
||||
to=user.email
|
||||
from_email=settings.DEFAULT_FROM_EMAIL,
|
||||
to=[user.email]
|
||||
)
|
||||
message.attach_alternative(html_body, "text/html")
|
||||
message.send(fail_silently=False)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import ffmpeg
|
||||
import os
|
||||
|
|
@ -13,8 +13,7 @@ def convert_video_to_hls(source, resolution, model_id):
|
|||
base_filename = os.path.basename(source).split(".")[0]
|
||||
target = os.path.join(target_dir, f'{base_filename}_{resolution}p')
|
||||
|
||||
#ffmpeg_path = '/opt/homebrew/bin/ffmpeg'
|
||||
ffmpeg_path = '/usr/bin/ffmpeg'
|
||||
ffmpeg_path = shutil.which("ffmpeg")
|
||||
cmd = [
|
||||
ffmpeg_path,
|
||||
'-i', source,
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ EMAIL_PORT = 587
|
|||
EMAIL_HOST_USER = 'andre.kempf.dev@gmail.com'
|
||||
EMAIL_HOST_PASSWORD = 'oyxwawshudwytgud'
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||
DEFAULT_FROM_EMAIL = 'noreply@videoflix.com'
|
||||
|
||||
ALLOWED_HOSTS = [
|
||||
'videoflix-django.andre-kempf.com',
|
||||
|
|
|
|||
Loading…
Reference in a new issue