본문 바로가기
FrameWork/Django

Setup Super User & settings

by mansoorrr 2024. 7. 11.

admin 페이지에 로그인하기 위해서는 idpassword가 필요.

admin페이지에 들어갈 수 있는 사람이 superuser가 됨

 

[superuser 생성]

  • python manage.py createsuperuser실행
  • admin페이지에 로그인하면 django administration페이지가 나타남 성공!
  • db의 auth_user테이블에 생성한 superuser가 들어가 있는것을 확인 가능

 

 

[settings]

  • 모두 영어로 되어 있고, 시간대도 UTC 시간되로 되어 있음
  • settings.py를 수정하여 한국어로 변경 및 한국시간으로 수정
  • 코드 변경시 한국어로 변경되고 시간도 한국시간으로 변경됨을 알 수 있음
# -------------------- settings.py

<생략......>

# Internationalization
# https://docs.djangoproject.com/en/5.0/topics/i18n/

LANGUAGE_CODE = 'ko-KO' #수정

TIME_ZONE = 'Asia/Seoul' #수정

USE_I18N = True

USE_TZ = True

<생략..........>

'FrameWork > Django' 카테고리의 다른 글

App Models  (0) 2024.07.12
Application  (0) 2024.07.11
Setup Admin & Migration  (0) 2024.07.11
Set up  (0) 2024.07.11
Poetry  (1) 2024.07.11