From a2faa8c92307e7e4126266b78ed9ec0e226a8257 Mon Sep 17 00:00:00 2001 From: rishi2019194 <58341663+rishi2019194@users.noreply.github.com> Date: Sat, 14 Oct 2023 20:26:58 -0400 Subject: [PATCH] refactoring code --- Code/recommenderapp/utils.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Code/recommenderapp/utils.py b/Code/recommenderapp/utils.py index 4d237e27c..d0621cd22 100644 --- a/Code/recommenderapp/utils.py +++ b/Code/recommenderapp/utils.py @@ -41,7 +41,6 @@ def create_colored_tags(genres): tag = f'{genre}' tags.append(tag) - return ' '.join(tags) def beautify_feedback_data(data): @@ -101,11 +100,14 @@ def send_email_to_user(recipient_email, categorized_data): # Create the email message with HTML content html_content = c.EMAIL_HTML_CONTENT.format( - '\n'.join(f'
  • {movie} {create_colored_tags(movie_to_genres.get(movie, ["Unknown Genre"]))}

  • ' \ + '\n'.join(f'
  • {movie} {create_colored_tags(\ + movie_to_genres.get(movie, ["Unknown Genre"]))}

  • ' \ for movie in categorized_data['Liked']), - '\n'.join(f'
  • {movie} {create_colored_tags(movie_to_genres.get(movie, ["Unknown Genre"]))}

  • ' \ + '\n'.join(f'
  • {movie} {create_colored_tags(\ + movie_to_genres.get(movie, ["Unknown Genre"]))}

  • ' \ for movie in categorized_data['Disliked']), - '\n'.join(f'
  • {movie} {create_colored_tags(movie_to_genres.get(movie, ["Unknown Genre"]))}

  • ' \ + '\n'.join(f'
  • {movie} {create_colored_tags(\ + movie_to_genres.get(movie, ["Unknown Genre"]))}

  • ' \ for movie in categorized_data['Yet to Watch']))