본문 바로가기

Django13

Django Argon2 암호화 알고리즘 적용하기 Django는 기본적으로 PBKDF2 암호화 알고리즘을 제공하고 있다. 그러나 Django 공식 문서(https://docs.djangoproject.com/en/4.1/topics/auth/passwords/)의 Using Argon2 with Django 부분을 살펴보면, Argon2 is the winner of the 2015 Password Hashing Competition, a community organized open competition to select a next generation hashing algorithm. It’s designed not to be easier to compute on custom hardware than it is to compute on an ordin.. 2022. 12. 6.
Django 회원가입 기능 추가하기 ※ 이 포스트는 을 참고하여 작성하였습니다. 1. 회원가입 양식 폼 작성 # accounts/forms.py from django.contrib.auth.models import User from django import forms class RegisterForm(forms.ModelForm): password = forms.CharField(label='Password', widget=forms.PasswordInput) password2 = forms.CharField(label='Repeat Password', widget=forms.PasswordInput) class Meta: model = User fields = ['username', 'first_name', 'last_name', 'em.. 2022. 12. 1.
Django 로그인, 로그아웃 기능 추가하기 ※ 이 포스트는 을 참고하여 작성하였습니다. 1. 프로젝트에 accounts 앱 생성 $ python manage.py startapp accounts 2. config/settings.py에 앱 등록 # config/settings.py ... INSTALLED_APPS = [ "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", "fst", # 추가한 코드 "accounts", # 추가한 코드 끝 ] 3. base.html 위치 변경 기존의 프로젝트에서는 base.ht.. 2022. 12. 1.
postgreSQL 데이터 프론트에 띄우기 ※ 앞 포스팅 https://fotia.tistory.com/3 와 이어지는 내용이며, 프로젝트명 rcp -> fst 로 변경됨 프론트에서 조회, 추가, 수정, 삭제하는 기능들은 전부 클래스형 뷰를 사용하여 구현 클래스형 뷰 : 웹개발시 자주 사용되는 기능들을 모아놓은, 장고가 미리 준비해둔 뷰 조회, 추가, 수정, 삭제는 모두 뷰를 만들고, 뷰를 호출할 URL을 연결하고, 템플릿을 만드는 정형화된 순서를 따른다. 당장은 이게 무슨 소리인지 잘 몰라도 반복작업을 하다보면 대충 그럴듯한 웹페이지를 만드는 방법은 체득할 수 있다. 1. 프론트에서 조회 1) 뷰 만들기 프론트에서 조회가 가능하도록 하는 기능을 뷰(view)라고 하며, views.py에 만들어주는 것이 보편적 # fst/views.py from.. 2022. 12. 1.