• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python base.render函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中sparta.lib.base.render函数的典型用法代码示例。如果您正苦于以下问题:Python render函数的具体用法?Python render怎么用?Python render使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了render函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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)
开发者ID:onetera,项目名称:sp,代码行数:28,代码来源:shot.py


示例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")
开发者ID:onetera,项目名称:sp,代码行数:31,代码来源:private.py


示例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")
开发者ID:onetera,项目名称:sp,代码行数:28,代码来源:board.py


示例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")
开发者ID:onetera,项目名称:sp,代码行数:8,代码来源:statis.py


示例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")
开发者ID:onetera,项目名称:sp,代码行数:8,代码来源:take.py


示例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")
开发者ID:onetera,项目名称:sp,代码行数:8,代码来源:test.py


示例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")
开发者ID:onetera,项目名称:sp,代码行数:8,代码来源:help.py


示例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")
开发者ID:onetera,项目名称:sp,代码行数:8,代码来源:board.py


示例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");		
开发者ID:onetera,项目名称:sp,代码行数:8,代码来源:manage_external_confirm.py


示例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");
开发者ID:onetera,项目名称:sp,代码行数:8,代码来源:manage_external_confirm.py


示例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")
开发者ID:onetera,项目名称:sp,代码行数:9,代码来源:login.py


示例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");
开发者ID:onetera,项目名称:sp,代码行数:9,代码来源:manage_resource.py


示例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")
开发者ID:onetera,项目名称:sp,代码行数:9,代码来源:admin.py


示例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")
开发者ID:onetera,项目名称:sp,代码行数:13,代码来源:admin_sparta.py


示例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");
开发者ID:onetera,项目名称:sp,代码行数:14,代码来源:manage_resource.py


示例16: view2

	def view2(self, id):
		
		try:
			# 단순히 Get해서 레코드를 가져오기 보다는 MAttr까지 가져와야하니까~~ 좀더 신중하게
			
			viewColStr = "Take.IDX,Take.Name,Take.Code,Take_Stat.Color,Take_Stat.Name,Take_Type.Name," \
				 "Take.Confirmer,Take.Content,Take.Version,Take.Preview,Take.SceneFile,Take.Files,Take.CreateBy,Take.CreateDate," \
				 "Seq.Name,Shot.Name,Task.Name,Shot.IDX,Task.IDX,Seq.IDX"
				   
			row = Archive(self.archiveName).View(id, viewColStr)
			
			for (k,v) in row.items():
				if (type(v) == datetime.datetime) : v = v.strftime("%Y-%m-%d %H:%M")
				
				if k == "Take_Files" and v:
					fList = json.loads( v, "utf8" )
					textOut = ""
					
					for nFile in fList:
						tempPath = seqstyle.convertSequenceStyle(nFile["Name"], "DJV")
						pPath = sv.Convert.FixPath(nFile["Path"]+"/"+tempPath)
						
						textOut += """<a href="%s">%s</a><br/>""" % (pPath, nFile["Name"])
						
					c.Take_Files = HTML( textOut )
			
				elif k == "Take_SceneFile" and v:
					scenePath = os.path.split(v)
					sceneFile = scenePath[1]
					scenePath = sv.Convert.FixPath(scenePath[0])
					
					c.Take_SceneFile = HTML( """<a target="_new" href="%s">%s</a>""" % (scenePath,sceneFile) )
					
				elif k == "Take_Preview" and v:
					movFile = os.path.split(v)[1]
					movPath = v #sv.Convert.FixPath(v)	#임시픽스
					
					c.Take_Preview = HTML( """<a target="_new" href="%s" rexxl="lightbox">%s</a>""" % (movPath,movFile) )
					
				else:
					setattr(c, k.replace(".","_") , HTML(v) )
			 
			c.PNID = "PN_%s_%s" % (self.archiveName, id)	# 다른 페이지에서 아직 쓴다.
			c.IDX  = id
			return render("%s_View.html" % self.archiveName)
		
		except Exception as err:
			traceback.print_exc(file=sys.stdout)
			return str(err)
