[Python] pythonanywhere 사용법(2)

amudomolla·2022년 2월 22일
0

Python

목록 보기
4/4

python anywhere : https://www.pythonanywhere.com/
bootstrap theme :

6. Web으로 넘어왔다면
1) Working directory 변경
✍ /home/가입할 때 입력한 자신의 이름/

2) Virtualenv 변경
✍ /home/가입할 때 입력한 자신의 이름/파일env

3) Static files 변경
✍ URL -> /static/
✍ Directory -> /home/가입할 때 입력한 자신의 이름/파일이름/static/
(이때의 파일 이름은 env가 아님!)

4) WSGI configuration file 변경

✍ ctrl + a 해서 모든 코드를 삭제
✍ 아래와 같이 입력

import os 
import sys

path = '/home/이름/resume/'  # /home/가입할 때 입력한 자신의 이름/파일이름/
if path not in sys.path:
    sys.path.append(path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'config.settings'

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

✍ Save 클릭해서 저장하고, 새로고침 클릭

7. 다시 Web으로 가서 적용

순서대로 누르면 이제 적용된 것을 확인 가능

상단의 주소는 이제 자신의 url로서 핸드폰으로도 접속이 가능하다.
위 bootstrap 출처 : https://startbootstrap.com/theme/freelancer

profile
👩‍💻 기록 및 복습을 위함

0개의 댓글