In this lesson, you’re going to start looking at databases and Django models. When you created your app before, you created a file called
models.py. The models are where you do the database interactions.
This is what a Django model looks like:
# Create your models here. class Project(models.Model): title = models.CharField(max_length=100) description = models.TextField() technology = models.CharField(max_length=20) image = models.FilePathField(path='/img/')
Comments & Discussion
Become a Member to join the conversation.