Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from django.db import models
- from django.utils.translation import ugettext_lazy as _
- from django.contrib.auth.models import User, Group
- class UserProfile(models.Model):
- GENDER_CHOICES = (
- ('M', 'Male'),
- ('F', 'Female'),
- )
- #Links to the user model and will have one to one relationship
- user = models.OneToOneField(User)
- #Other fields thats required for the registration
- gender = models.CharField(_('Gender'), max_length=1, choices=GENDER_CHOICES, null=False)
- dob = models.DateField(_('Date of Birth'), null=False)
- address1 = models.CharField(_('Street Address Line 1'), max_length=250, null=False)
- address2 = models.CharField(_('Street Address Line 2'), max_length=250)
- city = models.CharField(_('City'), max_length=100, null=False)
- state = models.CharField(_('State/Province'), max_length=250, null=False)
- pincode = models.CharField(_('Pincode'), max_length=15)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement