LoginSignup
0
0

More than 1 year has passed since last update.

Django Modelの作成からmigration

Last updated at Posted at 2022-05-20

モデルを作成

from django.db import models
+ from django.utils import timezone


+ class Memo(models.Model):
+    title = models.CharField('タイトル', max_length=200)
+    text = models.TextField('本文')
+    date = models.DateTimeField('日付', default=timezone.now)

ターミナル

python manage.py makemigrations アプリ名
python manage.py migrate
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0