        from django.conf import settings
  
        def article_detail(request, article_id):
            try:
                a = Article.objects.get(id=article_id, sites__id__exact=settings.SITE_ID)
            except Article.DoesNotExist:
                raise Http404
            # ...
  
  .. _ljworld.com: http://www.ljworld.com/
 
</s> remove       from django.conf import settings
 </s> add       from django.contrib.sites.models import get_current_site </s> remove     from django.contrib.sites.models import Site
 </s> add     from django.contrib.sites.models import get_current_site </s> remove         current_site = Site.objects.get(id=settings.SITE_ID)
 </s> add         current_site = get_current_site(request) </s> remove     from django.conf import settings
    from django.contrib.sites.models import Site
 </s> add     from django.contrib.sites.models import get_current_site </s> remove         current_site = Site.objects.get_current()
 </s> add         current_site = get_current_site(request)
              a = Article.objects.get(id=article_id, sites__id__exact=get_current_site(request).id)
        from django.conf import settings
  
        def article_detail(request, article_id):
            try:
              a = Article.objects.get(id=article_id, sites__id__exact=get_current_site(request).id)
            except Article.DoesNotExist:
                raise Http404
            # ...
  
  .. _ljworld.com: http://www.ljworld.com/
keep keep keep keep replace keep keep keep keep keep
 Made more extensive use of get_current_site

Refs #15089 
docs/ref/contrib/sites.txt