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 495B

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