예제 #1
0
    def setUp(self):
        p = Page()
        p.title = 'Root Page'
        p.slug = 'root-page'
        p.depth = 0
        p.save()

        s = Site()
        s.root_page = p
        s.is_default_site = True
        s.hostname = 'localhost'
        s.port = 80
        s.save()