new_template.add_binary(binary.get_id()) except IOError, e: errorlog.append({'severity':0, 'type':'PageFile', 'msg':'File seems broken static/'+bin_filename}) #read general.css into CSSPropertysets general_csspropertyset.store() new_template.store() cleanup(temp_installpath) #create a defaultview if there isnt View.create_default_view() if release_maintenance_mode: Core().deactivate_maintenance_mode() return errorlog @classmethod def is_template_installed(cls): """ checks whether there is a template installed """ db = Database() stmnt = "SELECT COUNT(*) AS AMNT FROM TEMPLATE_INFO ;" cur = db.query(stmnt)