본문 바로가기

전체 글

(95)
React Native / TextInput 박스 안에 button 넣기 이런 모양처럼 TextInput 박스 안에 button을 넣고 싶었다. 구선생님이 알려주신 방법으로 문제 해결 수정 전 코드 중복확인 수정 후 코드 중복확인 const styles = StyleSheet.create({ button:{ width:'90%' }, phoneBox:{ flexDirection:'row', marginTop:15, paddingHorizontal: 5, paddingVertical: 6, borderBottomWidth:1, borderBottomColor:'#ddd', width: '100%', }, authFont:{ color:"#808080", paddingHorizontal: 6, fontWeight:'bold', fontSize: 16, fontFamily: 'na..
VS CODE 기본 터미널 변경 방법 (powershell → git bash) VSCODE 의 기본 터미널은 powershell이다. git을 사용해 버전관리를 하는 중이라 git bash로 기본터미널을 변경했는데 갑자기 다음과 같은 에러 발생 뿌앵. 당황하지 않고 구글링을 시작한다. 🙄 This is deprecated, the new recommended way to configure your default shell is by creating a terminal profile in `#terminal.integrated.profiles.windows#` and setting its profile name as the default in `#terminal.integrated.defaultProfile.windows#`. This will currently take priori..
php / 해당 날짜, 오늘 요일 구하기 요일에 따라 분깃처리를 해야하는 상황이 생김 그러기 위해서는 오늘날짜에 따른 요일 구하기가 필요했다. $arr = array('일', '월', '화', '수', '목', '금', '토'); $today = date("Y-m-d"); // 2021-08-30 $weekday = $arr[date('w', strtotime($today))]; echo "\n".$weekday //월
Github SSH 등록 및 설정 / authentication 방법 변경 서버와 로컬을 git에 연결해서 작업중인데 서버에서 git 아이디, 비밀번호를 치니까 갑자기 나온 에러 remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information. fatal: unable to access 'https://github.com/1234567890.git/': The requested URL returned error..
django / template <br> 줄바꿈 방법 database에 다음과 같이 입력되어 있는 글을 가지고 template으로 나오면 This is the text This is on a new line with a space in between 다음과 같이 줄바꿈 없이 글이 써진다. 줄바꿈이 필요해 😥 This is the text This is on a new line with a space in between 2가지방법 1. linbreaks / linebreaksbr filter 사용하기 {{text|linebreaks}} 2. ... 사용하기 {{ text }} 두개 차이점이라면, 사용시 줄바꿈이 2줄인 경우 그대로 나오는데, 1번의 경우 1번만 되서 나온다. 참고 https://stackoverflow.com/questions/22538454..
django / 데코레이터(decorator) 사용권한 인증 구현 (로그인, 비로그인) 🔶 Python Decorator 기능 각 페이지별로 사용권한을 주기 위해 사용하는 기능, @를 앞에 붙여서 사용함 / Decorator가 없어도 해당 페이지에서 구현가능하지만 동일한 기능을 할 때, function 으로 빼듯이 코드의 간결성을 위함 ex) 목록페이지, 공지사항페이지 등이 있는 사이트라면 목록은 A그룹만 볼 수 있고, 공지사항은 B그룹만 볼 수 있게 지정혹은, 로그인을 하지 않은 경우 해당 페이지 못보도록 막기 0. 현재상황 현재 django 로그인은 django에서 구현하는 방식이 아닌 DB 체크로 하는 중. 1. Usage App에 decorators.py 파일 생성 from django.shortcuts import redirect def is_login(func): #데코레이터 명..
django.template.exceptions.TemplateDoesNotExist: 오류 장고 오류는 꽤 친절하지 않은편이다. 특히나 template 에서 나는 오류에 있어선 그냥 에러! 이렇게 보여주니 찍어볼수도없고 하나하나 빼면서 찾아보는 방법뿐 🤢 제일 만나기 싫은 에러가 django.template.exceptions.TemplateDoesNotExist: 이런식으로 오류내용을 통으로 말해줄때다. template 있는데 왜 없단거지. 컴퓨터는 거짓말하지 않으니 내문제겠지 싶어 하나씩 확인해보았다. 1. 먼저 template에 {% load %} 해서 사용시 install이 되어있는지 예) 아래와같이 load 해서 사용시, pip list 로 install 목록 확인 후 비교하기 {% load static %} {% load mathfilters %} 2. setting.py 파일에 T..
DB / H2 데이터베이스 (H2 Database) 생성 및 사용법 지금까지는 Oracle, mysql, mariadb 등을 다뤘었는데, 이번에 java spring강의를 들으면서 새로운 데이터베이스를 사용해보게 되었다. H2 Database 작고 빠르며 설치가 따로 필요없어서 접근이 쉬운 데이터 베이스이다. H2DB는 자바 기반의 오픈소스 관계형 데이터 베이스 관리 시스템(RDBMS ) 이에 교육용으로 꽤 많이 사용한다고 한다. (출처: https://dololak.tistory.com/285 ) 🔸 download URL https://www.h2database.com/html/main.html 🔸 Install 1. All Platforms를 다운받아서 zip 압축을 풀어준다. 2-1 압축을 푼 폴더에서 > bin 폴더 이동. h2w.bat 파일을 실행시켜준다. 2..