2 >>> from django.contrib.sites.models import Site
3 >>> from django.conf import settings
4 >>> Site(id=settings.SITE_ID, domain="example.com", name="example.com").save()
6 >>> # Make sure that get_current() does not return a deleted Site object.
7 >>> s = Site.objects.get_current()
8 >>> isinstance(s, Site)
12 >>> Site.objects.get_current()
13 Traceback (most recent call last):
15 DoesNotExist: Site matching query does not exist.