<s> from __future__ import absolute_import , unicode_literals <EOL> from django_medusa . renderers import StaticSiteRenderer <EOL> from wagtail . wagtailcore . models import Site <EOL> from wagtail . wagtaildocs . models import get_document_model <EOL> class PageRenderer ( StaticSiteRenderer ) : <EOL> def get_paths ( self ) : <EOL> site = Site . objects . filter ( is_default_site = True ) . first ( ) <EOL> if site is None : <EOL> return [ ] <EOL> return site . root_page . get_static_site_paths ( ) <EOL> class DocumentRenderer ( StaticSiteRenderer ) : <EOL> def get_paths ( self ) : <EOL> Document = get_document_model ( ) <EOL> return ( doc . url for doc in Document . objects . all ( ) ) <EOL> renderers = [ PageRenderer , DocumentRenderer ] </s>
