Skip to content

Commit

Permalink
Feat: front 고객센터, 마이페이지 기능 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
KSAhh committed Nov 26, 2024
2 parents fff224c + 4a23b77 commit d14ced2
Show file tree
Hide file tree
Showing 17 changed files with 140 additions and 228 deletions.
2 changes: 1 addition & 1 deletion back/accounts/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.2.16 on 2024-11-25 10:57
# Generated by Django 4.2.16 on 2024-11-26 16:30

from django.conf import settings
import django.contrib.auth.models
Expand Down
5 changes: 3 additions & 2 deletions back/accounts/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from dj_rest_auth.serializers import UserDetailsSerializer
from dj_rest_auth.registration.serializers import RegisterSerializer

from django.contrib.auth import get_user_model
from django.contrib.auth.hashers import make_password
from .models import UserProfile
Expand Down Expand Up @@ -51,7 +52,7 @@ class Meta:
extra_fields.append('profile_image')
model = UserModel
fields = ('pk', *extra_fields)
read_only_fields = ('email',)
read_only_fields = ('email', 'date_joined')

# 회원정보 수정용
class UpdateUserSerializer(serializers.ModelSerializer):
Expand All @@ -74,4 +75,4 @@ class UserProfileSerializer(serializers.ModelSerializer):
class Meta:
model = UserProfile
fields = "__all__"
read_only_fields = ["user"]
read_only_fields = ["user"]
3 changes: 2 additions & 1 deletion back/accounts/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
from .views import KakaoLogin, DeleteUserView, UpdateUserView
from . import views

app_name = "accounts"

app_name = 'accounts'

urlpatterns = [
path("signup/", include("dj_rest_auth.registration.urls")), # 일반 회원가입
Expand Down
1 change: 1 addition & 0 deletions back/accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
User = get_user_model()


# 유저탈퇴
class DeleteUserView(APIView):
permission_classes = [IsAuthenticated]

Expand Down
5 changes: 2 additions & 3 deletions back/algofipo_pjt/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,9 @@

# REST-AUTH registration 기본 Serializer
REST_AUTH = {
'REGISTER_SERIALIZER': 'accounts.serializers.CustomRegisterSerializer',
'USER_DETAILS_SERIALIZER': 'accounts.serializers.CustomUserDetailsSerializer',
'REGISTER_SERIALIZER' : 'accounts.serializers.CustomRegisterSerializer',
'USER_DETAILS_SERIALIZER' : 'accounts.serializers.CustomUserDetailsSerializer',
}

ACCOUNT_ADAPTER = 'accounts.models.CustomAccountAdapter'

# Django Allauth
Expand Down
2 changes: 1 addition & 1 deletion back/articles/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.2.16 on 2024-11-20 00:53
# Generated by Django 4.2.16 on 2024-11-26 16:30

from django.conf import settings
from django.db import migrations, models
Expand Down
Loading

0 comments on commit d14ced2

Please sign in to comment.