From c2a91a4592b6e56d2e1d36ae9a9656f29efd1268 Mon Sep 17 00:00:00 2001 From: JongbeomLee623 Date: Sun, 6 Oct 2024 23:35:53 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20urls.py=20trailing=20?= =?UTF-8?q?slash=20=EC=88=98=EC=A0=95=20=EB=B0=8F=20accounts=20url=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- accounts/urls.py | 12 ++++++++---- waiting/urls.py | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/accounts/urls.py b/accounts/urls.py index a76cec5..8144824 100644 --- a/accounts/urls.py +++ b/accounts/urls.py @@ -1,14 +1,18 @@ from django.urls import path, include from .views import * +from dj_rest_auth.views import LoginView, LogoutView app_name = 'accounts' urlpatterns = [ # 일반 로그인 / 회원가입 - path('dj-rest-auth/', include('dj_rest_auth.urls')), - path('dj-rest-auth/registration/', include('dj_rest_auth.registration.urls')), - path('allauth/', include('allauth.urls')), + path('accounts/login', LoginView.as_view(), name='login'), + path('accounts/logout', LogoutView.as_view(), name='logout'), + path('accounts/registration', include('dj_rest_auth.registration.urls')), + # path('dj-rest-auth/', include('dj_rest_auth.urls')), + # path('dj-rest-auth/registration/', include('dj_rest_auth.registration.urls')), + # path('allauth/', include('allauth.urls')), # 회원 탈퇴 - path('accounts/withdraw/', WithdrawUserView.as_view(), name='withdraw'), + path('accounts/withdraw', WithdrawUserView.as_view(), name='withdraw'), ] \ No newline at end of file diff --git a/waiting/urls.py b/waiting/urls.py index 78f9141..722cb15 100644 --- a/waiting/urls.py +++ b/waiting/urls.py @@ -2,7 +2,7 @@ from rest_framework.routers import DefaultRouter from .views import WaitingViewSet -router = DefaultRouter() +router = DefaultRouter(trailing_slash=False) router.register(r'waitings', WaitingViewSet, basename='waiting') urlpatterns = [ From 0358adc70865d76e9019954a23b5a3c547a36b03 Mon Sep 17 00:00:00 2001 From: JongbeomLee623 Date: Sun, 6 Oct 2024 23:36:16 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20manager/waitings=20se?= =?UTF-8?q?rializer=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/serializers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manager/serializers.py b/manager/serializers.py index a6d5c25..137f766 100644 --- a/manager/serializers.py +++ b/manager/serializers.py @@ -20,15 +20,15 @@ class BoothWaitingSerializer(serializers.ModelSerializer): class Meta: model = Waiting fields = [ - 'id', 'user', 'party_size', 'waiting_status', 'ready_to_confirm_at', + 'id', 'user', 'party_size', 'waiting_status', 'registered_at','ready_to_confirm_at', 'confirmed_at', 'canceled_at', 'confirm_due_time', 'arrival_due_time' ] # 사용자 정보 반환 (이름과 전화번호) def get_user(self, obj): return { - # "phone_number": obj.user.phone_number, - "name": obj.user.username + "phone_number": obj.user.phone_number, + "name": obj.user.name } # 3분 더한 시간 반환 From 0ea4c846f54b7be4dfa24a52ffe2a4da5e305695 Mon Sep 17 00:00:00 2001 From: JongbeomLee623 Date: Sun, 6 Oct 2024 23:40:36 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E2=9E=95=20Add:=20Cors=20whitelist=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linenow/settings.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linenow/settings.py b/linenow/settings.py index 867d5fa..fb986f5 100644 --- a/linenow/settings.py +++ b/linenow/settings.py @@ -239,6 +239,10 @@ # 백엔드 도메인 또는 IP주소 'https://211.188.52.202', 'https://linenow.xyz' + 'http://linenow-manager.co.kr', + 'https://linenow-manager.co.kr', + 'http://linenow.co.kr', + 'https://linenow.co.kr' ] # Celery 관련 설정