当前位置: 首页>>代码示例>>Python>>正文


Python BrowserView.__init__方法代码示例

本文整理汇总了Python中Products.Five.browser.BrowserView.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python BrowserView.__init__方法的具体用法?Python BrowserView.__init__怎么用?Python BrowserView.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Products.Five.browser.BrowserView的用法示例。


在下文中一共展示了BrowserView.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from Products.Five.browser import BrowserView [as 别名]
# 或者: from Products.Five.browser.BrowserView import __init__ [as 别名]
 def __init__(self, context, request):
     BrowserView.__init__(self, context, request)
     self.title = _("Load Setup Data")
     self.description = _("Please.")
     self.text = _("")
     # dependencies to resolve
     self.deferred = {}
开发者ID:lemoene,项目名称:Bika-LIMS,代码行数:9,代码来源:load_setup_data.py

示例2: __init__

# 需要导入模块: from Products.Five.browser import BrowserView [as 别名]
# 或者: from Products.Five.browser.BrowserView import __init__ [as 别名]
 def __init__(self, context, request):
     BrowserView.__init__(self, context, request)
     self.catalog = getToolByName(self.context, 'portal_catalog')
     self.wftool = getToolByName(self.context, 'portal_workflow')
     pprops = getToolByName(self.context, 'portal_properties')
     self.properties = pprops.realestatebroker_properties
     self.plone_utils = getToolByName(self.context, 'plone_utils')
开发者ID:collective,项目名称:collective.realestatebroker,代码行数:9,代码来源:base.py

示例3: __init__

# 需要导入模块: from Products.Five.browser import BrowserView [as 别名]
# 或者: from Products.Five.browser.BrowserView import __init__ [as 别名]
    def __init__(self, context, request):
        """ set up a few convenience object attributes """

        BrowserView.__init__(self, context, request)

        self.catalog = getToolByName(self.context, 'portal_catalog')
        self.portal_url = getToolByName(self.context, 'portal_url')()
        self.context_path = '/'.join(self.context.getPhysicalPath())
开发者ID:RedTurtle,项目名称:Products.PloneHelpCenter,代码行数:10,代码来源:helpcenter.py

示例4: __init__

# 需要导入模块: from Products.Five.browser import BrowserView [as 别名]
# 或者: from Products.Five.browser.BrowserView import __init__ [as 别名]
 def __init__(self, context, request):
     BrowserView.__init__(self, context, request)
     
     self.membership = getToolByName(self.context, 'portal_membership')
     self.catalog = getToolByName(self.context, 'portal_catalog')
     self.portal_url = getToolByName(self.context, 'portal_url')()
     
     self.context_path = '/'.join(self.context.getPhysicalPath())
开发者ID:CGTIC,项目名称:Plone_SP,代码行数:10,代码来源:category.py

示例5: __init__

# 需要导入模块: from Products.Five.browser import BrowserView [as 别名]
# 或者: from Products.Five.browser.BrowserView import __init__ [as 别名]
    def __init__(self, context, request):
        BrowserView.__init__(self, context, request)
        self.title = _("Load Setup Data")
        self.description = _("Submit a valid Open XML (.XLSX) file containing Bika setup records to continue.")
        # dependencies to resolve
        self.deferred = {}

        self.request.set("disable_border", 1)
开发者ID:socheathly,项目名称:Bika-LIMS,代码行数:10,代码来源:load_setup_data.py

示例6: __init__

# 需要导入模块: from Products.Five.browser import BrowserView [as 别名]
# 或者: from Products.Five.browser.BrowserView import __init__ [as 别名]
    def __init__(self, context, request):
        """ set up a few convenience object attributes """

        BrowserView.__init__(self, context, request)

        self.catalog = getToolByName(self.context, "portal_catalog")
        self.actionTool = getToolByName(self.context, "portal_actions")
        self.portal_url = getToolByName(self.context, "portal_url")()
        self.context_path = "/".join(self.context.getPhysicalPath())
