예제 #1
0
파일: scenario.py 프로젝트: pkimber/old_cms
def default_scenario_cms():
    default_moderate_state()
    page = make_page('Home', 0)
    body = make_layout('Body')
    footer = make_layout('Footer')
    make_section(page, body)
    make_section(page, footer)
    page_info = make_page('Information', 1)
    make_section(page_info, body)
예제 #2
0
파일: service.py 프로젝트: pkimber/old_cms
def init_layout(name):
    """Create a layout if it doesn't already exist."""
    try:
        result = Layout.objects.get(slug=slugify(name))
    except Layout.DoesNotExist:
        result = make_layout(name)
    return result
예제 #3
0
 def setUp(self):
     default_moderate_state()
     page = make_page('home', 0)
     body = make_layout('body')
     self.section = make_section(page, body)