+
{{ creator.name }}
+ {% if creator.get_avatar_url %}
+

+ {% else %}
+
暂无头像
+ {% endif %}
+
+{% endfor %}
+""")
+
+if __name__ == "__main__":
+ try:
+ test_avatar_display()
+ except Exception as e:
+ print(f"测试出错: {e}")
+ print("请确保:")
+ print("1. 已运行 python manage.py migrate")
+ print("2. 数据库中有达人数据")
+ print("3. media/avatars/ 目录存在")
\ No newline at end of file