How To Create Django Models

twitter logo github logo ・1 min read

Create a model field within file

class Contact(models.Model):
name = models.CharField(max_length=100)
email = models.EmailField(max_length=100)
subject = models.CharField(max_length=100)
message = models.TextField()
mobile = models.IntegerField(max_length=180)
created_on = models.DateTimeField(auto_now_add=True)
Associate with


Run migrations command

python makemigrations

Check Migration

python showmigrations
python migrate

twitter logo DISCUSS
Classic DEV Post from May 21

Microsoft Azure for Spoiled People

There may come a time in your career when you have to move from platforms such as Firebase and Netlify for app deployment to a more enterprise-focused platform such as Microsoft Azure. Here's an empathetic post for all the Spoiled People.

siddharth shukla profile image
I train professional software engineers that companies love to hire. I cover a wide range of subjects like programming, what's latest in tech, new frameworks, open-source products etc.