old_contents: # -*- coding: utf-8 -*-
  from __future__ import absolute_import, unicode_literals
  
  from django import template
  from django.conf import settings
  
  register = template.Library()
  
  # settings value
  @register.simple_tag
  def get_settings_value(name):
      return getattr(settings, name, "")
new_contents: # -*- coding: utf-8 -*-
  from __future__ import absolute_import, unicode_literals
  
  from django import template
  from django.conf import settings
  from django.contrib.auth import get_user_model
  
  from commonrepo.users.models import User as User
  
  register = template.Library()
  
  # settings value
  @register.simple_tag
  def get_settings_value(name):
      return getattr(settings, name, "")
  
  @register.simple_tag
  def get_user_followers_count(username):
      try:
          user = User.objects.get_by_natural_key(username)
      except DoesNotExist:
          return 0
  
      followers_count = user.followed_by.all().count()
  
      return followers_count
  
subject: 更新 template tags, 新增 tag get_user_followers_count 用來取得使用者的 followers 數量