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
|
MarkupSafe==2.1.5
|
||||||
numpy==2.0.1
|
numpy==2.0.1
|
||||||
packaging==24.1
|
packaging==24.1
|
||||||
pillow==10.4.0
|
|
||||||
psutil==6.0.0
|
psutil==6.0.0
|
||||||
psycopg2-binary==2.9.9
|
psycopg2-binary==2.9.9
|
||||||
pubcontrol==3.5.0
|
pubcontrol==3.5.0
|
||||||
|
|
@ -32,4 +31,5 @@ setuptools==72.1.0
|
||||||
six==1.16.0
|
six==1.16.0
|
||||||
sqlparse==0.5.1
|
sqlparse==0.5.1
|
||||||
tablib==3.5.0
|
tablib==3.5.0
|
||||||
urllib3==2.2.2
|
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.views import APIView
|
||||||
from rest_framework.response import Response
|
from rest_framework.response import Response
|
||||||
from rest_framework import status, authentication
|
from rest_framework import status, authentication
|
||||||
|
|
@ -64,8 +65,8 @@ class RegisterView(APIView):
|
||||||
message = EmailMultiAlternatives(
|
message = EmailMultiAlternatives(
|
||||||
subject='Confirm your email',
|
subject='Confirm your email',
|
||||||
body=strip_tags(html_body), # Plain text fallback
|
body=strip_tags(html_body), # Plain text fallback
|
||||||
from_email='noreply@videoflix.com',
|
from_email=settings.DEFAULT_FROM_EMAIL,
|
||||||
to=user.email
|
to=[user.email]
|
||||||
)
|
)
|
||||||
message.attach_alternative(html_body, "text/html")
|
message.attach_alternative(html_body, "text/html")
|
||||||
message.send(fail_silently=False)
|
message.send(fail_silently=False)
|
||||||
|
|
@ -115,8 +116,8 @@ class ForgotPasswordView(APIView):
|
||||||
message = EmailMultiAlternatives(
|
message = EmailMultiAlternatives(
|
||||||
subject='Reset your Password',
|
subject='Reset your Password',
|
||||||
body=strip_tags(html_body), # Plain text fallback
|
body=strip_tags(html_body), # Plain text fallback
|
||||||
from_email='noreply@videoflix.com',
|
from_email=settings.DEFAULT_FROM_EMAIL,
|
||||||
to=user.email
|
to=[user.email]
|
||||||
)
|
)
|
||||||
message.attach_alternative(html_body, "text/html")
|
message.attach_alternative(html_body, "text/html")
|
||||||
message.send(fail_silently=False)
|
message.send(fail_silently=False)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import re
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import ffmpeg
|
import ffmpeg
|
||||||
import os
|
import os
|
||||||
|
|
@ -13,8 +13,7 @@ def convert_video_to_hls(source, resolution, model_id):
|
||||||
base_filename = os.path.basename(source).split(".")[0]
|
base_filename = os.path.basename(source).split(".")[0]
|
||||||
target = os.path.join(target_dir, f'{base_filename}_{resolution}p')
|
target = os.path.join(target_dir, f'{base_filename}_{resolution}p')
|
||||||
|
|
||||||
#ffmpeg_path = '/opt/homebrew/bin/ffmpeg'
|
ffmpeg_path = shutil.which("ffmpeg")
|
||||||
ffmpeg_path = '/usr/bin/ffmpeg'
|
|
||||||
cmd = [
|
cmd = [
|
||||||
ffmpeg_path,
|
ffmpeg_path,
|
||||||
'-i', source,
|
'-i', source,
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ EMAIL_PORT = 587
|
||||||
EMAIL_HOST_USER = 'andre.kempf.dev@gmail.com'
|
EMAIL_HOST_USER = 'andre.kempf.dev@gmail.com'
|
||||||
EMAIL_HOST_PASSWORD = 'oyxwawshudwytgud'
|
EMAIL_HOST_PASSWORD = 'oyxwawshudwytgud'
|
||||||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||||
|
DEFAULT_FROM_EMAIL = 'noreply@videoflix.com'
|
||||||
|
|
||||||
ALLOWED_HOSTS = [
|
ALLOWED_HOSTS = [
|
||||||
'videoflix-django.andre-kempf.com',
|
'videoflix-django.andre-kempf.com',
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
export const environment = {
|
export const environment = {
|
||||||
// Development
|
// Development
|
||||||
//baseUrl: 'http://127.0.0.1:8000',
|
// baseUrl: 'http://127.0.0.1:8000',
|
||||||
|
|
||||||
// Live
|
// Live
|
||||||
baseUrl: 'https://videoflix-django.andre-kempf.com',
|
baseUrl: 'https://videoflix-django.andre-kempf.com',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue