예제 #1
0
def main():
	service_entry = _utils.file2str('tmpl/services_entry.tmpl')
	page = _utils.file2str('tmpl/services_page.tmpl')
	services_list = _services.get_services_list()
	if len(services_list) < 1:
		page = page % {'service-list':conf.no_services_msg}
	else:
		services_html = ''
		for entry in services_list:
			services_html += service_entry % entry
		page = page % {'service-list':services_html}
	return page
예제 #2
0
def main():
    service_entry = _utils.file2str('tmpl/services_entry.tmpl')
    page = _utils.file2str('tmpl/services_page.tmpl')
    services_list = _services.get_services_list()
    if not services_list:
        page = page % {'service-list': conf.no_services_msg}
    else:
        services_html = ''
        for entry in services_list:
            services_html += service_entry % entry
        page = page % {'service-list': services_html}
    return page
예제 #3
0
파일: services.py 프로젝트: Byzantium/ByzPi
def main():
    service_entry = _utils.file2str(conf.services_directory_entry_template)
    page = _utils.file2str(conf.services_directory_page_template)
    services_list = _services.get_services_list()
    vals = conf.services_directory_template_dict.copy()
    if services_list and len(services_list) < 0:
        services_html = ''
        for entry in services_list:
            services_html += service_entry % entry
        vals['service-list'] = services_html
    page = page % vals
    return page
예제 #4
0
파일: services.py 프로젝트: wflk/ByzPi
def main():
    service_entry = _utils.file2str(conf.services_directory_entry_template)
    page = _utils.file2str(conf.services_directory_page_template)
    services_list = _services.get_services_list()
    vals = conf.services_directory_template_dict.copy()
    if services_list and len(services_list) < 0:
        services_html = ''
        for entry in services_list:
            services_html += service_entry % entry
        vals['service-list'] = services_html
    page = page % vals
    return page