본문 바로가기

반응형

전체 글

(202)
Django 서버의 static folder 파일 다운로드 https://stackoverflow.com/questions/48842061/download-static-file-displayed-in-the-list-django 이미지 썸네일 삭제 Download static file displayed in the list Django I am trying to make static files download-able from the template of my Django app. def list(request): folder = '/home/galander/Desktop/Projekty/django-pdf-generator/django-pdf/generator/static... stackoverflow.com https://docs.djangoproject.c..
Django에서의 request의 multipart 파일 처리 https://docs.djangoproject.com/en/4.0/topics/http/file-uploads/ File Uploads | Django documentation | Django File Uploads ¶ When Django handles a file upload, the file data ends up placed in request.FILES (for more on the request object see the documentation for request and response objects ). This document explains how files are stored on disk and in memory, and how to customize the default beh..
Django Login, Logout 템플릿 이용하기 https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Authentication 이미지 썸네일 삭제 Django Tutorial Part 8: User authentication and permissions - Learn web development | MDN Excellent work — you've now created a website that library members can log in into and view their own content and that librarians (with the correct permission) can use to view all loaned books and their borrowers. At..
Django Auth https://docs.djangoproject.com/en/4.0/topics/auth/default/ Using the Django authentication system | Django documentation | Django Using the Django authentication system ¶ This document explains the usage of Django’s authentication system in its default configuration. This configuration has evolved to serve the most common project needs, handling a reasonably wide range of tasks, and has a carefu..
Visual Studio Code에서 Django Debug Mode 1. Project 아래에 .vscode를 만들고 launch.json을 생성한다. 2. configurations에 아래 옵션을 추가한다. "pythonPath": "%Absolute Path%/django/env/bin/python", 3. Debugging 한다. 26Line에 Breakpoint 걸려있는 모습. 대표사진 삭제 사진 설명을 입력하세요.
django db admin 계정 사용하기. create user 1. db 계정 생성 $ python manage.py createsuperuser Username (leave blank to use '###'): {account} Email address: ###### Password: Password (again): Bypass password validation and create user anyway? [y/N]: y Superuser created successfully. 2 admin.py 파일에 생성한 Post 모델을 추가하여 관리가 되도록 하자. from django.contrib import admin from .models import Post # Register your models here. admin.site.register(Post) 3. a..
Python Shell 이용하여 명령어 실행시키기 1. shell로 들어가자 $ python manage.py shell Python 3.8.5 (v3.8.5:580fbb018f, Jul 20 2020, 12:11:27) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) 2. model을 가져와서 지금 들어 있는 Query set이 얼마나 있는지 확인하자 >>> from HelloWorld.models import Post >>> Post.objects.all() 3. 저장된 Query가 없으니 하나 넣어서 잘 들어갔는지 확인해 보자 >>> post = Post(post_..
Django Model 생성하기 https://docs.djangoproject.com/en/4.0/intro/tutorial02/ 이미지 썸네일 삭제 Writing your first Django app, part 2 | Django documentation | Django Writing your first Django app, part 2 ¶ This tutorial begins where Tutorial 1 left off. We’ll set up the database, create your first model, and get a quick introduction to Django’s automatically-generated admin site. Where to get help: If you’re having trouble ..

반응형