Skip to content

Commit

Permalink
Merge pull request #130 from cau-likelion-org/refactoring
Browse files Browse the repository at this point in the history
Refactoring
  • Loading branch information
hayeongKo authored Mar 2, 2024
2 parents c3dce71 + a4bee9c commit 96ab215
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions accounts/templates/accounts/mail_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
"
>
<div style="text-align: center; width: 100%; max-width: 100%">
<img
<!-- <img
style="width: 100%; height: 300px; overflow: clip"
alt="header"
src="https://s3.ap-northeast-2.amazonaws.com/img.stibee.com/11863_list_126266_subscriptions_header_image.png?v=1624414986"
/>
/> -->
</div>
<div style="text-align: center; line-height: 2">
<h1>계정 인증 안내</h1>
Expand Down
7 changes: 4 additions & 3 deletions attendances/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def post(self, request):

date = request.data['date']
password = request.data['password']

attendances = Attendance.objects.all()

for attendance in attendances:
if str(attendance.date) == date:
return Response(data={
Expand All @@ -41,6 +41,7 @@ def post(self, request):
date = date,
password = password
)

new_attendance.save()

attendance_json = {
Expand All @@ -49,7 +50,7 @@ def post(self, request):
}

# user별 출석부 create
users = User.objects.filter(generation=11, is_admin=False)
users = User.objects.filter(generation=12, is_admin=False)

for user in users:
new_user_attendance = UserAttendance.objects.create(
Expand Down Expand Up @@ -89,7 +90,7 @@ def get(self, request):
"message" : "운영진 입니다."
}, status=status.HTTP_405_METHOD_NOT_ALLOWED)
else:
if user.generation == 11:
if user.generation == 12:
user_attendance = UserAttendance.objects.get(user=user, attendance=attendance)
user_attendance_json = {
"name" : user.name,
Expand Down

0 comments on commit 96ab215

Please sign in to comment.