Introduction to Django: More model fields

Published 2017-07-07
In this video, we add some more model fields to our Django model:

* DateField
* URLField
* ForeignKey
* ManyToManyField

All Comments (9)
  • @alimaleki8215
    Fantastic! Works like a charm and I am really getting the picture now. One note, when I implemented the code, on_delete was needed with Django 2.0 in: models.ForeignKey("Publisher", on_delete=models.CASCADE, blank=True, null=True)
  • @evanrossi1
    Awesome video! everything explained in 5 mins!
  • @lakshaynz
    ok so how to use the date field without the django admin?
  • @dakadoodle6295
    I like this with many to many but no one explains how to add more fields with a form. like a button that lets the user add a field
  • @thuthuy4007
    I use Django 1.5 .... Django 1.5 don't have makemigrations .... I don't know how to add new field date_printed to book.... Please help me ...
  • @Cool_Hand_Luke
    Thanks for these videos! They've been hugely helpful for getting to know my way around Django for my capstone project. Would you be willing to recommend any resources that may have helped you along the way?
  • @alexchile2653
    Hi Katie, you have very good videos. I am from Chile. I tried these 3 alternatives to convert the object in string, but they did not worked. I have Python 3.6.3 and Django 2.0.3, Can you help me? 1.- def __repr__(self): return self.title 2.- def __str__(self): return self.title 3.- def __str__(self): return '{}'.format(self.title)