AWS pybo 서비스 git 링크활용 오류

아래 pybo AWS 실행 시
git clone https://github.com/pahkey/pybo.git mysite
pahkey git 소스코드 활용 시

위 디폴트 파이보 서비스에 대한 코드 에러가 있는 것 같은데
확인방법을 검토 부탁드립니다.

runserver 구현 시 에러 발생

(mysite) ubuntu@ip-172-26-5-84:~/projects/mysite$ python manage.py runserver
Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    main()
  File "manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/home/ubuntu/venvs/mysite/lib/python3.8/site-packages/django/core/management/__ini
t__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/home/ubuntu/venvs/mysite/lib/python3.8/site-packages/django/core/management/__ini
t__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/ubuntu/venvs/mysite/lib/python3.8/site-packages/django/core/management/base.
py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/ubuntu/venvs/mysite/lib/python3.8/site-packages/django/core/management/comma
nds/runserver.py", line 61, in execute
    super().execute(*args, **options)
  File "/home/ubuntu/venvs/mysite/lib/python3.8/site-packages/django/core/management/base.
py", line 371, in execute
    output = self.handle(*args, **options)
  File "/home/ubuntu/venvs/mysite/lib/python3.8/site-packages/django/core/management/comma
nds/runserver.py", line 68, in handle
    if not settings.DEBUG and not settings.ALLOWED_HOSTS:
  File "/home/ubuntu/venvs/mysite/lib/python3.8/site-packages/django/conf/__init__.py", li
ne 83, in __getattr__
    self._setup(name)
  File "/home/ubuntu/venvs/mysite/lib/python3.8/site-packages/django/conf/__init__.py", li
ne 70, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/ubuntu/venvs/mysite/lib/python3.8/site-packages/django/conf/__init__.py", li
ne 196, in __init__
    raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.

dohyun718 396

M 2021년 3월 1일 9:26 오후

목록으로
2개의 답변이 있습니다. 1 / 1 Page

환경변수 설정을 어떻게 하셨나요?
설정한 내용을 보여주세요.

박응용

2021년 3월 1일 9:27 오후

안녕하세요..
교재와 동일하게 구성하였습니다.

ubuntu@ip-172-26-5-84:~$ ls
projects venvs
ubuntu@ip-172-26-5-84:~$
ubuntu@ip-172-26-5-84:~$
ubuntu@ip-172-26-5-84:~$ cd venvs
ubuntu@ip-172-26-5-84:~/venvs$ cd mysite
ubuntu@ip-172-26-5-84:~/venvs/mysite$ ls
bin include lib lib64 pyvenv.cfg share
ubuntu@ip-172-26-5-84:~/venvs/mysite$ cd bin
ubuntu@ip-172-26-5-84:~/venvs/mysite/bin$ . activate
(mysite) ubuntu@ip-172-26-5-84:~/venvs/mysite/bin$
(mysite) ubuntu@ip-172-26-5-84:~/venvs/mysite/bin$ ls
Activate.ps1 activate.csh django-admin.py markdown_py pip3.8 sqlformat
pycache activate.fish easy_install pip python wheel
activate django-admin easy_install-3.8 pip3 python3
(mysite) ubuntu@ip-172-26-5-84:~/venvs/mysite/bin$ ^C
(mysite) ubuntu@ip-172-26-5-84:~/venvs/mysite/bin$
(mysite) ubuntu@ip-172-26-5-84:~/venvs/mysite/bin$
(mysite) ubuntu@ip-172-26-5-84:~/venvs/mysite/bin$ cd ~/projects
(mysite) ubuntu@ip-172-26-5-84:~/projects$
(mysite) ubuntu@ip-172-26-5-84:~/projects$ ls
mysite
(mysite) ubuntu@ip-172-26-5-84:~/projects$
(mysite) ubuntu@ip-172-26-5-84:~/projects$ cd mysite
(mysite) ubuntu@ip-172-26-5-84:~/projects/mysite$ ls
common config manage.py pybo static templates
(mysite) ubuntu@ip-172-26-5-84:~/projects/mysite$

dohyun718

2021년 3월 1일 10:20 오후

여기 보시면 mysite.sh 이나 alias 를 이용하여 환경변수(DJANGO_SETTINGS_MODULE)를 설정하는 부분이 있습니다. 이 부분 참고하시면 될것 같습니다. https://wikidocs.net/75560#_4 - 박응용님, 2021년 3월 1일 10:54 오후 추천 , 대댓글