Skip to content

MERGE: Fix merge conflict #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- 매일 아침 8:40 스크럼 회의
- 피드백 반영하여 코드 및 문서 수정


## Django
> Django makes it easier to build better Web apps more quickly and with less code.

Expand Down
30 changes: 28 additions & 2 deletions docs/02-database_and_admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
```

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

<br>

Expand Down Expand Up @@ -116,7 +116,7 @@ CREATE INDEX "polls_choice_question_id_c5b4b260" ON "polls_choice" ("question_id
COMMIT;
```

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

## 관리자 생성하기
```bash
$ python manage.py createsuperuser
Username (leave blank to use 'user'): admin
Email address: [email protected]
Password:
Password (again):
Superuser created successfully.
```

<br>

- 개발 서버 : http://127.0.0.1:8000/admin/
```bash
- $ python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
August 24, 2021 - 19:56:57
Django version 3.2.6, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[24/Aug/2021 19:57:21] "GET /admin/ HTTP/1.1" 302 0
...
```
Binary file modified mysite/db.sqlite3
Binary file not shown.
Binary file modified mysite/polls/__pycache__/admin.cpython-39.pyc
Binary file not shown.
3 changes: 2 additions & 1 deletion mysite/polls/admin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from django.contrib import admin
from .models import Question

# Register your models here.
admin.site.register(Question)