inflearn logo
Course

Course

Instructor

eastlightd903699's Posts

eastlightd903699 eastlightd903699

@eastlightd903699

Reviews Written
20
Average Rating
4.5

Posts 15

Q&A

updateform, A user with that username already exists. 에러

저도 같은 문제로 찾아봤어요(+chatgpt활용) views.py # (3)수정뷰 class AccountUpdateView(UpdateView): #해당 CBV를 통해 활용할 모델객체 파라미터 model = User #User 로 모델 지정 #기존 django 제공 UserCreationForm을 리팩토리한 forms.py에서 정의한 AccountUpdatedForm 활용 form_class = AccountUpdateForm #해당 CBV를 통해 반환활 페이지 success_url = reverse_lazy("accountapp:hello_world") # 해당 CBV를 통해 볼 페이지 template_name = "accountapp/update.html" def get_success_url(self): return reverse("accountapp:detail", kwargs={'pk': self.object.pk}) forms.py from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User # UserCreationForm 상속 및 재활용 class AccountUpdateForm(UserCreationForm): class Meta: model = User fields = ['username', 'password1', 'password2'] def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # UserCreationForm 필드 중 username 필드는 수정 못 하도록 잠금 self.fields["username"].disabled = True def clean_username(self): # 현재 사용자명은 이미 존재하는 것으로 간주 return self.instance.username 해결이용!

Likes
3
Comments
3
Viewcount
1581

Q&A

Rag 모델

음 그렇다면 csv 나 데이터프레임형태의 데이터를 pdf로 내부코드에서 변환하고 이를 split해서 벡터스토어 저장 등의 프로세스로 진행해도 같은 결과일까요??

Likes
0
Comments
2
Viewcount
516

Q&A

가상환경이 보이질않아요

해결했습니다 감사합니다 ㅜㅜ 환경변수를 잘못입력했나봐요ㅜㅜ

Likes
0
Comments
4
Viewcount
519

Q&A

추가질문 환경세팅)

socket closed라는 문구도 떴어요ㅜ

Likes
0
Comments
3
Viewcount
373

Q&A

멜론 : response406

아 강사님 헤더값을 조정하니 접속되었고 값도 끌어집니다. 강사님 강의 참고하여서 헤더값조정했어요. 감사합니다.

Likes
0
Comments
2
Viewcount
349