You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

models.py 454B

123456789101112131415
  1. from django.db import models
  2. class Profile(models.Model):
  3. """
  4. Dummy profile model used for testing
  5. """
  6. user = models.OneToOneField('auth.User', related_name="profile")
  7. MALE, FEMALE = 'M', 'F'
  8. choices = (
  9. (MALE, 'Male'),
  10. (FEMALE, 'Female'))
  11. gender = models.CharField(max_length=1, choices=choices,
  12. verbose_name='Gender')
  13. age = models.PositiveIntegerField(verbose_name='Age')