์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- ํ๋ก๊ทธ๋๋จธ์ค
- Leveraging Slot Descriptions for Zero-Shot Cross-Domain Dialogue State Tracking
- nlp๋ ผ๋ฌธ๋ฆฌ๋ทฐ
- ๋ฐ์ดํฐ ํฉ์ฑ
- Few Shot Dialogue State Tracking using Meta-learning
- ์ ๋ณด์ฒ๋ฆฌ๊ธฐ์ฌ์ ๊ณต์
- ์์ฐ์ด์ฒ๋ฆฌ ๋ ผ๋ฌธ ๋ฆฌ๋ทฐ
- 2020์ ๋ณด์ฒ๋ฆฌ๊ธฐ์ฌํ๊ธฐ
- classification text
- dialogue state tracking
- Python
- ์ ๋ณด์ฒ๋ฆฌ๊ธฐ์ฌ ์์ ๋น
- ํ์ด์ฌ์ ํ์ด์ฌ๋ต๊ฒ
- ์ ๋ณด์ฒ๋ฆฌ๊ธฐ์ฌ์ ๊ณต์ํฉ๊ฒฉํ๊ธฐ
- ๋ฅ๋ฌ๋๊ธฐ์ด
- DST zeroshot learning
- Zero-shot transfer learning with synthesized data for multi-domain dialogue state tracking
- ๋ฐฑ์ค
- fasttext text classification ํ๊ธ
- ๊ฒ์์์ง
- How Much Knowledge Can You Pack Into the Parameters of a Language Model?
- MySQL
- ์ ๋ณด์ฒ๋ฆฌ๊ธฐ์ฌ ์ฑ ์ถ์ฒ
- From Machine Reading Comprehension to Dialogue State Tracking: Bridging the Gap
- SUMBT:Slot-Utterance Matching for Universal and Scalable Belief Tracking
- DST fewshot learning
- few shot dst
- ๋ค์ด๋๋ฏน ํ๋ก๊ทธ๋๋ฐ
- til
- ๋ชจ๋์๋ฅ๋ฌ๋
- Today
- Total
๐ฒ์๋ผ๋๋์ฒญ๋
[์ฅ๊ณ ] ์ฒซ ๋ฒ์งธ ์ฅ๊ณ ์ฑ ์์ฑํ๊ธฐ ํํ ๋ฆฌ์ผ 2-1 ๋ณธ๋ฌธ
https://docs.djangoproject.com/ko/2.2/intro/tutorial02/
์ฒซ ๋ฒ์งธ ์ฅ๊ณ ์ฑ ์์ฑํ๊ธฐ, part 2 | Django ๋ฌธ์ | Django
Django The web framework for perfectionists with deadlines. Overview Download Documentation News Community Code Issues About ♥ Donate
docs.djangoproject.com
1. DB ์ฐ๊ฒฐํ๊ธฐ
์ฅ๊ณ ๋ sqlite๋ผ๋ ์์ ๋๋น ์ ์ฅ์๊ฐ ์ด๋ฏธ ์ค์น๋์ด ์๋ค. ํํ ๋ฆฌ์ผ์ ๋ฐ๋ผํ๋ ๊ฒ์๋ ๋ฌธ์ ๊ฐ ์์ง๋ง, ๋์ค์ ์ฑ์ด ์ปค์ง๊ฒ์ ์๊ฐํ์ฌ ๋ค๋ฅธ db๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ด ์ข์ ๊ฒ ๊ฐ๋ค. ํํ ๋ฆฌ์ผ์์๋ ๊ทธ๋ ๊ฒ ๋งํ๋ค.
์ฌํผ ์ฅ๊ณ ๋ ์ด๋ฏธ ๋ฐ์ดํฐ ๋ฒ ์ด์ค์ ์ฐ๋๋์ด ์๋ค.
์ฅ๊ณ ๋ฅผ ๋ค๋ฃจ๋ฉฐ ์ข ์ข ๋ฃ๋ ๋ง์ด๊ทธ๋ ์ด์ ์ ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ๋ํ ๋ณ๊ฒฝ์ ์ ์ฉํ๋ค๋ ์๋ฏธ๋ก ์ธ์ธ๋ค(์๋ง๋..?)
๋ํ models.py๋ฅผ ๋ง๋๋ ๊ฒ์ ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ฅผ ๋ง๋๋ ๊ฒ๊ณผ ๋น์ทํ๋ค.
2. models.py ๋ง๋ค๊ธฐ
๊ธฐ๋ณธ SQLite๋ฅผ ์ฌ์ฉํ๋ค๊ณ ํ๋ค๋ฉด mysite/settings.py๋ฅผ ๋ฐ๋ก ์์ ํ ํ์ ์์ด polls/models.py ๋ถํฐ ์์ ํ๋ฉด ๋๋ค.
1
2
3
4
5
6
7
8
9
10
11
12
|
from django.db import models
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
class Choice(models.Model):
question = models.ForeignKey(Question, on_delete=models.CASCADE)
choice_text = models.CharField(max_length=200)
votes = models.IntegerField(default=0)
|
cs |
์ฝ๋๋ฅผ ๋ณด๋ฉด, MYSQL์์์ฒ๋ผ, Question, Choice ํ ์ด๋ธ์ ๋ง๋ค๊ณ Question์์๋ question_text์ pub_date column์ ๋ ๊ฒ์ผ๋ก ํด์ ํ ์ ์๋ค.
Choice ํ ์ด๋ธ๋ question์ Questionํ ์ด๋ธ์ ForeignKey๋ก ๋๊ณ (์๋ฌด๋๋index๊ฒ ์ง?) ๋ค๋ฅธ column๋ค์ ๋ง๋ ๊ฒ์ ๋ณผ ์ ์์๋ค.
polls/models.py๋ฅผ ๋ค์๊ณผ ๊ฐ์ด ๋ณ๊ฒฝ ํ ๋ค์์ poll์ด๋ผ๋ ์ฑ์ด ์๋ก ์๊ฒผ๋ค๋ ๊ฒ์ ํ๋ก์ ํธ์ ํฌํจ์์ผ ์ฃผ์ด์ผ ํ๋ค.
์๋ ์ฝ๋๋ก ํ ์ ์๋ค.
mysite/settings.py์์ ๋ค์๊ณผ ๊ฐ์ด ์์ ํ๋ฉด ๋๋ค.
3. ๋ณ๊ฒฝ์ฌํญ mygrate
1
2
3
4
5
6
7
8
9
|
INSTALLED_APPS = [
'polls.apps.PollsConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
|
cs |
๊ทธ ๋ค์ ๋ค์ migrate์ ๋ณ๊ฒฝ ์ฌํญ์ ์ ์ฅ์ํค๊ณ ์ถ๋ค๋ ๋ช ๋ น์ด๋ฅผ ์คํ ์ํค๊ณ
1
|
$ python manage.py makemigrations polls
|
cs |
1
|
$ python manage.py migrate
|
cs |
'django' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[์ฅ๊ณ ] ์ฒซ ๋ฒ์งธ ์ฅ๊ณ ์ฑ ์์ฑํ๊ธฐ4(์ ๋๋ฆญ ๋ทฐ) (0) | 2019.09.17 |
---|---|
[์ฅ๊ณ ] ์ฒซ ๋ฒ์งธ ์ฅ๊ณ ์ฑ ์์ฑํ๊ธฐ 3(view + ํ ํ๋ฆฟ + url) (0) | 2019.09.17 |
[์ฅ๊ณ ] ์ฒซ๋ฒ์งธ ์ฅ๊ณ ์ฑ ์์ฑํ๊ธฐ 2-1(๊ด๋ฆฌ์ ์๋ฒ) (0) | 2019.09.17 |
[์ฅ๊ณ ] ์ฒซ ๋ฒ์งธ ์ฅ๊ณ ์ฑ ์์ฑํ๊ธฐ ํํ ๋ฆฌ์ผ 1 (0) | 2019.09.17 |