Skip to content

Commit

Permalink
use gravatar.com
Browse files Browse the repository at this point in the history
  • Loading branch information
keakon committed Jan 4, 2024
1 parent 9253858 commit 2792278
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doodle/core/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_by_emails(cls, emails):
return {}

def get_avatar(self):
return '//gravatar.cn/avatar/' + md5(self.email).hexdigest()
return '//gravatar.com/avatar/' + md5(self.email).hexdigest()

def is_admin(self):
return self.id == CONFIG.ADMIN_USER_ID
Expand Down
2 changes: 1 addition & 1 deletion doodle/templates/web/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<section id="content" class="block">
<form action="" method="post" id="profileform">
<p>账号邮箱:#{user.email}</p>
<p>头像(可在 <a href="http://www.gravatar.cn/">gravatar</a> 设置):<img src="#{user.get_avatar()}?s=24&amp;d=monsterid" alt="avatar"/></p>
<p>头像(可在 <a href="http://www.gravatar.com/">gravatar</a> 设置):<img src="#{user.get_avatar()}?s=24&amp;d=monsterid" alt="avatar"/></p>
<p>
<label for="name">用户名<small>(必填)</small></label><br/>
<input type="text" name="name" id="name" value="${user.name}" size="50" maxlength="15" tabindex="1"/>
Expand Down

0 comments on commit 2792278

Please sign in to comment.