1. 계정 있는지 확인해보기
manage.py이 있는 디렉토리로 가기
(django_site) ubuntu@ip-172-31-11-144:~$ cd django_site
(django_site) ubuntu@ip-172-31-11-144:~/django_site$ ls
bootstrap-4.6.1-dist common config db.json manage.py mysite pybo requirements.txt
(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)
>>> print(superusers)
<QuerySet []> #빈리스트면 유저 없음
2. 관리자 계정 만들기
(django_site) ubuntu@ip-172-31-11-144:~/django_site$ python manage.py createsuperuser
사용자 이름 (leave blank to use 'ubuntu'): jhj
이메일 주소:
Password: #aa454545
Password (again):
Superuser created successfully.
로그인 해보면 ~~ 짜란

'Others > Ubuntu and Linux' 카테고리의 다른 글
(Ubuntu) 서버구축 - (1) EC2 인스턴스 만들고 ssh 로 접속하기 (0) | 2022.05.17 |
---|---|
(Ubuntu) mysql - ERROR Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) / 삭제가 답 (0) | 2022.05.13 |
(Ubuntu) Django + Gunicon + Nginx 연동하기 (2)-2 지유니콘 (0) | 2022.05.11 |
(Ubuntu) Django + Gunicon + Nginx 연동하기 (2)-1 오류찾기 (0) | 2022.05.09 |
(Ubuntu) 디렉토리 & 파일 생성 / 삭제 (0) | 2022.04.28 |
1. 계정 있는지 확인해보기
manage.py이 있는 디렉토리로 가기
(django_site) ubuntu@ip-172-31-11-144:~$ cd django_site
(django_site) ubuntu@ip-172-31-11-144:~/django_site$ ls
bootstrap-4.6.1-dist common config db.json manage.py mysite pybo requirements.txt
(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)
>>> print(superusers)
<QuerySet []> #빈리스트면 유저 없음
2. 관리자 계정 만들기
(django_site) ubuntu@ip-172-31-11-144:~/django_site$ python manage.py createsuperuser
사용자 이름 (leave blank to use 'ubuntu'): jhj
이메일 주소:
Password: #aa454545
Password (again):
Superuser created successfully.
로그인 해보면 ~~ 짜란

'Others > Ubuntu and Linux' 카테고리의 다른 글
(Ubuntu) 서버구축 - (1) EC2 인스턴스 만들고 ssh 로 접속하기 (0) | 2022.05.17 |
---|---|
(Ubuntu) mysql - ERROR Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) / 삭제가 답 (0) | 2022.05.13 |
(Ubuntu) Django + Gunicon + Nginx 연동하기 (2)-2 지유니콘 (0) | 2022.05.11 |
(Ubuntu) Django + Gunicon + Nginx 연동하기 (2)-1 오류찾기 (0) | 2022.05.09 |
(Ubuntu) 디렉토리 & 파일 생성 / 삭제 (0) | 2022.04.28 |