전체 글 66

install pycropto error

Python 3 - Install pycrypto on Windows I'm using Python 3.7 and Windows 10. 'pip install pycrypto' doesn't work with the following error: (pyramid) C:\Projects\Pyramid>pip install pycrypto Collecting pycrypto Downloading https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz (446kB) 100% |████████████████████████████████| ..

EventBUS 사용법

vue.js를 사용하면 컴포넌트간의 데이터 이동이 필요할때가 있다. 그럴때에는 Eventbus를 사용하면 된다. event-bus.js import Vue from "vue"; export const EventBus = new Vue(); TemplateLoad.vue => 보내는 쪽 import {EventBus} from "../../plugins/event-bus"; axios.get(baseURL + '/template/template_detail/' + this.selected).then(data => { this.tp_contents = data.data.data[0].tp_contents; EventBus.$emit('template-load', this.tp_contents); }) Sma..

development/vue.js 2019.08.19

dJango Rest API 파일 다운로드 구현하기

백엔드 단은 장고 restapi로 구현하였고 프론트단은 vue.js를 사용하였다 vue에서 파일 다운로드를 구현하기 위해선 아래와 같은 작업이 추가적으로 필요하다 let blob = new Blob([response.data], {type: response.headers['content-type']}); let link = document.createElement('a'); link.href = window.URL.createObjectURL(blob); link.download = fileName; link.click() // this.$store.commit('SET_FILE_COUNT', response.data.data); // this.$store.commit('SET_FILE_LIST', re..

django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty. 에러

듣도보도 못한 에러가 발생했다... Traceback (most recent call last): File "D:/workspace/sContract_v1.0/scontract/manage.py", line 15, in execute_from_command_line(sys.argv) File "D:\workspace\sContract_v1.0\scontract\venv\lib\site-packages\django\core\management\__init__.py", line 381, in execute_from_command_line utility.execute() File "D:\workspace\sContract_v1.0\scontract\venv\lib\site-packages\django\core..