Fixes an issue where the organization home page would throw a 505 when no projects...
[Melange.git] / app / django / contrib / sites / tests.py
blobb607f021d5d168e9990ebdaf2ef3313802fae062
1 """
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)
9 True
11 >>> s.delete()
12 >>> Site.objects.get_current()
13 Traceback (most recent call last):
14 ...
15 DoesNotExist: Site matching query does not exist.
16 """