본문 바로가기

Web18

Django 란? Django(쟁고) 란? - Python의 오픈 소스 웹 프레임워크이자 풀 스택 프레임워크 - MVT 패턴 기반이며 Model이 데이터베이스(SQLite)와의 연동이 편하게 되어있음 - 관리자 페이지 기본 제공함-- 파이썬 가상 환경 사용해보기> source activate > deactivate-- 가상 환경 생성 후 장고 설치하기> pip install django> python -m pip install --upgrade pip(업데이트)-- 프로젝트 생성하기> django-admin startproject config .-- 개발서버 구동하기> python manage.py runserver-- 웹페이지 실행하기> http://127.0.0.1:8000/ 혹은 http://localhost:800.. 2025. 1. 21.
Eclipse 개발환경 사용시 대처법 1. 이클립스 Validation 자주 안하게 하는 설정하는 법 해당 기능은 Eclipse - Preference 메뉴 - Validation 항목에서  Suspend all validator 항목을 선택하면validation을 수행하지 않는다.해당 기능을 선택하기보다 불필요한 기능만 제거 하는 편을 선택했다. HTML Syntax 와 JSP Validator 등2. SVN에서 프로젝트 받았을 때 설정하는 법 소스를 import 하고 Project Facets에서 Dynamic Web Mobule과 Java 버전이  정상적으로 체크되어있는지 확인한다 미설정이 되어있는 경우 올바르게 체크하고 적용하기3. Java Build Path 설정 확인하기  프로젝트 WEB-INF안에 있는 lib 폴더의 라이브러리 .. 2024. 5. 20.
WEB Front(javascript) --자바스크립트에서 필터 기능 만들기const numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; // 짝수만 필터링 const evenNumbers = numbers.filter(num => num % 2 === 0); console.log(evenNumbers); // [2, 4, 6, 8, 10] --checkbox 타입의 객체의 값이 있는지 없는지, 아니면 undefined인지 체크하는 방법 var checkbox = document.getElementById("myCheckbox"); var isChecked = checkbox.checked; if (isChecked !== undefined) {     console.log("Checkbox value is defin.. 2024. 5. 15.
WEB Front (jquery, jquery mobile) -- jquery 관련 https://blog.jquery.com/category/jquery/ jQuery | Official jQuery BlogjQuery’s influence on the web will always be evident. When it was first introduced in 2006, jQuery became a fundamental tool for web developers almost immediately. It simplified JavaScript programming, making it easier to manipulate HTML documents, handlblog.jquery.com기존 웹 프로젝트 소스에 data-role="content" 이런식으로 정의 되어있.. 2024. 5. 15.
WEB Front(JSTL) --JSTL c:forEach 2개의 값을 사용하는 방법 컨트롤러에 ArrayList 2개를 넘겨주는데 jsp 페이지에서 2개의 값을 c:forEach 사용하는 방법 andView.addObject("plist",plist); andView.addObject("slist",slist); 이런식으로 c:forEach 안에 varStatus="status"를 써주고 slist[status.index] 붙여주면 2개의 값을 사용할 수 있다. slist는 컨트롤러의 andView에서 키 이름이다.              ${slist[status.index] }         ${tmp.postNo } 참고 사이트 http://javakorean.com/jstl-foreach-%EC%97%90%EC%84%9C.. 2024. 5. 15.
자식 팝업창 열려있느지 체크하기 웹에서 팝업을 열 때 window.open으로 열고 있다. IE 브라우저를 지원하지 않으면서 window.showModalDialog 와 같은 함수도 사용할 수 없다. 나는 팝업이 열려 있는지만 확인하면 되어서 아래와 같이 소스를 적용해서 해결할 수 있었다. if(typeof(popup) == 'undefined' || popup.closed == true){ popup = window.open('', 'popup', 'options'); form.action = "service.do"; form.method = "post"; form.target = " popup "; form.submit(); }else{ alert('자식 화면이 열려져 있으니 닫고 다시 실행해주세요.'); } --모달 팝업 http.. 2024. 1. 12.
파일 업로드 기능 개발 -- 파일을 blob형태로 변환해서 업로드하는 방법 input의 파일을 업로드 하는 경우 input tag의 files에 file들이 채워지게 되는데, 이때 files는 배열이 아니므로 map이나 filter등의 array 관련 메소드들이 없다. 따라서 제거된 파일의 목록을 별도로 만들고 그 목록을 FileList 형태로 만들어서 재할당 해주는 방식이 필요하다. const input = document.getElementById('file'); var newFile = blobToFile(blob, fileName); //1. blob 파일을 File로 생성 const newFileList = new DataTransfer(); // 2. DataTransfer 인스턴스 생성 newFileList.ite.. 2023. 12. 8.
반응형