예제 #1
0
파일: __main__.py 프로젝트: alecnunn/Ioun
def edit_page(title):
    page = database.get_page(title)
    if page:
        return template(pages.edit, page_title=page[0].replace('_', ' '), page_subtitle=page[1], checked=page[3], body=page[2], pages=database.get_pages(), css=pages.css)
    database.create_page(title)
    return template(pages.edit, page_title=title.replace('_', ' '), page_subtitle="", checked=1, pages=database.get_pages(), css=pages.css, body="")
예제 #2
0
def add_page_to_database(image_filename, page_url, page_content):
	from database import create_page
	create_page(page_url, image_filename=image_filename)