$pythonmanage.pysqlmigratearticles0001 [app_label] [migration_name]BEGIN;----CreatemodelArticle--CREATE TABLE "articles_article" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "title" varchar(140) NOT NULL, "content" text NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL);
COMMIT;
from django.shortcuts import render, redirect, get_object_or_404 ...article =get_object_or_404(Article, id=pk)
5. Static files
settings.py
# servering 되는 URL 앞에 붙음STATIC_URL ='/static/'# app directory 가 아닌 static 폴더 지정STATICFILES_DIRS = [ os.path.join(BASE_DIR, 'static')]
+
Traceroute
TraceRoute - Linux / TRACERT - Windows
지정된 호스트에 도달할 때까지 통과하는 경로의 정보와 각 경로에서의 지연 시간을 추적하는 명령이다, 쉽게 경로 추적 툴이라고 볼 수 있다 (ICMP을 사용한다!)
지정된 호스트에 도달할 때까지 통과하는 경로의 정보와 각 경로에서의 지연 시간을 추적하는 네트워크 명령어로 특정 사이트에 접속이 되지 않거나 지연이 있는 경우 어디에서 병목이 발생하는지를 알아보는데 유용함.
접속이 되는 각 경로를 체크하여 **어느 경로(Routing)**를 거쳐 접속이 되고, 어느 구간에서 얼마만큼의 속도 지연이 있는지, 그리고 어디에서패킷이 중지 됐는지를 확인할 수 있음
단, 시간대/내부 트래픽/서버 상태 등의 많은 영향을 받아 값이 달라질 수 있으므로 반복 확인이 필요하다!
Install traceroute
sudoapt-getinstalltraceroute
Use traceroute
$traceroutewww.google.comtraceroutetowww.google.com (172.217.31.164), 30 hops max, 60 byte packets1_gateway (172.30.1.254) 5.195 ms 5.127 ms 5.105 ms2220.78.3.1 (220.78.3.1) 5.071 ms **3125.141.249.21 (125.141.249.21) 5.364 ms 5.308 ms 5.262 ms4***5*** 6 112.174.73.178 (112.174.73.178) 6.510 ms 112.174.47.162 (112.174.47.162) 5.301 ms 112.174.73.178 (112.174.73.178) 4.858 ms
774.125.52.16 (74.125.52.16) 31.913 ms 31.801 ms 33.951 ms8108.170.242.129 (108.170.242.129) 36.142 ms 108.170.242.97 (108.170.242.97) 34.386 ms 34.811 ms9209.85.253.109 (209.85.253.109) 36.711 ms 36.555 ms 36.483 ms10nrt12s22-in-f4.1e100.net (172.217.31.164) 34.998 ms 33.267 ms 32.844 ms