root 폴더에 .env
, my_settings.py
파일 추가
.env
SECRET_KEY 추가
my_settings.py
DATABASES = {
"default": {
"ENGINE": "django.db.backends.mysql",
"NAME": "db_name",
"USER": "db_user",
"PASSWORD": "db_passwd",
"HOST": "server ip",
"PORT": "3306",
}
}
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python manage.py runserver
BASE_URL = “http://127.0.0.1:8000”
description | method | url | permission |
---|---|---|---|
회원가입 | POST |
/api/users/signup/ | AllowAny |
로그인 | POST |
/api/users/login/ | AllowAny |
로그아웃 | POST |
/api/users/logout/ | IsAuthenticated |
게시글 목록 조회 | GET |
/api/boards/list/ | AllowAny |
게시글 작성 | POST |
/api/boards/write/ | IsAuthenticated |
특정 게시글 조회 | GET |
/api/boards/detail/<board_id>/ | IsAuthenticated , IsAdminUser |
특정 게시글 수정 | PUT |
/api/boards/detail/<board_id>/ | IsAuthenticated |
특정 게시글 삭제 | DELETE |
/api/boards/detail/<board_id>/ | IsAuthenticated |
<board_id> = int:pk
<a href="https://i.ibb.co/F02DFXF/2023-08-15-7-00-01.png"><img src="https://i.ibb.co/F02DFXF/2023-08-15-7-00-01.png" width="1500px" alt="Wanted" border="0"></a>
<a href="https://ssu-uky.store/api/users/signup/"> 회원가입(SignUpView)</a> <br> {"email":"[email protected]","password":"wanted123"}