开发者ID:onetera,项目名称:sp,代码行数:49,代码来源:take.py


示例17: view_all_resource_schedule_overview

	def view_all_resource_schedule_overview(self, id=None):

		#모든 인력의 목록을 JSON 으로 리턴해주는 주소
		c.resource_list_data_url = u"/%s/get_resource_data_as_json"%(MODULE_NAME);

		#모든 인력의 작업 일정 정보를 JSON 으로 리턴해주는 주소
		c.resource_schedule_data_url = u"/%s/get_resource_schedule_data_as_json"%(MODULE_NAME);
		
		#특정 프로젝트에 대한 정보만 얻고자할 경
		if (id is not None):
			c.resource_schedule_data_url += u"/%s" % (id);
			c.resource_list_data_url += u"/%s" % (id);
			
		#작업에 관한 정보를 변경시킬때 사용할 주소
		c.move_task_url = u"/%s/move_task"%(MODULE_NAME);

		return render("view_all_resource_schedule_overview.html");
开发者ID:onetera,项目名称:sp,代码行数:17,代码来源:manage_resource.py


示例18: index

	def index(self):
		
		#b = sv.Login.Check()
		c.UserID   = session["UserID"]
		c.UserName = session["UserName"]
			
		c.firstLoadPage  = "/schedule/schedules/"
		c.firstLoadTitle = u"진행중 작업 스케쥴"
		c.leftAccordPanels = """[{title:"Navigation",url:"/schedule/menu/",rootText:"All Tasks",iconCls:"icon-folder-go"}]"""
	
		# 메일 아이콘 처리		  
		CntNonRead = Archive.RunQuery("select count(IDX) from Message where SendTo = :id and IsRead =0", id=session["UserID"])[0][0]
		if CntNonRead > 0:
			c.MailIcon = "zzok_on.gif"
		else:
			c.MailIcon = "zzok_off.gif"  
		
		return render("frame.html")    
开发者ID:onetera,项目名称:sp,代码行数:18,代码来源:schedule.py


示例19: view2

    def view2(self, id, id2=None):
        from genshi.core import escape  # [SH] Added

        try:
            row = Archive(self.archiveName).View(id, self.viewColStr)
            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)  # [SH] Added
                setattr(c, k.replace(".", "_"), HTML(v))

            c.PNID = "PN_%s_%s" % (self.archiveName, id)  # 다른 페이지에서 아직 쓴다.
            c.IDX = id

            return render("%s_View.html" % self.archiveName)

        except Exception as err:
            traceback.print_exc(file=sys.stdout)
            return str(err)
开发者ID:onetera,项目名称:sp,代码行数:20,代码来源:ArchivePages.py


示例20: view2

	def view2(self, id=None):
		
		try:
			# 단순히 Get해서 레코드를 가져오기 보다는 MAttr까지 가져와야하니까~~ 좀더 신중하게
			viewColStr = "Task.IDX,Task.Name,Task.Code,Task.Parent1,Task.Parent2,Task.Parent3,Task.StatCode,Task.TypeCode," \
						 "Project.Name,Project.Code,Seq.Name,Seq.Code,Shot.Name,Shot.Code,Task.Thumb"
			
			row = Archive(self.archiveName).View(id, viewColStr)
						
			for (k,v) in row.items():
				if (type(v) == datetime.datetime) : v = v.strftime("%Y-%m-%d %H:%M")
				setattr(c, k.replace(".","_") , HTML(v) )
			
			c.IDX  = id
			
			return render("%s_View.html" % self.archiveName)
		
		except Exception as err:
			traceback.print_exc(file=sys.stdout)
			return str(err)
开发者ID:onetera,项目名称:sp,代码行数:20,代码来源:task.py



注:本文中的sparta.lib.base.render函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python extent.create函数代码示例发布时间:2022-05-27
下一篇:
Python sparsesvd.sparsesvd函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap