コード例 #1
0
def index():
	page 		= Page('Vue.js tests!')
	graph 		= Graph_Dao()
	data 		= {'page' : page}

	page.addScript("dbQueries.js","gsearch")

	page.addBlockCenter(blocks.vue_test({'page': page, 'id': page.next_id()}))
	page.addBlockCenter(blocks.vue_app1({'page': page, 'id': page.next_id()}))

	page.addBlockRight(blocks.vue_form({'page': page, 'id': page.next_id()}))

	page.addBlockLeft(blocks.vue_form({'page': page, 'id': page.next_id()}))
	
	return page.render()
コード例 #2
0
def index():
    page = Page('GSearch!')
    graph = Graph_Dao()

    categories = graph.getCategories()
    print(categories)
    page.addScript("dbQueries.js", "gsearch")
    page.addScript("ajax.js")
    page.addScript("testAjax.js", "gsearch")

    page.addBlockCenter(blocks.testForm())
    page.addBlockCenter(
        blocks.test_paragraph({
            'page': page,
            'name': "Super Name!",
            'id': page.next_id()
        }))

    page.addBlockLeft(
        blocks.categoriesButtonList({
            'categories': categories,
            'page': page
        }))
    page.addBlockLeft(
        blocks.test_paragraph({
            'page': page,
            'name': "Super Name, le 2e!",
            'id': page.next_id()
        }))
    page.addBlockLeft(vue_blocks.vue_form({
        'page': page,
        'id': page.next_id()
    }))

    page.addBlockRight(blocks.button("Delete graph", "btn-danger", "buttonID"))
    page.addBlockRight(
        blocks.button("Create GSearch graph", "btn-primary", "gsearchButton"))
    page.addBlockRight(
        blocks.test_paragraph({
            'page': page,
            'name': "Super Name, le 3e!",
            'id': page.next_id()
        }))

    return page.render()