本文整理汇总了Python中sparta.lib.base.render函数的典型用法代码示例。如果您正苦于以下问题:Python render函数的具体用法?Python render怎么用?Python render使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了render函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: view2
def view2(self, id):
try:
# 단순히 Get해서 레코드를 가져오기 보다는 MAttr까지 가져와야하니까~~ 좀더 신중하게
viewColStr = "Shot.IDX,Shot.Code,Shot.ViewTemplate,Shot.Name,Shot.TypeCode,Shot.StatCode,Shot.Content," \
"Shot.Thumb,Shot.Preview,Shot.CreateDate,Shot.Parent1,Shot.Parent2,Project.Name,Project.Code,Seq.Name,Seq.Code"
row = Archive(self.archiveName).View(id, viewColStr)
if (row["Shot_ViewTemplate"] != None) and (row["Shot_ViewTemplate"] != ""):
TemplateSkin = row["Shot_ViewTemplate"]
elif gTable["Shot_Type"][row["Shot_TypeCode"]]["ViewTemplate"] != None:
TemplateSkin = gTable["Shot_Type"][row["Shot_TypeCode"]]["ViewTemplate"]
else:
TemplateSkin = "%s_View.html" % self.archiveName
for (k,v) in row.items():
if (type(v) == datetime.datetime) : v = v.strftime("%Y-%m-%d %H:%M")
if (type(v) in (str, unicode)): v = escape(v)
setattr(c, k.replace(".","_") , HTML(v) )
c.IDX = id
return render(TemplateSkin)
except Exception as err:
traceback.print_exc(file=sys.stdout)
return str(err)
示例2: schedules
def schedules(self):
clist = "Task.IDX,Task.Name,Task.TypeCode,Task_Type.Name,Task.StatCode,Task_Stat.Name,Task_Stat.Color,Task.EstStart,Task.EstDue,Shot.IDX,Shot.Name"
sort1 = "Task.EstStart ASC"
query1 = "Task.StatCode == ACT,Task.AssignUser == " + session["UserID"]
minDate = datetime.datetime.now()
maxDate = datetime.datetime.now()
#[4, "Ted", "Personal Returns", "2/3/2009 17:00:00", "2/9/2009 18:30:00", 1]
# 다른걸 이용하세요! outMode="raw"
RDB = ArchiveJSON(Archive="Task", Columns=clist, Sort=sort1, Query=query1).renderData2()
outData = []
for row in RDB[1]:
rowData = '[%s,"%s","%s","%s","%s",0]'
if minDate > row["Task_EstStart"]:
minDate = row["Task_EstStart"]
if maxDate < row["Task_EstDue"]:
maxDate = row["Task_EstDue"]
outData.append(rowData % (row["Task_IDX"], row["Task_Name"], row["Task_Name"], row["Task_EstStart"].strftime("%m/%d/%Y 00:00:00"), row["Task_EstDue"].strftime("%m/%d/%Y 00:00:00")) )
minDate = minDate - datetime.timedelta(1)
maxDate = maxDate + datetime.timedelta(1)
c.outData = ",".join(outData)
c.minDate = "%s/%s/%s 00:00:00" % (minDate.month, minDate.day, minDate.year)
c.maxDate = "%s/%s/%s 23:59:59" % (maxDate.month, maxDate.day, maxDate.year)
return render("Private_Schedule.html")
示例3: main
def main(self):
""" 포럼 메인에 미니게시판 출력 """
if CheckNotAdmin():
accLevel = session["UserType"]
accField = "AdminBoard.AccessView"
else:
accLevel = None
accField = None
rx = Archive("AdminBoard").getRecords("AdminBoard.ViewMode == 2", "BCode,BName,BType,ViewMode", "AdminBoard.SortNumber ASC", accField=accField, accLevel=accLevel )
bList = "";tList = [];cList = []
for board1 in rx:
boardtable = board1["BCode"]
boardaddr = "/board/list/%s" % boardtable
boardname = board1["BName"]
bList = addStr(bList, "[%s]" %(self.mini_list(boardtable, boardname)))
tList.append("'"+boardname+"'")
cList.append("'"+boardtable+"'")
c.BoardNames = HTML("var BoardName = [%s];" % (",".join(tList)) )
c.BoardCodes = HTML("var BoardCode = [%s];" % (",".join(cList)) )
c.BoardList = HTML( "var BoardData = [%s];" % (bList) )
return render("Board_Main.html")
示例4: index
def index(self):
autoFrameData(c, __name__)
c.firstLoadPage = "/statis/proj_list/"
c.firstLoadTitle = u"프로젝트 현황"
c.leftAccordPanels = """[{title:"Statistics",url:"/statis/menu/",rootText:"All Takes",iconCls:"icon-workspace",disableEdit:true}]"""
return render("frame.html")
示例5: index
def index(self):
autoFrameData(c, __name__ )
c.firstLoadPage = "/lister/list2/take2ready/"
c.firstLoadTitle = u"승인대기중 작업물"
c.leftAccordPanels = """[{title:"Navigation",url:"/take/menu/",rootText:"All Takes",iconCls:"icon-workspace",disableEdit:true}]"""
return render("frame.html")
示例6: index
def index(self):
autoFrameData(c, "/test/")
c.firstLoadPage = "/test/main/"
c.firstLoadTitle = "My Pages"
c.leftAccordPanels = """[{title:"Navigation",url:"/private/menu/",rootText:"My Pages2",iconCls:"icon-workspace",disableEdit:true},{title:"Settings",url:"/private/menu2/",rootText:"settings",iconCls:"icon-folder-wrench",disableEdit:true}]"""
return render("frame.html")
示例7: index
def index(self):
autoFrameData(c, __name__)
c.firstLoadPage = "/help/main/"
c.firstLoadTitle = "Help Main"
c.leftAccordPanels = """[{title:"Navigation", iconCls:"icon-workspace", url:"/help/menu/", place:"HELP" }]"""
# 헬프 아이콘
return render("frame.html")
示例8: index
def index(self):
autoFrameData(c, __name__)
c.firstLoadPage = "/board/main/"
c.firstLoadTitle = "Forum"
c.leftAccordPanels = """[{title:"Navigation",url:"/board/menu/", rootText:"Boards", iconCls:"icon-workspace",disableEdit:true}]"""
return render("frame.html")
示例9: view_shots_need_confirm_for_project
def view_shots_need_confirm_for_project(self):
#컨펌할 샷 데이터를 로드하는 주소
c.url_shot_list_need_extern_confirm = url(controller=MODULE_NAME, action="get_shots_that_need_confirm_for_project", id=75);
#한페이지에 표시할 샷의 수
c.shot_count_per_page = 20;
return render("view_shots_need_confirm_for_project.html");
示例10: index
def index(self):
#스파르타 상단의 사용자 정보에 사용자 아이디와 메일 수신 아이콘 처리 및 로그인 검사하는 함수
autoFrameData(c, "/"+MODULE_NAME);
c.firstLoadPage = url(controller=MODULE_NAME, action="view_shots_need_confirm_for_project")
c.firstLoadTitle = u"[우샤] 감독 리뷰"
c.leftAccordPanels = u"""[{title:"Navigation",url:"/%s/menu",rootText:"All Tasks",iconCls:"icon-folder-go"}]"""%(MODULE_NAME)
return render("frame_for_external_confirm.html");
示例11: index
def index(self, msg=None):
c.MSG = msg
if "preurl" in request.params:
c.preurl = request.params["preurl"]
else:
c.preurl = ""
return render("login.html")
示例12: index
def index(self):
#스파르타 상단의 사용자 정보에 사용자 아이디와 메일 수신 아이콘 처리 및 로그인 검사하는 함수
autoFrameData(c, "/"+MODULE_NAME);
#c.firstLoadPage = MODULE_NAME+"/view_all_resource_schedule_overview/"
c.firstLoadPage = url(controller=MODULE_NAME, action="view_resource_role")
c.firstLoadTitle = u"전체 인력 현황"
c.leftAccordPanels = u"""[{title:"Navigation",url:"/%s/menu",rootText:"All Tasks",iconCls:"icon-folder-go"}]"""%(MODULE_NAME)
return render("frame.html");
示例13: index
def index(self):
autoFrameData(c, __name__)
if CheckNotAdmin(): return "<script>alert('관리자만 접근할수 있습니다.');history.go(-1)</script>"
c.firstLoadPage = "/admin/main/"
c.firstLoadTitle = "Admin"
c.leftAccordPanels = """[{title:"Navigation",url:"/admin/menu/",rootText:"Boards",iconCls:"icon-workspace", disableEdit:true}]"""
return render("frame.html")
示例14: sp1opt
def sp1opt(self):
#[TODO] 관리자만 접근하게
c.topTitle1 = gTable["Config"]["SPARTA_TOPTITLE"][1]
c.topTitle2 = gTable["Config"]["SPARTA_TOPTITLE"][2]
c.brwTitle = gTable["Config"]["SPARTA_BRWTITLE"][1]
c.ownComNameKr = gTable["Config"]["OWNCOMNAMEKR"][1]
c.ownComNameEng = gTable["Config"]["OWNCOMNAMEENG"][1]
c.ownComPhone = gTable["Config"]["OWNCOMPHONE"][1]
c.ownComFax = gTable["Config"]["OWNCOMFAX"][1]
c.ownComAddr = gTable["Config"]["OWNCOMADDR"][1]
return render("AdminSparta_Options1.html")
示例15: view_resource_role
def view_resource_role(self, id=None):
#인력별 데이터를 제공하는 주소
c.data_url = u"/%s/get_resource_role_data_as_json" % (MODULE_NAME);
if (id is not None):
c.data_url += u"/%s" % (id);
c.role_columns, c.role_data_fields = self.get_resource_column_data_as_string();
if (request.params.has_key("project_id_list")):
c.project_id_list = request.params["project_id_list"];
else:
c.project_id_list = "[]";
return render("view_resource_role.html");