반응형
반응형

Django DIY Blog

Basic blog site written in Django (part of MDN Django module assessment)

This web application creates an very basic blog site using Django. The site allows blog authors to create text-only blogs using the Admin site, and any logged in user to add comments via a form. Any user can list all bloggers, all blogs, and detail for bloggers and blogs (including comments for each blog).

The models for this site are as shown below:

 

https://github.com/mdn/django-diy-blog

 

mdn/django-diy-blog

Basic blog site written in Django (part of MDN Django module assessment). - mdn/django-diy-blog

github.com

 

반응형
반응형

기본 함수를 사용하여 JSON 데이터 유효성 검사, 쿼리, 변경(SQL Server)

SELECT id, json_col
FROM tab1
WHERE ISJSON(json_col) > 0 

https://docs.microsoft.com/ko-kr/sql/t-sql/functions/isjson-transact-sql?view=sql-server-ver15 

 

ISJSON(Transact-SQL) - SQL Server

ISJSON(Transact-SQL)

docs.microsoft.com

 

반응형
반응형

How TO - Sort a Table

 

html 테이블 정렬

 

.

반응형
반응형

[PostgreSql] 버전 확인, 확장프로그램 확인 

 

select version();
select * from pg_available_extensions;
반응형
반응형

국외 IP 조회

 

http://cqcounter.com/whois/

 

cqcounter.com

IP address and domain name whois lookup, domain information, dns reports, reverse ip resolver, geo location map

cqcounter.com

 

반응형
반응형

textarea 입력대로 화면에 출력하기

<!DOCTYPE html>
<head>
<title>Recipe</title>
<script>

window.onload=function() {
 document.getElementById("preview").onclick=processText;
}

function processText() {
 var txtBox = document.getElementById("inputbox");
 var lines = txtBox.value.split("\n");

 // generate HTML version of text
 var resultString  = "<p>";
 for (var i = 0; i < lines.length; i++) {
   resultString += lines[i] + "<br />";
 }
 resultString += "</p>";

 // print out to page
 var   blk   = document.getElementById("result");
 blk.innerHTML  =  resultString; 
}

</script>

</head>
<body>
<textarea id="inputbox" cols="20" rows="10"></textarea>
<div><button id="preview">Preview</button></div>
<div id="result"></div>
</body>

textarea를 줄별로 처리하기

//줄 바꿈 문자를 기준으로 textarea 문자열을 분리
var txtBox = document.getElementById("inputbox");
var lines = txtBox.value.split("\n");

//내용을 HTML 버전으로 변경
var resultString  = "<p>";
for (var i = 0; i < lines.length; i++) {
    resultString += lines[i] + "<br>";
}
resultString += "</p>";

//페이지에 출력
var   blk   = document.getElementById("result");
blk.innerHTML  =  resultString; 
반응형

+ Recent posts