Skip to content

Commit 84cd966

Browse files
committed
docs: Update 02-database_and_admin
1 parent 42abb40 commit 84cd966

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

docs/02-database_and_admin.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
```
7777

7878
- 각 데이터베이스 필드를 `Field` 클래스의 인스턴스로 표현
79-
- `ForeignKey()` : 왜래키 참조
79+
- `ForeignKey()` : 외래키 참조
8080

8181
<br>
8282

@@ -116,7 +116,7 @@ CREATE INDEX "polls_choice_question_id_c5b4b260" ON "polls_choice" ("question_id
116116
COMMIT;
117117
```
118118

119-
- 데이터베이스 모델 관련 테이블 생성하기 (변경사항 데이트베이스에 적용)
119+
- 데이터베이스 모델 관련 테이블 생성하기 (변경사항 데이터베이스에 적용)
120120
```bash
121121
$ python manage.py migrate
122122
Operations to perform:
@@ -260,3 +260,29 @@ In [20]: c.delete()
260260
Out[20]: (1, {'polls.Choice': 1})
261261
```
262262

263+
## 관리자 생성하기
264+
```bash
265+
$ python manage.py createsuperuser
266+
Username (leave blank to use 'user'): admin
267+
Email address: chaeyeonhee@kakao.com
268+
Password:
269+
Password (again):
270+
Superuser created successfully.
271+
```
272+
273+
<br>
274+
275+
- 개발 서버 : http://127.0.0.1:8000/admin/
276+
```bash
277+
- $ python manage.py runserver
278+
Watching for file changes with StatReloader
279+
Performing system checks...
280+
281+
System check identified no issues (0 silenced).
282+
August 24, 2021 - 19:56:57
283+
Django version 3.2.6, using settings 'mysite.settings'
284+
Starting development server at http://127.0.0.1:8000/
285+
Quit the server with CTRL-BREAK.
286+
[24/Aug/2021 19:57:21] "GET /admin/ HTTP/1.1" 302 0
287+
...
288+
```

0 commit comments

Comments
 (0)