开发者ID:pingviini,项目名称:Products.PloneHelpCenter,代码行数:11,代码来源:phc_attachments.py

示例7: __init__

# 需要导入模块: from Products.Five.browser import BrowserView [as 别名]
# 或者: from Products.Five.browser.BrowserView import __init__ [as 别名]
 def __init__(self, context, request):
     BrowserView.__init__(self, context, request)
     self.acl_users = getToolByName(context, 'acl_users')
     self.sgm_data = api.portal.get_registry_record(
         'sgm_data', interface=ISimpleGroupManagementSettings
     )
     self.never_used_groups = api.portal.get_registry_record(
         'sgm_never_managed_groups', interface=ISimpleGroupManagementSettings
     )
开发者ID:keul,项目名称:Products.SimpleGroupsManagement,代码行数:11,代码来源:simple_groups_management.py

示例8: __init__

# 需要导入模块: from Products.Five.browser import BrowserView [as 别名]
# 或者: from Products.Five.browser.BrowserView import __init__ [as 别名]
 def __init__(self, context, request):
     """Override BrowserView's __init__ to create the ListUsersForm
     for later use.
     """
     BrowserView.__init__(self, context, request)
     self.form_wrapper = ListUsersFormWrapper(self.context, self.request)
     self.form_wrapper.form_instance = ListUsersForm(
         self.context, self.request
     )
开发者ID:chaoflownet,项目名称:collective.listusers,代码行数:11,代码来源:listusers.py

示例9: __init__

# 需要导入模块: from Products.Five.browser import BrowserView [as 别名]
# 或者: from Products.Five.browser.BrowserView import __init__ [as 别名]
 def __init__(self, context, request):
     BrowserView.__init__(self, context, request)
     self.saveRequest = {}
     self.addRequest = {}
     self.confirmMessage = ''
     # will be {action_id: {data}, ...}
     self.errs = {}
     self.portal_actions = getToolByName(context, 'portal_actions')
     self.translation_service = getToolByName(context, 'translation_service')
     self.plone_utils = getToolByName(context, 'plone_utils')
开发者ID:RedTurtle,项目名称:collective.portaltabs,代码行数:12,代码来源:manage_portaltabs_view.py

示例10: __init__

# 需要导入模块: from Products.Five.browser import BrowserView [as 别名]
# 或者: from Products.Five.browser.BrowserView import __init__ [as 别名]
 def __init__(self, context, request):
     ''' '''
     BrowserView.__init__(self, context, request)
     SequenceTable.__init__(self, context, request)
     self.criteria = ICriteria(self.context)
     view = queryMultiAdapter((self.context, self.request), name=u'faceted_query')
     self.query = view.criteria()
     self.sorting_criterion_name = self._sortingCriterionName()
     # convenience
     self.portal = api.portal.get()
     self.portal_url = self.portal.absolute_url()
开发者ID:collective,项目名称:collective.eeafaceted.z3ctable,代码行数:13,代码来源:views.py

示例11: __init__

# 需要导入模块: from Products.Five.browser import BrowserView [as 别名]
# 或者: from Products.Five.browser.BrowserView import __init__ [as 别名]
 def __init__(self, context, request):
     BrowserView.__init__(self, context, request)
     #dependencies
     self.plone_tools_loaded = False
     self.portal_url = None
     self.membrane_tool = None
     self.membership = None
     self.memberid = None
     self.member = None
     self.url = None
     self.fullname = None
开发者ID:collective,项目名称:collective.rcse,代码行数:13,代码来源:person_view.py

示例12: __init__

