본문 바로가기 메뉴 바로가기

AI Platform / Web

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

AI Platform / Web

검색하기 폼
  • 분류 전체보기 (374)
    • 알고리즘 (56)
      • 알고리즘 종류 (20)
      • 백준 (1)
      • sw (30)
    • Web (206)
      • HTML (10)
      • CSS (6)
      • Bootstrap (2)
      • Django (63)
      • JAVASCRIPT (22)
      • typescript (2)
      • Vue.js (10)
      • SQL (2)
      • git (2)
      • 프로젝트구현 (21)
      • React (42)
      • php (2)
      • nodejs (3)
      • nextjs (12)
    • Database (0)
      • MongoDB (0)
    • 빅데이터 (8)
    • 인공지능(Artificial Intelligenc.. (64)
      • python (23)
      • 자연어 처리(natural language pro.. (16)
      • Linear algebra (1)
      • Algorithm (2)
      • Tensorflow (8)
      • speech recongnition (0)
      • 머신러닝 (4)
      • 딥러닝(Deep Learning) (2)
      • CNN (4)
      • RNN (1)
    • 데이터분석 (9)
    • Platform (12)
      • spring boot (9)
    • 라즈베리파이 (5)
    • github (1)
    • 오픈소스 (1)
  • 방명록

역참조 (1)
[Django]데이터베이스관리(N:M)_좋아요 기능 구현

0. 들어가면서 좋아요 기능은 Article(게시글)과 User(사용자)와의 관계이다. 기본적으로 우리는 N:M이기 때문에 manytomanyfield를 사용하여 models.py를 아래와 같이 꾸밀 것이다. class Article(models.Model): title = models.CharField(max_length=100) content = models.TextField() created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) use..

Web/Django 2020. 8. 28. 22:46
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • vuejs
  • JavaScript
  • Vue
  • useHistory 안됨
  • NextJS
  • login
  • Queue
  • pandas
  • django
  • DFS
  • nodejs
  • next.config.js
  • UserCreationForm
  • Python
  • typescript
  • logout
  • error:0308010C:digital envelope routines::unsupported
  • nextjs autoFocus
  • Express
  • react
  • 클라우데라
  • 자료구조
  • react autoFocus
  • BFS
  • mongoDB
  • read_csv
  • Deque
  • 자연어처리
  • useState
  • TensorFlow
more
«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바