반응형
1. db 계정 생성
$ python manage.py createsuperuser
Username (leave blank to use '###'): {account}
Email address: ######
Password:
Password (again):
Bypass password validation and create user anyway? [y/N]: y
Superuser created successfully.
2 admin.py 파일에 생성한 Post 모델을 추가하여 관리가 되도록 하자.
from django.contrib import admin
from .models import Post
# Register your models here.
admin.site.register(Post)
3. admin site의 결과
사진 설명을 입력하세요.
4. 계정 비밀번호 변경
$ python manage.py changepassword <user_name>
반응형
'Django' 카테고리의 다른 글
Django Auth (0) | 2022.02.08 |
---|---|
Visual Studio Code에서 Django Debug Mode (0) | 2022.02.08 |
Python Shell 이용하여 명령어 실행시키기 (0) | 2022.02.08 |
Django Model 생성하기 (0) | 2022.02.08 |
Django sqlite3 기초 (0) | 2022.02.08 |