diff --git a/backend/requirements.txt b/backend/requirements.txt index b3cd4e6..0fb098d 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -24,6 +24,7 @@ psutil==6.0.0 psycopg2-binary==2.9.9 pubcontrol==3.5.0 PyJWT==2.9.0 +python-decouple==3.8 redis==5.0.8 requests==2.32.3 rq==1.16.2 diff --git a/backend/videoflix/videoflix/settings.py b/backend/videoflix/videoflix/settings.py index b65310e..3f48c24 100644 --- a/backend/videoflix/videoflix/settings.py +++ b/backend/videoflix/videoflix/settings.py @@ -12,6 +12,7 @@ https://docs.djangoproject.com/en/5.0/ref/settings/ import os from pathlib import Path +from decouple import config # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -30,8 +31,8 @@ DEBUG = True EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587 -EMAIL_HOST_USER = 'andre.kempf.dev@gmail.com' -EMAIL_HOST_PASSWORD = 'oyxwawshudwytgud' +EMAIL_HOST_USER = config('EMAIL_HOST_USER', default='') +EMAIL_HOST_PASSWORD = config('EMAIL_HOST_PASSWORD', default='') EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' DEFAULT_FROM_EMAIL = 'noreply@videoflix.com' diff --git a/frontend/README.md b/frontend/README.md index b5e5c40..09d13d2 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,27 +1,16 @@ -# Frontend +# Backend -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.2.1. +To set the mail configuration for the backend, you must create an `.env` file in the root directory of your project. This file should have the following content: -## Development server +## Step 1: Creating the `.env` file -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. +Create a file named `.env` in the root directory of the project. -## Code scaffolding +## Step 2: Add the e-mail configuration -Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. +Open the `.env` file and add the following lines: -## Build - -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. - -## Running unit tests - -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). - -## Running end-to-end tests - -Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. - -## Further help - -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. +```env +EMAIL_HOST_USER=example@gmail.com +EMAIL_HOST_PASSWORD=password +``` diff --git a/frontend/src/app/components/home/browse/upload-movie/upload-movie.component.html b/frontend/src/app/components/home/browse/upload-movie/upload-movie.component.html index 104057a..b6c8cd0 100644 --- a/frontend/src/app/components/home/browse/upload-movie/upload-movie.component.html +++ b/frontend/src/app/components/home/browse/upload-movie/upload-movie.component.html @@ -75,9 +75,12 @@ name="videoFile" placeholder="Video file" (change)="onFileChange($event)" + accept="video/*" required /> -
+{{ errorMsgFileSize }}
+