yyh3690
@yyh36902419
Reviews Written
3
Average Rating
5.0
Posts
Q&A
AttributeError ๊ด๋ จ ์ง๋ฌธ๋๋ฆฝ๋๋ค.
๊ฐ์ฌ๋ , ๋ต๋ณ ๊ฐ์ฌํฉ๋๋ค. backend/settings/common.py์์ rest framework_simplejwt ๋ฅผ ์ฌ์ฉํ์ฌ ๊ตฌํํ์ฌ ์งํํ์ต๋๋ค. ์ฒ์์๋ default_authentication_classes์ rest_framework_simplejwt.authentication.JWTAuthentication์ผ๋ก๋ง ์งํํ์๊ณ , ๊ฐ์ฌ๋ ๋ต๋ณ ์ดํ์ sessionAuthentication๊ณผ permissions_Class๋ฅผ ์๋์ ๊ฐ์ด ์ถ๊ฐํ์ต๋๋ค. (์ฌ์ง) ๊ทธ๋ฆฌ๊ณ frontend/src/components/PostList.js์์ headers๊ฐ ์ธ์ฆ๋ฐ๋๋ก ๊ตฌํํ์ต๋๋ค. (์ฌ์ง) ๊ทธ๋ฌ๋๋ ์ด๋ฒ์๋ 401 unauthorized error ๊ฐ ๋ฐ์ํ์ต๋๋ค. (์ฌ์ง) ๋งจ ์ฒ์ ์์ ํ๋ setiings์ permission์ ์์ ๋ฉด ๋ค์ 500 error์ AnonymusUser error๊ฐ ๋ฐ์ํฉ๋๋ค.
- 0
- 2
- 465
Q&A
django-pydenticon์ import ํ์ ๋, attributeError๊ฐ ๋ฐ์ํด ์ง๋ฌธ๋๋ฆฝ๋๋ค.
๊ฐ์ฌ๋ ์ ๋ฌธ์ ์ ๋ณ๊ฐ๋ก ๋๋ค๋ฅธ ์ง๋ฌธ์ด ์๊ฒจ ๋ต๊ธ๋ก ์ง๋ฌธ๋๋ฆฝ๋๋ค. profile_edit ๋ฅผ ๊ตฌ์ฑํ๋ ์ค phone_number๋ฅผ ์ ๋ ฅํ ๋ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค. ๋จผ์ models.py์์ phone_number๋ฅผ ์์ฑํ ํ๋ฉด์ ๋๋ค. (์ฌ์ง) ์๋๋ phone_number์ ๋ํ ๋ฌธ์ ํ๋ฉด์ ๋๋ค. (์ฌ์ง)
- 0
- 2
- 387




