Python/Django
-
-
-
[Django] string 혹은 bytes 를 content file로 managing 해주자Python/Django 2021. 12. 18. 14:31
https://docs.djangoproject.com/en/4.0/ref/files/file/ The File object | Django documentation | Django Django The web framework for perfectionists with deadlines. Overview Download Documentation News Community Code Issues About ♥ Donate docs.djangoproject.com
-
[Python] IntegrityError: NOT NULL constraint failed: users_user.usernamePython/Django 2021. 12. 18. 00:12
if username is not None: name = profile_json.get("name", None) # 이부분 email = profile_json.get("email", None) bio = profile_json.get("bio", None) try: user = users_models.User.objects.get(email=email) if user.login_method != users_models.User.LOGIN_GITHUB: raise GithubException() except users_models.User.DoesNotExist: user = users_models.User.objects.create( email=email, first_name=name, # 이부분 us..
-
[Python] Django 비밀번호 암호화해서 저장하기 set_passwordPython/Django 2021. 12. 16. 18:24
# user.forms.SignUpForm def save(self, commit): username = self.cleaned_data.get("email") password = self.cleaned_data.get("password") user = super().save(commit=False) user.username = username user.set_password(password) user.save() https://docs.djangoproject.com/en/4.0/ref/contrib/auth/ django.contrib.auth | Django documentation | Django Django The web framework for perfectionists with deadlin..
-
[Python] Django FormView 와 View를 상속받아 로그인 로그아웃 구현하기Python/Django 2021. 12. 16. 17:37
https://fenderist.tistory.com/376 [python, django] 장고에서 제공(FormView 등)으로 로그인, 로그아웃 인증처리 [python, django] 장고에서 제공(FormView 등)으로 로그인, 로그아웃 인증처리 Django 에서 제공해주는 기능으로 정말 간단하게 인증처리가 가능 방법 1. View를 통해서 get/post 방식으로 할수 있고 2. FormView. fenderist.tistory.com