Object Type Casting in Java : Free Java Tutorials

Object Type Casting in Java says that one object reference can be typecast into another object reference. We can use parent reference to hold child object. For example, Object class reference can hold String class object. Object str = new String(); We can also use interface reference to hold implemented class object. Runnable thread = …

Object Type Casting in Java : Free Java Tutorials Read More »

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 »