# 需要导入模块: from Products.Five.browser import BrowserView [as 别名]
# 或者: from Products.Five.browser.BrowserView import __init__ [as 别名]
	def __init__(self, *args, **kwargs):
		""" Get the virtual path of the requested file or folder from
		the GET form.

		Sets the following variables:

			self.basepath:
				The path configured by the manager for this
				FilesystemFolder.
			self.requestedPath:
				The path requested by the user.
			self.requestedDir:
				The directory part of the path requested by the user.
			self.requestedDir:
			self.basename:
				The last component of self.requestedPath.
			self.dirpath:
				The absolute path to the requested directory on disk.
			self.filepath:
				The absolute path to the requested file on disk. Is None if the
				requested object is a directory.
		"""
		BrowserView.__init__(self, *args, **kwargs)
		self.ctx = aq_inner(self.context)

		self.basepath = self.ctx.getPath()
		requestedPath = self.request.form.get("path", "")
		if requestedPath:
			basename = requestedPath.split("/")[-1]
			path = join(self.basepath, requestedPath.replace("/", sep))
			if not exists(path):
				IStatusMessage(self.request).addStatusMessage(
					"Invalid path: %s. Redirected to rootdirectory." % requestedPath,
					type='error')
				path = self.basepath
				requestedPath = ""
		else:
			path = self.basepath
			basename = self.ctx.Title()
		self.requestedPath = requestedPath


		if path.endswith("/"):
			path = path[:-1]
		if isdir(path):
			self.filepath = None
			self.dirpath = path
		else:
			self.filepath = path
			self.dirpath = dirname(path)

		requestedDir = "/".join(requestedPath.split("/")[:-1])
		FsItem.__init__(self, requestedDir, basename, isDir=isdir(path))
开发者ID:espenak,项目名称:fui.fsbrowse,代码行数:55,代码来源:fsfile_base.py

示例13: __init__

# 需要导入模块: from Products.Five.browser import BrowserView [as 别名]
# 或者: from Products.Five.browser.BrowserView import __init__ [as 别名]
    def __init__(self, context, request, form):

        BrowserView.__init__(self, context, request)
        self.form = form

        # We may have data already...
        try:
            self.form.data = self.form.submission.retrieve(form, self.context)
        except:
            for key in context.formdefaults.keys():
                try:
                    self.form.data.getField(key).value = context.formdefaults[key]
                except:
                    pass
开发者ID:kcleong,项目名称:w20e.forms,代码行数:16,代码来源:view.py

示例14: __init__

# 需要导入模块: from Products.Five.browser import BrowserView [as 别名]
# 或者: from Products.Five.browser.BrowserView import __init__ [as 别名]
    def __init__(self, context, request):

        BrowserView.__init__(self, context, request)
        # del portlet de calendar
        calendar_render.update(self)

        self.utils = getMultiAdapter((self.context, self.request), name=u"upc.genweb.utils")
        self.now = localtime()

        # del portlet de events
        portal_state = getMultiAdapter((self.context, self.request), name=u"plone_portal_state")
        self.portal_url = portal_state.portal_url()
        self.portal = portal_state.portal()

        self.have_events_folder = "esdeveniments" in self.portal.objectIds()
开发者ID:UPCnet,项目名称:upc.genwebupctheme,代码行数:17,代码来源:boxletsviews.py

示例15: __init__

# 需要导入模块: from Products.Five.browser import BrowserView [as 别名]
# 或者: from Products.Five.browser.BrowserView import __init__ [as 别名]
    def __init__(self, context, request):
        BrowserView.__init__(self, context, request)
        self.icon = "++resource++bika.lims.images/referencesample_big.png"
        self.TimeOrDate = TimeOrDate
        rc = getToolByName(context, REFERENCE_CATALOG)

        self.results = {} # {category_title: listofdicts}
        for r in context.getReferenceResults():
            service = rc.lookupObject(r['uid'])
            cat = service.getCategory().Title()
            if cat not in self.results:
                self.results[cat] = []
            r['service'] = service
            self.results[cat].append(r)
        self.categories = self.results.keys()
        self.categories.sort()
开发者ID:cheslip,项目名称:Bika-LIMS,代码行数:18,代码来源:referencesample.py


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