def get_current_site(request):
 if Site._meta.installed:
  current_site = Site.objects.get_current()
 else:
  current_site = RequestSite(request)
 return current_site

def get_current_site ( request ) : if Site . _meta . installed : current_site = Site . objects . get_current ( ) else : current_site = RequestSite ( request ) return current_site
checks if contrib .