Skip to content
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

Database #77

Merged
merged 16 commits into from
Jul 31, 2024
Merged

Database #77

merged 16 commits into from
Jul 31, 2024

Conversation

NohSungwoo
Copy link
Collaborator

분리된 환경 통합

@@ -143,7 +143,7 @@

# 국제화 설정
LANGUAGE_CODE = "en-us"
TIME_ZONE = "UTC"
TIME_ZONE = "Asia/Seoul"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

배포용으로 바꾸신거죠?

}
}

SOCIALACCOUNT_LOGIN_ON_GET = True
LOGIN_REDIRECT_URL = "https://d3hcv7ngm54uy8.cloudfront.net/oauth-callback"
ACCOUNT_LOGOUT_REDIRECT_URL = "https://d3hcv7ngm54uy8.cloudfront.net/landing"
LOGIN_REDIRECT_URL = "/oauth-callback/"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

클라우드 프론드 대신에 엔드포인트 추가

@@ -2,17 +2,17 @@
from django.urls import include, path

urlpatterns = [
path("admin/", admin.site.urls),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

엔드포인트 앞에 api 명시해서 우선순위 구분


except DatabaseError as e:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

예외처리..?

path(
"todos/<int:pk>/undone/", TodoMarkUndoneView.as_view(), name="todo-mark-undone"
),
path("<int:id>/update/", TodoUpdateView.as_view()),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아이디 추가

def get_queryset(self):
return super().get_queryset().filter(user=self.request.user)

def perform_update(self, serializer):
date_str = self.request.data.get("date")
try:
date = datetime.strptime(date_str, "%Y-%m-%d").date()
# datetime 객체 생성 (시간은 00:00:00으로 설정)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

시간설정

serializer.save(user=request.user) # request.user 사용
return Response(serializer.data, status=status.HTTP_201_CREATED)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
def post(self, request):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

post내용에 스택 아이디 추가

@youngkwangjoo youngkwangjoo merged commit 58d6645 into develop Jul 31, 2024
1 check failed
@youngkwangjoo youngkwangjoo deleted the database branch July 31, 2024 06:42
youngkwangjoo added a commit that referenced this pull request Aug 1, 2024
@dayeonkimm dayeonkimm restored the database branch August 3, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants