Exemplo n.º 1
0
 def _add_default_layout(self, blog):
     if blog.layouts.count() == 0:
         from_page = self.cleaned_data.get(
             'layout_page', self._get_default_layout_page(blog.site))
         article_layout = Layout()
         article_layout.from_page = from_page
         article_layout.content_object = blog
         article_layout.save()