Hardik Rana

Intersted in Machine learning and artificial intelligence.Exploring various fields of computer science like web development,Android development

Relationships In Models In Django-Free Django Tutorials

I hope before reading this post you had read the other two posts on django. 1. https://padhle.com/models-in-django-free-django-tutorials/ 2. More About Models In Django-Free Django Tutorials  So in this post we will discuss about three most common types of database relationships: many-to-one, many-to-many and one-to-one. Many-to-one relationships many-to-one relationship can be defined by django.db.models.ForeignKey. We can …

Relationships In Models In Django-Free Django Tutorials Read More »

More About Models In Django-Free Django Tutorials

For basic knowledge about what are the models in django first read this post: https://padhle.com/models-in-django-free-django-tutorials/. Fields In Django Models: One of the important and required part of a model is the list of database fields it defines.Fields in django are specified by class attributes. For example: from django.db import models class Musician(models.Model): first_name = models.CharField(max_length=50) last_name …

More About Models In Django-Free Django Tutorials Read More »