from django.db import models class Member(models.Model): # RE: null vs blank # # NULL https://docs.djangoproject.com/en/1.10/ref/models/fields/#null # Avoid using null on string-based fields such as CharField and TextField because # empty string values will always be stored as empty strings, not as NULL. # # BLANK https://docs.djangoproject.com/en/1.10/ref/models/fields/#blank # Note that this is different than null. null is purely database-related, whereas blank is validation-related. # If a field has blank=True, form validation will allow entry of an empty value. # If a field has blank=False, the field will be required. first_name = models.CharField(max_length=120, blank=False) last_name = models.CharField(max_length=120, blank=True) # optional email = models.EmailField(blank=False) username = models.CharField(max_length=120, blank=False) created = models.DateTimeField(max_length=120, auto_now_add=True)