어제의 최선

  • 홈
  • 태그
  • 방명록

Backend 32

[인스타그램 클론] 프로필 페이지

model from django.db import models from django.conf import settings from django.shortcuts import resolve_url from django.utils.text import slugify#라이브러리 class Profile(models.Model): user = models.OneToOneField(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) nickname = models.CharField(max_length=20) profile_photo = models.ImageField(upload_to="profile/" , blank=True) slug = models.SlugField(..

Backend/Python 2020.04.28

form 이미지 업로드

텍스트 업로드 views.py def create(request): new = Diary() new.title = request.GET['title'] new.body = request.GET['body'] new.pub_time = timezone.datetime.now() new.save() return redirect(new) 클래스 인스턴스 생성 request.GET["html name"]으로 value 가져옴 save메소드로 저장 get_absolute_url을 이용해 디테일 페이지로 이동 이미지 업로드 models.py class Diary(models.Model): title = models.CharField(max_length=20) image = models.ImageField(uploa..

Backend/Python 2020.04.22
이전
1 2 3 4
다음
더보기
프로필사진

어제의 최선

.

  • 분류 전체보기 (51)
    • Frontend (4)
    • Backend (32)
      • Python (6)
      • Java (26)
    • DB (2)
      • Oracle (2)
    • Tools (9)
      • gulp (4)
      • git (3)
    • 이론 (1)
    • 일상 (3)

Tag

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/07   »
일 월 화 수 목 금 토
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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바