default.py 1005 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. from django.utils.translation import ugettext_lazy as _
  2. from . import basefields
  3. class BioField(basefields.TextareaProfileField):
  4. fieldname = 'bio'
  5. label = _("Bio")
  6. class FullNameField(basefields.TextProfileField):
  7. fieldname = 'fullname'
  8. label = _("Full name")
  9. class LocationField(basefields.TextProfileField):
  10. fieldname = 'location'
  11. label = _("Location")
  12. class GenderField(basefields.ChoiceProfileField):
  13. fieldname = 'gender'
  14. label = _("Gender")
  15. choices = (
  16. ('', _('Not specified')),
  17. ('secret', _('Not telling')),
  18. ('f', _('Female')),
  19. ('f', _('Male')),
  20. )
  21. class WebsiteField(basefields.UrlProfileField):
  22. fieldname = 'website'
  23. label = _("Website")
  24. class SkypeHandleField(basefields.TextProfileField):
  25. fieldname = 'skype'
  26. label = _("Skype ID")
  27. class TwitterHandleField(basefields.SlugProfileField):
  28. fieldname = 'twitter'
  29. label = _("Twitter handle")
  30. help_text = _('Without leading "@" sign.')