25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

models.py 239 B

123456789101112
  1. import hashlib
  2. from django.contrib.auth.models import User as BaseUser
  3. class User(BaseUser):
  4. @property
  5. def gravatar(self):
  6. return hashlib.md5(self.email.encode('utf-8')).hexdigest()
  7. class Meta:
  8. proxy = True