Complete the code to define a character field with a maximum length of 100.
name = models.[1](max_length=100)
The CharField is used to store text with a limited length. Here, max_length=100 sets the maximum number of characters allowed.
Complete the code to define a field that stores whole numbers.
age = models.[1]()The IntegerField stores whole numbers without decimals, perfect for ages or counts.
Fix the error in the code to correctly define a date field.
birth_date = models.[1](auto_now_add=True)
The DateField stores dates without time. The auto_now_add=True sets the date when the record is created.
Fill both blanks to define a model field for a user's joining date that sets automatically when created and does not change.
joined = models.[1](auto_[2]=True)
DateField stores the date. The argument auto_now_add=True sets the date only when the record is created and does not update it later.
Fill all three blanks to define a model field for a user's last login date that updates automatically every time the record is saved.
last_login = models.[1](auto_[2]=True, null=[3])
DateField stores the date. The argument auto_now=True updates the field to the current date every time the record is saved. null=True allows the field to be empty in the database.