+
+
+
+ + +
Creative learning for all!
+Unstructured Studio
+301-4 Elsinore Path, Etobicoke, ON
+M8V 4G7, CANADA
+© 2023 All rights reserved.
+diff --git a/zubhub_backend/zubhub/creators/serializers.py b/zubhub_backend/zubhub/creators/serializers.py index 8d58e99e7..2b554d2e7 100644 --- a/zubhub_backend/zubhub/creators/serializers.py +++ b/zubhub_backend/zubhub/creators/serializers.py @@ -302,6 +302,10 @@ def validate_email(self, value): _('No account found with this email. Verify and try again.')) return value + def get_email_options(self): + return { + 'html_email_template_name': 'registration/password_reset_email.html' + } class CreatorGroupWithMembershipsSerializer(serializers.ModelSerializer): members = CreatorGroupMembershipSerializer(many=True) diff --git a/zubhub_backend/zubhub/creators/views.py b/zubhub_backend/zubhub/creators/views.py index 76c4df953..9754b3478 100644 --- a/zubhub_backend/zubhub/creators/views.py +++ b/zubhub_backend/zubhub/creators/views.py @@ -32,6 +32,7 @@ from projects.permissions import (SustainedRateThrottle, PostUserRateThrottle, GetUserRateThrottle, GetAnonRateThrottle, CustomUserRateThrottle) +from zubhub.tasks import send_follower_notification_email # from ..projects.models import Project from .models import Location, CreatorGroup, PhoneConfirmationHMAC, GroupInviteConfirmationHMAC, CreatorGroupMembership @@ -471,6 +472,14 @@ def get_object(self): Activitylog.Type.FOLLOW, f'/creators/{obj}' ) + context = { + "user": { + "username": self.request.user.username, + "avatar": self.request.user.avatar, + "pk": self.request.user.pk + } + } + send_follower_notification_email.delay(obj.email, context) self.request.user.save() return obj diff --git a/zubhub_backend/zubhub/projects/views.py b/zubhub_backend/zubhub/projects/views.py index 69ed4ce98..015398828 100644 --- a/zubhub_backend/zubhub/projects/views.py +++ b/zubhub_backend/zubhub/projects/views.py @@ -16,6 +16,7 @@ SustainedRateThrottle, PostUserRateThrottle, GetUserRateThrottle, CustomUserRateThrottle) from activitylog.models import Activitylog +from zubhub.tasks import send_comment_notification_email, send_bookmark_notification_email from .models import Project, Comment, StaffPick, Category, Tag, PublishingRule from creators.models import Creator from .utils import (ProjectSearchCriteria, project_changed, detect_mentions, @@ -410,6 +411,16 @@ def get_object(self): f'/projects/{obj.pk}' ) + context = { + "project": { + "title": obj.title, + "description": obj.description, + "pk": obj.pk, + "image": obj.images.first().image_url, + }, + "bookmarked_by": self.request.user.username, + } + send_bookmark_notification_email.delay(obj.creator.email, context) return obj else: @@ -507,6 +518,18 @@ def create(self, request, *args, **kwargs): f'/projects/{result.pk}' ) + context = { + "project": { + "title": result.title, + "description": result.description, + "pk": result.pk, + "image": result.images.first().image_url + }, + "comment": text, + "commented_by": creator_str, + } + send_comment_notification_email.delay(result.creator.email, context) + return Response(ProjectSerializer(result, context={ 'request': request }).data, diff --git a/zubhub_backend/zubhub/static/images/Facebook.png b/zubhub_backend/zubhub/static/images/Facebook.png new file mode 100644 index 000000000..adb34c5a5 Binary files /dev/null and b/zubhub_backend/zubhub/static/images/Facebook.png differ diff --git a/zubhub_backend/zubhub/static/images/Instagram.png b/zubhub_backend/zubhub/static/images/Instagram.png new file mode 100644 index 000000000..2e80756d5 Binary files /dev/null and b/zubhub_backend/zubhub/static/images/Instagram.png differ diff --git a/zubhub_backend/zubhub/static/images/Linkedin.png b/zubhub_backend/zubhub/static/images/Linkedin.png new file mode 100644 index 000000000..3fd252252 Binary files /dev/null and b/zubhub_backend/zubhub/static/images/Linkedin.png differ diff --git a/zubhub_backend/zubhub/static/images/Pie-Illustration.png b/zubhub_backend/zubhub/static/images/Pie-Illustration.png new file mode 100644 index 000000000..1024a455b Binary files /dev/null and b/zubhub_backend/zubhub/static/images/Pie-Illustration.png differ diff --git a/zubhub_backend/zubhub/static/images/Twitter.png b/zubhub_backend/zubhub/static/images/Twitter.png new file mode 100644 index 000000000..31da3a1e7 Binary files /dev/null and b/zubhub_backend/zubhub/static/images/Twitter.png differ diff --git a/zubhub_backend/zubhub/static/images/ZubHub-Logo.png b/zubhub_backend/zubhub/static/images/ZubHub-Logo.png new file mode 100644 index 000000000..eb3dd90c5 Binary files /dev/null and b/zubhub_backend/zubhub/static/images/ZubHub-Logo.png differ diff --git a/zubhub_backend/zubhub/static/images/studio-logo-dark.png b/zubhub_backend/zubhub/static/images/studio-logo-dark.png new file mode 100644 index 000000000..3497b8df1 Binary files /dev/null and b/zubhub_backend/zubhub/static/images/studio-logo-dark.png differ diff --git a/zubhub_backend/zubhub/templates/account/email/email_confirmation_message.html b/zubhub_backend/zubhub/templates/account/email/email_confirmation_message.html new file mode 100644 index 000000000..842982ab8 --- /dev/null +++ b/zubhub_backend/zubhub/templates/account/email/email_confirmation_message.html @@ -0,0 +1,30 @@ +{% extends "email/email_base.html" %} +{% load static %} +{% load default_template_tags %} + +{% block title %}Activate Your Account{% endblock %} + +{% block content %} +
Dear {{ user.username }}
+Welcome to ZubHub! We're thrilled to have you on board. To get started, we just need to confirm your email address. Please click on the button below to activate your account.
+ + + Activate your account + + +Please note that this link will expire in 30 minutes.
+If you didn’t try to sign-in or create an account on ZubHub, you can safely ignore this email.
+Congratulations! You’ve unlocked a new achievement and earned the prestigious {{ badge.name }} badge. 🌟
+{{ badge.message }} Click + + here + + to view more. +
+{% endblock %} \ No newline at end of file diff --git a/zubhub_backend/zubhub/templates/email/bookmark.html b/zubhub_backend/zubhub/templates/email/bookmark.html new file mode 100644 index 000000000..c71ca0723 --- /dev/null +++ b/zubhub_backend/zubhub/templates/email/bookmark.html @@ -0,0 +1,27 @@ +{% extends "email/email_base.html" %} +{% load static %} + +{% block title %}You've been bookmarked!{% endblock %} + +{% block content %} +Your post just got bookmarked. Your content is worth saving!
+ +{{ project.description|striptags }}
+{{ bookmarked_by }} have bookmarked your project.
+Join the conversation now and engage with your audience. Click + + here + + to view more. +
+Great news! Someone just left a comment on your post. 🎉
+ +{{ project.description|striptags }}
+{{ commented_by }} says "{{ comment }}"
+Join the conversation now and engage with your audience. Click + + here + + to view comment and respond. +
+
+
+
+
+ Creative learning for all!
+Unstructured Studio
+301-4 Elsinore Path, Etobicoke, ON
+M8V 4G7, CANADA
+© 2023 All rights reserved.
+You just gained a new follower! You’re becoming quite the celebrity.
+ +Dear {{ user.get_username }}
+You're receiving this email because you requested to change your Zubhub password. Tap the button below to reset your password.
+ + + Reset your password + + +Please note that this link will expire in 30 minutes.
+If you didn't request this email, there's nothing to worry about. You can safely ignore it.
+