Models Flashcards

1
Q

Models mean

A

means database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

class means

A

data tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

creating a class

A
class Project(models.Model):
*need to inherit from models
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Field - CharField

A

title = models.CharField(max_length=100)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Field - ImageField

A

image = models.ImageField(upload_to=’portfolio/images/’)

Needs pillow module

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Field - URLField

A

url = models.URLField(blank=True)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

make Field optional

A

blank=True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly