Esempio n. 1
0
    def static_page_names(self):
        from treemap.models import StaticPage  # prevent circular import

        built_in_names = StaticPage.built_in_names()

        custom_names = [page.name for page in StaticPage.objects.filter(instance=self).exclude(name__in=built_in_names)]

        names = built_in_names + custom_names

        return names
Esempio n. 2
0
def static_page(request, instance, page):
    static_page = StaticPage.get_or_new(instance, page)

    return {'content': static_page.content,
            'title': static_page.name}
Esempio n. 3
0
File: misc.py Progetto: gapb/OTM2
def static_page(request, instance, page):
    static_page = StaticPage.get_or_new(instance, page)

    return {'content': static_page.content,
            'title': static_page.name}