Others

gunicorn은 WSGI(Web Server Gateway Interface) 서버 WSGI란 python으로 작성된 웹 어플리케이션과 python으로 작성된 서버 사이의 약속된 인터페이스 또는 규칙 개발이 아니라 서버에 필요한 도구라 로컬 환경에 설치할 필요 없당 그래서 1. 서버 환경에 gunicon 설치 ! (django_site) ubuntu@ip-172-31-11-144:~/django_site$ pip install gunicorn Collecting gunicorn Downloading gunicorn-20.1.0-py3-none-any.whl (79 kB) |████████████████████████████████| 79 kB 7.7 MB/s Requirement already sati..
https://kitle.xyz/post/58/ (django_site) ubuntu@ip-172-31-11-144:~/django_site$ python manage.py shell Python 3.10.4 (main, Mar 31 2022, 08:41:55) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> >>> >>> from django.contrib.auth.models import User >>> superusers = User.objects.filter(is_superuser=True) >>> superusers >>> Keyboar..
1. mysql 설치 (django_site) ubuntu@ip-172-31-11-144:~/django_site$ sudo apt-get install mysql-server 그럼 주르륵 설치 2. mysql 실행 / mysql 접속 -> 비밀번호 입력 (django_site) ubuntu@ip-172-31-11-144:~/django_site$ sudo systemctl start mysql (django_site) ubuntu@ip-172-31-11-144:~/django_site$ sudo /usr/bin/mysql -u root -p Enter password: 2-1. 사용자 정보 확인 -> 사용할 계정 만들기 -> 다시 사용자 정보 확인하기 #사용자 정보 확인 mysql> SELECT Use..
(오류 발생) ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment? 에러 메세지를 확인하니 장고 가져올 수 없다, 가상환경 활성화 되어있냐 라는 뜻인디 , , pip list를 통해 django가 깔려 있는지 확인 해보니 없었당 가상 환경을 만든 후 django 를 install 안했나봄 pip install django 해서 django 설치 설치 후 (django_site) ubuntu@ip-172-31-11-144:~/django_site$ python..
새로운 가상환경 만들기 conda create -n {envname} (base) [sonic@rna2 ~]$ conda create -n sjpy3 python=3.6 \ 가상환경 목록 확인하기 conda env list conda info -> 현재 활성화된 가상환경에 대한 더 자세한 내용을 볼 경우 가상환경으로 들어가기 source activate {envname} (ubunsu) conda activate {envname} 가상환경으로부터 나오기 source deactivate (ubunsu) conda deactivate 필요없는 가상환경 삭제하기 conda remove --name {envname} (base) [sonic@rna2 ~]$ conda remove --name sjpy3 --al..
print(blue)