Auth1 Django의 사용자 모델을 적용수정하자. Django에서 제공하는 사용자모델로 회원가입 및 로그인을 간단하게 수정해보자. 1. 회원가입 시 사용자 중복방지 및 유저정보 생성 # user/views.py from django.contrib.auth import get_user_model #사용자가 있는지 검사하는 함수 def sign_up_view(request): if request.method == 'GET': return render(request, 'user/signup.html') elif request.method == 'POST': username = request.POST.get('username', None) password = request.POST.get('password', None) password2 = request.PO.. 2022. 5. 31. 이전 1 다음