app이 쓰는 model 생성
·
Python/Django
해당 앱 폴더 밑에 models.py 를 작성하고 저장 터미널에$ python3 manage.py makemigrations 앱이름 tehon:~/workspace $ python3 manage.py makemigrations dumo Migrations for 'dumo': dumo/migrations/0001_initial.py - Create model Post
cloud9 django 실행
·
Python/Django
tehon:~/workspace $ sudo pip3 install Django tehon:~/workspace $ python3 manage.py migrate tehon:~/workspace $ python3 manage.py runserver $IP:$PORT 서버 끄기ctrl + c
django 와 oracle
·
Python/Django
https://oracle.github.io/python-cx_Oracle/ $ python -m pip install cx_Oracle --pre $ python3 -m pip install cx_Oracle --pre
DisallowedHost
·
Python/Django
DisallowedHost settings.py에서ALLOWED_HOSTS = [] 를 찾아서 [] 안에 접속 아이피를 넣던지'*'를 넣어주면 된다. ALLOWED_HOSTS = '*'
No module named django
·
Python/Django
ImportError: No module named django $ sudo pip3 install Django
페이지에 한글있으면
·
Python/Django
# -*- coding: utf-8 -*-