Introduction to Django: More model fields

preview_player
Показать описание
In this video, we add some more model fields to our Django model:

* DateField
* URLField
* ForeignKey
* ManyToManyField
Рекомендации по теме
Комментарии
Автор

Awesome video! everything explained in 5 mins!

evanrossi
Автор

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)

alimaleki
Автор

one of the best django tutorial i found on youtube !

gruftgrabbler
Автор

ok so how to use the date field without the django admin?

lakshaynz
Автор

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?

Cool_Hand_Luke
Автор

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

dakadoodle
Автор

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 ...

thuthuy
Автор

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)

alexchile