-
Notifications
You must be signed in to change notification settings - Fork 1
[25.10.04 / TASK-250] Feature - 주간 뉴스레터 수신거부 기능 추가 #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ooheunda
wants to merge
8
commits into
main
Choose a base branch
from
feature/newsletter-unsubscription
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0fe8457
feature: User 모델에 newsletter_subscribed 컬럼 추가
ooheunda ed6c834
feature: 메일을 구독한 사용자만 분석/발송하도록 수정
ooheunda 0ecfe5c
feature: 템플릿에 수신 거부 추가 및 렌더링시 적용
ooheunda 01e6fd4
test: 템플릿 렌더링 테스트 수정
ooheunda b91ebc9
fix: 까먹은 주석 해제
ooheunda 193a8fb
fix: 지난 핫픽스 관련 테스트 수정
ooheunda aaab5bc
fix: 템플릿 스타일 및 어드민 약간 수정
ooheunda dcc7e1c
fix: 주석추가
ooheunda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,7 @@ def user(db): | |
email="[email protected]", | ||
username="test_user", | ||
is_active=True, | ||
newsletter_subscribed=True, | ||
) | ||
|
||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,29 +134,30 @@ | |
{{weekly_trend_html}} | ||
{% endif %} | ||
|
||
<h2 | ||
style=" | ||
box-sizing: border-box; | ||
margin-bottom: 24px; | ||
color: #000000; | ||
font-size: 24px; | ||
font-weight: 900; | ||
letter-spacing: 0; | ||
" | ||
> | ||
{% if user.username %} | ||
{{user.username}}님의 활동 리포트 | ||
{% else %} | ||
활동 리포트 | ||
{% endif %} | ||
</h2> | ||
|
||
Comment on lines
137
to
153
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이 부분은 제 기억상 코드를 중첩해서 작성해뒀던걸로 기억하고 있는데, 그걸 정리하려고 이렇게 바꾸신걸까요? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 넵 맞습니다! |
||
{% if not is_expired_token_user and user_weekly_trend_html %} | ||
{{user_weekly_trend_html}} | ||
{% endif %} | ||
|
||
{% if is_expired_token_user %} | ||
<!-- Token Expired Warning --> | ||
<div style="margin-bottom: 40px; box-sizing: border-box"> | ||
<h2 | ||
style=" | ||
font-size: 24px; | ||
font-weight: 900; | ||
color: #000000; | ||
margin-bottom: 20px; | ||
letter-spacing: 0; | ||
box-sizing: border-box; | ||
" | ||
> | ||
{% if user.username %} | ||
{{user.username}}님의 활동 리포트 | ||
{% else %} | ||
활동 리포트 | ||
{% endif %} | ||
</h2> | ||
<div | ||
style=" | ||
background-color: #fffbd7; | ||
|
@@ -311,6 +312,20 @@ | |
> | ||
개인정보처리방침 | ||
</a> | ||
| | ||
<a | ||
href="https://velog-dashboard.kro.kr/api/user/newsletter-unsubscribe?email={{user.email}}" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
style=" | ||
color: #4d4d4d; | ||
text-decoration: underline; | ||
box-sizing: border-box; | ||
display: inline-block; | ||
" | ||
> | ||
수신 거부 | ||
</a> | ||
</p> | ||
</td> | ||
</tr> | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 5.1.6 on 2025-10-01 17:57 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("users", "0013_user_thumbnail"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="user", | ||
name="newsletter_subscribed", | ||
field=models.BooleanField( | ||
default=True, verbose_name="뉴스레터 구독 여부" | ||
), | ||
), | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
개인적으로 궁금해서 님기는 코멘트이니 편하게 답변 부탁드려요!!
해당 부분이 user_weekly_trend.html에서 index.html로 이동한 이유가 궁금합니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
지난번에 템플릿 수정이후로 저게 중복되어서 들어가 있더라고요. (index.html 에도, user_weekly_trend.html 에도)
그래서 하나를 삭제해야 했는데, 유저 개인 트렌드가 없어도 토큰만료 박스는 활동 리포트 하단에 있는게 나을 거라고 판단해서 index.html 위치에 있는 것을 살렸습니다!