본문 바로가기

분류 전체보기402

[ Django ] django Views 1. Django 준비 작업 - app등록 대상파일 : projects /mysite / config / setting.py INSTALLED_APPS = [ "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", # Local App "pybo.apps.PyboConfig", ] - 관리자 모드에 Article 모듈 등록 대상파일 : projects /mysite / config / apps.py from django.contrib import admin from .mod.. 2023. 5. 2.
[ Django ] Index 1. Django 설치 2. app 설치 3. views 2023. 5. 2.
mas os 명령어 • cd (change down a directory) • cd .. (change up a directory) • ls (list files in your current directory) • pwd (print working directory) • mkdir (make directory) • touch (create a new file) 2023. 5. 1.
Django Form 종류 https://iridescent-zeal.tistory.com/199 [Django]장고에서 사용자 입력받기 - Form 이용하기 [ Django에서의 Form ] 장고에서는 사용자가 입력을 하게되면 그 입력에 대한 처리를 할 수 있드록 폼 기능을 제공합니다. models.py의 모델 클래스의 필드가 데이터베이스 필드에 매핑되는 것처럼, 폼 iridescent-zeal.tistory.com 모델 정의 from django.db import models class Student(models.Model): studentID = models.IntegerField() name = models.TextField() major = models.TextField() def __str__(self): return .. 2023. 5. 1.
Django Flash Messages Introduction to the Django Flash Messages 플래시 메시지는 일회성 알림 메시지입니다. Django에서 플래시 메시지를 표시하려면 django.contrib 모듈의 messages를 사용합니다. from django.contrib import messages The messages have some useful functions for displaying information, warning, and error messages: messages.debug – displays a debug message. messages.info – displays an informational message. messages.success – displays a success message.. 2023. 4. 29.
Django Migrations Introduction to Django migration commands Django로 작업할 때 새 테이블을 만들거나 기존 테이블을 변경하기 위해 SQL을 작성할 필요가 없습니다. 대신 Django 마이그레이션을 사용합니다. Django 마이그레이션을 사용하면 명령줄을 통해 모델에 대한 변경 내용을 데이터베이스에 전파할 수 있습니다. Django는 모델에 대한 변경 내용을 기반으로 새 마이그레이션을 만들고 마이그레이션을 데이터베이스에 적용하기 위한 몇 가지 명령을 제공합니다. 모델을 변경하고, 마이그레이션을 만들고, 변경 내용을 데이터베이스에 적용하는 프로세스는 다음과 같습니다. The process for making changes to models, creating migrations, and a.. 2023. 4. 28.
Django Models Introduction to Django models Django에서 모델은 django.db.models.Model 클래스의 하위 클래스입니다 . 모델에는 필드를 조작하는 하나 이상의 필드와 메서드가 포함되어 있습니다. 기본적으로 Django 모델은 모델의 각 필드가 테이블의 column을 나타내는 데이터베이스의 단일 테이블에 매핑 됩니다. 응용 프로그램에는 models.py 모듈에 저장된 0개 이상의 모델이 있을 수 있습니다. 예를 들어 다음은 blog 응용 프로그램에 대한 Post 모델을 정의합니다. from django.db import models from django.utils import timezone class Post(models.Model): title = models.CharFiel.. 2023. 4. 28.
git 사용 git 사용 우선 다음처럼 개발 환경에서 변경된 파일을 서버에 적용하자. (mysite) c:\projects\mysite>git add * (mysite) c:\projects\mysite>git commit -m "settings 변경" (mysite) c:\projects\mysite>git push 그리고 AWS 서버 터미널에 접속하여 다음 명령을 순서대로 수행한다. ubuntu@jumpto:~$ cd ~/venvs/mysite/bin ubuntu@jumpto:~/venvs/mysite/bin$ . activate (mysite) ubuntu@jumpto:~/venvs/mysite/bin$ cd ~/projects/mysite (mysite) ubuntu@jumpto:~/projects/mysit.. 2023. 4. 28.
aws 호스팅5 https://wikidocs.net/164372 4-16 SSL 이제 브라우저에서 고정 IP 대신 도메인을 입력하여 서버에 접속할수 있게 되었다. 하지만 브라우저의 주소창을 보면 다음과 같이 주의 요함 이라는 경고 메시지가 표시된다. !… wikidocs.net SSL 이제 브라우저에서 고정 IP 대신 도메인을 입력하여 서버에 접속할수 있게 되었다. 하지만 브라우저의 주소창을 보면 다음과 같이 "주의 요함" 이라는 경고 메시지가 표시된다. 이러한 경고메시지가 보이는 이유는 https://pybo.kr 이 아닌 http://pybo.kr 처럼 https가 아닌 http 프로토콜을 사용했기 때문이다. 브라우저는 HTTPS가 아닌 HTTP 사용시 항상 이러한 경고 메시지를 보여준다. http에 보안기능(SS.. 2023. 4. 28.