Giter VIP home page Giter VIP logo

blog's Introduction

개발 및 배포 환경

개발

  • Python 3.10.10
  • Django 5.0.2
  • Django RESTFramework 3.14.0

배포

  • AWS EC2
  • AWS RDS(Postgresql)
  • gunicorn 21.2.0
  • nginx 1.18.0


API

Accounts

Signup

POST http://43.201.183.161/accounts/signup/

  • Request Body
{
    "username": "first_user",
    "email": "[email protected]",
    "password": "first_user1234",
    "password_check": "first_user1234"
}

Signin

POST http://43.201.183.161/accounts/signin/

  • Request Body
{
    "username": "seconduser",
    "password": "seconduser"
}

Signout

POST http://43.201.183.161/accounts/signout/

  • Request Header
Authorization Token b8be3ea67513bd21203af5e3cd147e6dada27b06

Posts

List Posts

GET http://43.201.183.161/posts/

Create Post

POST http://43.201.183.161/posts/

  • Request Header
Authorization Token b8be3ea67513bd21203af5e3cd147e6dada27b06
  • Request Body
{
    "title": "sixth title",
    "description": "sixth description",
    "tags": ["tag1", "tag2"]
}

Retrieve Post

GET http://43.201.183.161/posts/pk(int)/

Update Post

PUT http://43.201.183.161/posts/pk(int)/

  • Request Header
Authorization Token b8be3ea67513bd21203af5e3cd147e6dada27b06
  • Request Body
{
    "title": "sixth title",
    "description": "sixth description - changed",
    "tags": ["tag1", "tag2"]
}

Partial Update Post

PATCH http://43.201.183.161/posts/pk(int)/

  • Request Header
Authorization Token b8be3ea67513bd21203af5e3cd147e6dada27b06
  • Request Body
{
    "description": "sixth description - changed twice"
}

Delete Post

DELETE http://43.201.183.161/posts/pk(int)/

  • Request Headers
Authorization Token b8be3ea67513bd21203af5e3cd147e6dada27b06

Comments

List Comments

GET http://43.201.183.161/comments/posts/post_id(int)/

Create Comment

POST http://43.201.183.161/comments/posts/post_id(int)/

  • Request Headers
Authorization Token b8be3ea67513bd21203af5e3cd147e6dada27b06
  • Request Body
{
    "content": "third comment",
    "tags": ["태그"]
}

Update Comment

PUT http://43.201.183.161/comments/pk(int)/

  • Request Headers
Authorization Token b8be3ea67513bd21203af5e3cd147e6dada27b06
  • Request Body
{
    "content": "third comment - changed",
    "tags": ["태그"]
}

Partial Update Comment

PATCH http://43.201.183.161/comments/pk(int)/

  • Request Headers
Authorization Token b8be3ea67513bd21203af5e3cd147e6dada27b06
  • Request Body
{
    "content": "third comment - changed twice"
}

Delete Comment

DELETE http://43.201.183.161/comments/pk(int)/

  • Request Headers
Authorization Token b8be3ea67513bd21203af5e3cd147e6dada27b06

Tags

List Posts by Tag

GET http://43.201.183.161/tags/pk(str)/posts/

List Comments by Tag

GET http://43.201.183.161/tags/pk(str)/posts/



추가로 고민할 부분

  1. 태그 생성 및 삭제 로직 재고
  2. 쿼리 최적화
  3. django app 분리 기준
  4. SerializerMethodField()와 @property
  5. DRF TokenAuthentication → JWT
  6. 로직을 어떻게 분리하고 어디에서 담당할 것인가

blog's People

Contributors

bdlhj avatar

Stargazers

narayo9 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.