rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
, None, max_age_secs, 0, 0, 0 ) | , None, max_age_secs, 0, 0, 0, '' ) | def _makeOneWithPolicies( self ): |
if getattr(self, 'content_type', None) is None: | if getattr(self, 'content_type', 'text/html') == 'text/html': | def _readFile(self, reparse): fp = expandpath(self._filepath) file = open(fp, 'r') # not 'rb', as this is a text file! try: data = file.read() finally: file.close() |
if self.state_email[k] != v: | current_setting = self.state_email.get(k, None) if ( ((not current_setting) and v) or (current_setting and (current_setting != v)) ): | def edit(self, title=None, description=None, abbrev=None, email=None, managers=None, supporters=None, dispatching=None, participation=None, state_email=None, topics=None, classifications=None, importances=None, version_info_spiel=None): |
return iter(self) | return self | def __iter__(self): return iter(self) |
def unlock(self): | def unlock(self, interactive=1): | def unlock(self): """Remove webdav lock from edited zope object""" if not hasattr(self, 'lock_token'): return 0 headers = {'Lock-Token':self.lock_token} response = self.zopeRequest('UNLOCK', headers) if response.status / 100 != 2: # Captain, she's still locked! if self.askRetryAfterError(response, 'Unlock request fai... |
if response.status / 100 != 2: | if interactive and response.status / 100 != 2: | def unlock(self): """Remove webdav lock from edited zope object""" if not hasattr(self, 'lock_token'): return 0 headers = {'Lock-Token':self.lock_token} response = self.zopeRequest('UNLOCK', headers) if response.status / 100 != 2: # Captain, she's still locked! if self.askRetryAfterError(response, 'Unlock request fai... |
self.ZCacheable_set(result) | self.ZCacheable_set(r) | def __call__(self, client=None, REQUEST={}, RESPONSE=None, **kw): """Render the document given a client object, REQUEST mapping, Response, and key word arguments.""" |
err = sys.exc_info() return "Email notice error: '%s'" % str(err[1]) | return "Email notice error: '%s'" % str(sys.exc_info()[1]) | def _send_update_notice(self, action, actor, orig_status=None, additions=None, removals=None, file=None, fileid=None, lower=string.lower): """Send email notification about issue event to relevant parties.""" |
return _checkPermission('Add Portal Member', self.aq_inner.aq_parent) | return _checkPermission(AddPortalMember, self.aq_inner.aq_parent) | def isRegistrationAllowed(self, REQUEST): '''Returns a boolean value indicating whether the user is allowed to add a member to the portal. ''' return _checkPermission('Add Portal Member', self.aq_inner.aq_parent) |
URL = '/enumerating/noone/manage_propertiesForm' | URL = '//noone/manage_propertiesForm' | def test_enumerateGroups_exact_one( self ): |
del obj.syndication_information | obj._delObject('syndication_information') | def disableSyndication(self, obj): """ Disable syndication for the obj; and remove it. """ syInfo = getattr(obj, 'syndication_information', None) if syInfo is not None: del obj.syndication_information else: raise 'This object does not have Syndication Information' |
dir = package_home( globals() ) if dir.endswith('__main__'): dir = dir[:-15] else: dir = dir[:-6] _file = join(dir, 'skins', 'zpt_content', 'source_html.pt') | dir = abspath( dirname(utils.__file__) ) _file = path_join(dir, 'skins', 'zpt_content', 'source_html.pt') | def testHTML( self ): self.REQUEST['BODY']=BASIC_HTML |
security.declarePrivate('manage_beforeDelete') | security.declarePrivate('manage_afterAdd') | def SearchableText(self): """ SeachableText is used for full text seraches of a portal. It should return a concatenation of all useful text. """ return "%s %s" % (self.title, self.description) |
def __init__(self, file, __name__): DTMLDocument.__init__(self, file, mapping=None, __name__=__name__) | def __init__(self, file=None, __name__='', source_string='', mapping=None): DTMLDocument.__init__(self, file=file, mapping=mapping, __name__=__name__, source_string=source_string) | def __init__(self, file, __name__): DTMLDocument.__init__(self, file, mapping=None, __name__=__name__) DefaultDublinCoreImpl.__init__(self) |
raise "Programmer error, emasculate programmer" | raise "Programmer error, eviscerate programmer" | def setOp(self, op, usernames, category): """Set who can do a particular operation.""" if category is None: raise "Programmer error, emasculate programmer" this_perm = self._perms[op] this_role = self._roles_map[category] this_local_role = self._local_roles_map[op] self.manage_permission(this_perm, [this_role]) for use... |
this_role = self._roles_map[category] | these_roles = self._roles_map[category] | def setOp(self, op, usernames, category): """Set who can do a particular operation.""" if category is None: raise "Programmer error, emasculate programmer" this_perm = self._perms[op] this_role = self._roles_map[category] this_local_role = self._local_roles_map[op] self.manage_permission(this_perm, [this_role]) for use... |
self.manage_permission(this_perm, [this_role]) | self.manage_permission(this_perm, these_roles) | def setOp(self, op, usernames, category): """Set who can do a particular operation.""" if category is None: raise "Programmer error, emasculate programmer" this_perm = self._perms[op] this_role = self._roles_map[category] this_local_role = self._local_roles_map[op] self.manage_permission(this_perm, [this_role]) for use... |
this_role = self._roles_map[pseudoperm] | these_roles = self._roles_map[pseudoperm] | def create_page(self, page, text='', title='', log=None, page_type='structuredtext'): """Create a new page.""" if hasattr(aq_base(self._my_folder()), page): raise ValueError, ("Document with name '%s' already exists.\n" "(Perhaps it was created while you were " "editing.)" % page) ob = self.__class__(source_string='', ... |
roles = [this_local_role, this_role] | roles = (this_local_role,) + these_roles | def create_page(self, page, text='', title='', log=None, page_type='structuredtext'): """Create a new page.""" if hasattr(aq_base(self._my_folder()), page): raise ValueError, ("Document with name '%s' already exists.\n" "(Perhaps it was created while you were " "editing.)" % page) ob = self.__class__(source_string='', ... |
roles = [local_roles_map[name], roles_map[pseudoperm]] | roles = (local_roles_map[name],) + roles_map[pseudoperm] | def makeCMFWikiPage(id, title, file): ob = CMFWikiPage(file, __name__=id) ob.title = title ob.parents = [] username = getSecurityManager().getUser().getUserName() ob.manage_addLocalRoles(username, ['Owner']) ob.setSubOwner('both') initPageMetadata(ob) for name, perm in ob._perms.items(): pseudoperm = default_perms[name... |
try: ob.reindexObject(idxs=['allowedRolesAndUsers']) except TypeError: pass | ob.reindexObject(idxs=['allowedRolesAndUsers']) | def _recursiveUpdateRoleMappings(self, ob, wfs): |
assert 'foo' in catalog.uniqueValuesFor( 'id' ) | self.failUnless( 'foo' in catalog.uniqueValuesFor('getId') ) | def test_folderMove( self ): # # Does the catalog stay synched when folders are moved? # test = self.root.test |
assert 'bar' in catalog.uniqueValuesFor( 'id' ) | self.failUnless( 'bar' in catalog.uniqueValuesFor('getId') ) | def test_folderMove( self ): # # Does the catalog stay synched when folders are moved? # test = self.root.test |
assert 'foo' in catalog.uniqueValuesFor( 'id' ) assert 'bar' in catalog.uniqueValuesFor( 'id' ) | self.failUnless( 'foo' in catalog.uniqueValuesFor('getId') ) self.failUnless( 'bar' in catalog.uniqueValuesFor('getId') ) | def test_folderMove( self ): # # Does the catalog stay synched when folders are moved? # test = self.root.test |
return portal_url() + '/' + icon | res = portal_url(relative=1) + '/' + icon while res[:1] == '/': res = res[1:] return res | def getIcon(self, relative_to_portal=0): """ Using this method allows the content class creator to grab icons on the fly instead of using a fixed attribute on the class. """ ti = self.getTypeInfo() if ti is not None: icon = quote(ti.getIcon()) if icon: if relative_to_portal: return icon else: # Need the full path to th... |
proptype, propvstr = split( proptv, '=' ) | proptype, propvstr = proptv.split( '=', 1 ) | def _readFile(self, reparse): """Read the data from the filesystem. Read the file (indicated by exandpath(self._filepath), and parse the data if necessary. """ |
last_date=DateTime(str(month)+'/'+str(last_day)+'/'+str(year)) query=self.portal_catalog(Type=self.calendar_types, | last_date=first_date + last_day query=self.portal_catalog(Type=self.calendar_types, | def catalog_getevents(self, year, month): """ given a year and month return a list of days that have events """ first_date=DateTime(str(month)+'/1/'+str(year)) last_day=calendar.monthrange(year, month)[1] last_date=DateTime(str(month)+'/'+str(last_day)+'/'+str(year)) query=self.portal_catalog(Type=self.calendar_types,... |
if hasattr( aq_base( self ), 'talkback' ): talkback = self.talkback | talkback = getattr( aq_base( self ), 'talkback', None ): | def objectItems(self): """ since 'talkback' is the only opaque item on content right now, I will return that. Should be replaced with a list of tuples for every opaque item! """ if hasattr( aq_base( self ), 'talkback' ): talkback = self.talkback if talkback is not None: return ((talkback.id, talkback),) else: return [] |
return [] | return () | def objectItems(self): """ since 'talkback' is the only opaque item on content right now, I will return that. Should be replaced with a list of tuples for every opaque item! """ if hasattr( aq_base( self ), 'talkback' ): talkback = self.talkback if talkback is not None: return ((talkback.id, talkback),) else: return [] |
tool = getToolByName( self, 'portal_types' ) | tool = utils.getToolByName( self, 'portal_types' ) | def _index_html(self): ''' Invokes the action identified by the id "view" or the first action. ''' tool = getToolByName( self, 'portal_types' ) ti = tool.getTypeInfo( self ) if ti is not None: path = ti.getActionById('view', None) if path is not None: view = self.restrictedTraverse(path) return view actions = ti.getAct... |
tool = getToolByName( self, 'portal_types' ) | tool = utils.getToolByName( self, 'portal_types' ) | def addSubtopic(self, id): """ Add a new subtopic """ tool = getToolByName( self, 'portal_types' ) topictype = tool.getTypeInfo(self) topictype.constructInstance(self, id) |
relUrl = portal_url.getRelativeUrl(self.restrictedTraverse( remote_url)) | portal_obj = portal_url.getPortalObject() content_obj = portal_obj.restrictedTraverse( remote_url ) relUrl = portal_url.getRelativeUrl( content_obj ) | def addFavorite(self, id, title='', remote_url='', description=''): """ Add a Favorite """ portal_url = getToolByName(self, 'portal_url') relUrl = portal_url.getRelativeUrl(self.restrictedTraverse( remote_url)) o=Favorite( id, title, relUrl, description ) self._setObject(id,o) |
query=self.portal_catalog(Type=self.calendar_types, | query=self.portal_catalog(portal_type=self.calendar_types, | def catalog_getevents(self, year, month): """ given a year and month return a list of days that have events """ first_date=DateTime(str(month)+'/1/'+str(year)) last_day=calendar.monthrange(year, month)[1] ## This line was cropping the last day of the month out of the ## calendar when doing the query |
query+=self.portal_catalog(Type=self.calendar_types, | query+=self.portal_catalog(portal_type=self.calendar_types, | def catalog_getevents(self, year, month): """ given a year and month return a list of days that have events """ first_date=DateTime(str(month)+'/1/'+str(year)) last_day=calendar.monthrange(year, month)[1] ## This line was cropping the last day of the month out of the ## calendar when doing the query |
query=self.portal_catalog(Type=self.calendar_types, | query=self.portal_catalog(portal_type=self.calendar_types, | def getEventsForThisDay(self, thisDay): """ given an exact day return ALL events that: A) Start on this day OR B) End on this day OR C) Start before this day AND end after this day""" catalog = self.portal_catalog first_date, last_date = self.getBeginAndEndTimes(thisDay.day(), thisDay.month(), thisDay.year()) #fi... |
query+=self.portal_catalog(Type=self.calendar_types, | query+=self.portal_catalog(portal_type=self.calendar_types, | def getEventsForThisDay(self, thisDay): """ given an exact day return ALL events that: A) Start on this day OR B) End on this day OR C) Start before this day AND end after this day""" catalog = self.portal_catalog first_date, last_date = self.getBeginAndEndTimes(thisDay.day(), thisDay.month(), thisDay.year()) #fi... |
self._catalog.addColumn('CreatedDate') | self._catalog.addColumn('CreationDate') | def _initIndexes(self): # Reviewing indexes self._catalog.addIndex('review_state', 'FieldIndex') # Content indexes self._catalog.addIndex('Date', 'FieldIndex') self._catalog.addIndex('allowedRolesAndUsers', 'KeywordIndex') self._catalog.addIndex('Creator', 'FieldIndex') self._catalog.addIndex('Title', 'TextIndex') self... |
d = FSPageTemplate.__dict__ d['source.xml'] = d['source.html'] = Src() | source_dot_xml = Src() setattr(FSPageTemplate, 'source.xml', FSPageTemplate.source_dot_xml) setattr(FSPageTemplate, 'source.html', FSPageTemplate.source_dot_xml) | def _exec(self, bound_names, args, kw): """Call a FSPageTemplate""" try: response = self.REQUEST.RESPONSE except AttributeError: response = None # Read file first to get a correct content_type default value. self._updateFromFS() |
obj = aq_parent(obj) | content = aq_parent(obj) | def _setCacheHeaders(obj, extra_context): """Set cache headers according to cache policy manager for the obj.""" REQUEST = getattr(obj, 'REQUEST', None) if REQUEST is not None: obj = aq_parent(obj) manager = getToolByName(obj, 'caching_policy_manager', None) if manager is not None: view_name = obj.getId() headers = man... |
obj, view_name, extra_context | content, view_name, extra_context | def _setCacheHeaders(obj, extra_context): """Set cache headers according to cache policy manager for the obj.""" REQUEST = getattr(obj, 'REQUEST', None) if REQUEST is not None: obj = aq_parent(obj) manager = getToolByName(obj, 'caching_policy_manager', None) if manager is not None: view_name = obj.getId() headers = man... |
folder = self.restrictedTraverse(fpath) | portal_skins = getToolByName(self,'portal_skins') folder = portal_skins.restrictedTraverse(fpath) | def manage_doCustomize(self, folder_path, RESPONSE=None): """Makes a ZODB Based clone with the same data. |
nil, editor = FindExecutable(self.body_file, '') | nil, editor = FindExecutable(self.content_file, '') | def getEditorCommand(self): """Return the editor command""" editor = self.options.get('editor') if win32 and editor is None: from _winreg import HKEY_CLASSES_ROOT, OpenKeyEx, \ QueryValueEx, EnumKey from win32api import FindExecutable import pywintypes # Find editor application based on mime type and extension content... |
if self.metadata.get('auth','').startswith('Basic'): | if self.metadata.get('auth','').lower().startswith('basic'): | def zopeRequest(self, method, headers={}, body=''): """Send a request back to Zope""" try: if self.ssl: h = HTTPSConnection(self.host) else: h = HTTPConnection(self.host) |
return context.portal_catalog(REQUEST=query)] | return context.portal_catalog(REQUEST=query) | def supplement_subject_many(field, index_name=None, reqget=reqget, items=subj_items): if not index_name: index_name = field vals = reqget(field, []) for i in vals: items.append('%s:%s' % (index_name, i)) |
import pdb;pdb.set_trace() | def validateMetadata( self, content ): """ Enforce portal-wide policies about DCI, e.g., requiring non-empty title/description, etc. Called by the CMF immediately before saving changes to the metadata of an object. """ for element, policy in self.listPolicies( content.Type() ): | |
if Lockable.wl_isLocked(ob): | if wl_isLocked(ob): | def index_html(self, REQUEST, RESPONSE): """Publish the object to the external editor helper app""" security = getSecurityManager() parent = self.aq_parent try: ob = parent[REQUEST['target']] # Try getitem except KeyError: ob = getattr(parent, REQUEST['target']) # Try getattr except AttributeError: # Handle objects th... |
self.modification_date = self.bobobase_modification_time() | self.modification_date = DateTime() | def setModificationDate(self, modification_date=None): """ Set the date when the resource was last modified. When called without an argument, sets the date to now. """ if modification_date is None: # XXX which one is more correct ? #self.modification_date = DateTime() self.modification_date = self.bobobase_modification... |
isTuple = isinstance(prop, tuple) | if isinstance(prop, tuple): prop_value = '' prop_elements = prop else: prop_value = prop prop_elements = () | def _extractProperty(self, obj, prop_map): |
'value': not isTuple and prop or '', 'elements': isTuple and prop or (), | 'value': prop_value, 'elements': prop_elements, | def _extractProperty(self, obj, prop_map): |
raise 'ValueError', 'No such content type: %s' % contentType | raise 'ValueError', 'No such content type: %s' % type_name | def constructContent( self, type_name, container, id, RESPONSE=None, *args, **kw ): """ Build an instance of the appropriate content class in 'container', using 'id'. """ info = self.getTypeInfo( type_name ) if info is None: raise 'ValueError', 'No such content type: %s' % contentType immediate_url = apply(info.constr... |
def catalog_object(self, object, uid, idxs=[]): | def catalog_object(self, object, uid, idxs=()): | def catalog_object(self, object, uid, idxs=[]): # Wraps the object with workflow and accessibility # information just before cataloging. wf = getattr(self, 'portal_workflow', None) if wf is not None: vars = wf.getCatalogVariablesFor(object) else: vars = {} w = IndexableObjectWrapper(vars, object) ZCatalog.catalog_objec... |
def reindexObject(self, object, idxs=[]): | def reindexObject(self, object, idxs=()): | def reindexObject(self, object, idxs=[]): '''Update catalog after object data has changed. The optional idxs argument is a list of specific indexes to update (all of them by default). ''' url = self.__url(object) ## Zope 2.3 ZCatalog is supposed to work better if ## you don't uncatalog_object() when reindexing. # self.... |
if idxs != []: | if idxs: | def reindexObject(self, object, idxs=[]): '''Update catalog after object data has changed. The optional idxs argument is a list of specific indexes to update (all of them by default). ''' url = self.__url(object) ## Zope 2.3 ZCatalog is supposed to work better if ## you don't uncatalog_object() when reindexing. # self.... |
except: | except ValueError: | def read(self): return '(No Response From Server)' |
import pdb; pdb.set_trace() | def updateSkinCookie(self): ''' If needed, updates the skin cookie based on the member preference. ''' import pdb; pdb.set_trace() pm = getToolByName(self, 'portal_membership') member = pm.getAuthenticatedMember() if hasattr(aq_base(member), 'portal_skin'): mskin = member.portal_skin if mskin: req = self.REQUEST cookie... | |
""" create a member area | """ Create a member area for 'member_id'. | def createMemberarea(self, member_id): """ create a member area """ parent = self.aq_inner.aq_parent members = getattr(parent, 'Members', None) |
user = acl_users.getUser(member_id).__of__(acl_users) | user = acl_users.getUser(member_id) if user is not None: user= user.__of__(acl_users) else: from AccessControl import getSecurityManager user= getSecurityManager().getUser() if user.getUserName() != member_id: raise NotImplementedError, \ 'cannot get user for member area creation' | def createMemberarea(self, member_id): """ create a member area """ parent = self.aq_inner.aq_parent members = getattr(parent, 'Members', None) |
Document.addDocument( f , 'index_html' , member_id+"'s Home" , member_id+"'s front page" , "structured-text" , (default_member_content % member_id) ) | addDocument( f , 'index_html' , member_id+"'s Home" , member_id+"'s front page" , "structured-text" , (DEFAULT_MEMBER_CONTENT % member_id) ) | def createMemberarea(self, member_id): """ create a member area """ parent = self.aq_inner.aq_parent members = getattr(parent, 'Members', None) |
ishtml = (text_format == 'html') or (string.find(text,'</body>') > -1) | bodyfound = bodyfinder.search(text) ishtml = (text_format == 'html') or (bodyfound is not None) | def edit(self, text_format, text, file=''): """ Edit the Document """ self.text = text headers = {} if file and (type(file) is not type('')): contents=file.read() if contents: text = self.text = contents |
b = bodyfinder.search(text) if b: text = self.text = b.group('bodycontent') | if bodyfound: text = self.text = bodyfound.group('bodycontent') | def edit(self, text_format, text, file=''): """ Edit the Document """ self.text = text headers = {} if file and (type(file) is not type('')): contents=file.read() if contents: text = self.text = contents |
self._actions = tuple( actions ) | self._actions = tuple( new_actions ) | def moveUpActions( self, selections=(), REQUEST=None ): |
a = actions[idx2] | a = new_actions[idx2] | def moveDownActions( self, selections=(), REQUEST=None ): |
raise ValueError, 'Disallowed suboject type: %s' % type_name | raise ValueError, 'Disallowed subobject type: %s' % type_name | def invokeFactory( self , type_name , id , RESPONSE=None , *args , **kw ): ''' Invokes the portal_types tool. ''' pt = getToolByName( self, 'portal_types' ) myType = pt.getTypeInfo(self) |
'''Can be called manually, allowing the user to change | '''Change the current skin. Can be called manually, allowing the user to change | def changeSkin(self, skinname): '''Can be called manually, allowing the user to change skins in the middle of a request. ''' self._v_skindata = None skinobj = self.getSkin(skinname) if skinobj is not None: self._v_skindata = (self.REQUEST, skinobj, {}) |
url = object.absolute_url() | object_url = object.absolute_url() | def listFilteredActionsFor(self, object=None): '''Gets all actions available to the user and returns a mapping containing user actions, object actions, and global actions. ''' portal = aq_parent(aq_inner(self)) if object is None or not hasattr(object, 'aq_base'): folder = portal else: folder = object # Search up the co... |
url = '%s/%s' % (url, d['action']) | url = '%s/%s' % (object_url, d['action']) | def listFilteredActionsFor(self, object=None): '''Gets all actions available to the user and returns a mapping containing user actions, object actions, and global actions. ''' portal = aq_parent(aq_inner(self)) if object is None or not hasattr(object, 'aq_base'): folder = portal else: folder = object # Search up the co... |
__ALLOWED_MEMBER_ID_PATTERN = re.compile( "[A-Za-z][A-Za-z0-9_]*" ) | __ALLOWED_MEMBER_ID_PATTERN = re.compile( "^[A-Za-z][A-Za-z0-9_]*$" ) | def addMember(self, id, password, roles=('Member',), domains='', properties=None): '''Creates a PortalMember and returns it. The properties argument can be a mapping with additional member properties. Raises an exception if the given id already exists, the password does not comply with the policy in effect, or the auth... |
-x, --execute Select a particular step (def. 'doWholeEnchilada') | -x, --execute Select a particular step. Available steps are: exportReleaseFile makeArchives uploadArchives uploadDocs doWholeEnchilada (default) | def _usage( self ): |
Bug note: Note that this method, when called by Management.py's manage_workspace (when it is the first action of an object), will be called with REQUEST equal to 'self' and manage_tabs_message equal to the REQUEST. This causes the request to be printed by manage_tabs, because it considers 'manage_tabs_message' to be t... | def manage_editActionsForm( self, REQUEST, manage_tabs_message=None ): | |
apply( m, ( container, self.REQUEST ) + args, kw ) | apply( m, ( m.aq_parent, self.REQUEST ) + args, kw ) | def constructInstance( self, container, id, *args, **kw ): """ Build a "bare" instance of the appropriate type in 'container', using 'id' as its id. Return the URL of its "immediate" view (typically the metadata form). """ # Get the factory method, performing a security check # in the process. m = self._getFactoryMeth... |
print container | def get_ancestors(self): """Return trimmed nesting structure indicating this page's ancestors. | |
if attempt == ATTEMPT_LOGIN or attempt == ATTEMPT_NONE: | if attempt == ATTEMPT_LOGIN or attempt == ATTEMPT_NONE \ or attempt == ATTEMPT_RESUME: | def __call__(self, container, req): '''The __before_publishing_traverse__ hook.''' resp = self.REQUEST['RESPONSE'] attempt = self.modifyRequest(req, resp) if attempt == ATTEMPT_DISABLED: return if not req.get('disable_cookie_login__', 0): if attempt == ATTEMPT_LOGIN or attempt == ATTEMPT_NONE: # Modify the "unauthorize... |
pid = modname[1] | pid = split(modname, '.')[1] | def registerIcon(klass, iconspec, _prefix=None): modname = klass.__module__ pid = modname[1] name = path.split(iconspec)[1] klass.icon = 'misc_/%s/%s' % (pid, name) icon = Globals.ImageFile(iconspec, _prefix) icon.__roles__=None if not hasattr(OFS.misc_.misc_, pid): setattr(OFS.misc_.misc_, pid, OFS.misc_.Misc_(pid, {}... |
sdef.setPermission(p_modify, 0, (r_manager)) | sdef.setPermission(p_modify, 0, (r_manager,)) | sdef = wf.states['published'] |
security.declarePrivate('manage_beforeDelete') | security.declarePrivate('manage_afterAdd') | def SearchableText(self): """ SeachableText is used for full text seraches of a portal. It should return a concatanation of all useful text. """ return "%s %s" % (self.title, self.description) |
types = [ self.meta_type ] types.extend( self.test_case_metatypes ) for tcid, test_case in self.objectItems( types ): | self._recurseListTestCases(result, prefix, self) return result def _recurseListTestCases( self, result, prefix, ob ): for tcid, test_case in ob.objectItems(): | def listTestCases( self, prefix=() ): """ Return a list of our contents which qualify as test cases. """ result = [] types = [ self.meta_type ] types.extend( self.test_case_metatypes ) |
else: | elif test_case.isPrincipiaFolderish: self._recurseListTestCases(result, prefix+(tcid,), test_case) elif test_case.meta_type in self.test_case_metatypes: | def listTestCases( self, prefix=() ): """ Return a list of our contents which qualify as test cases. """ result = [] types = [ self.meta_type ] types.extend( self.test_case_metatypes ) |
return result | def listTestCases( self, prefix=() ): """ Return a list of our contents which qualify as test cases. """ result = [] types = [ self.meta_type ] types.extend( self.test_case_metatypes ) | |
, 'output-file' | , 'output-file=' | def parseOptions( self, args ): """ Parse command-line options. """ verbosity = self._verbosity logfile_directory = logfile_prefix = None logfile_extension_req = logfile_extension_resp = None output_file = exclude_file = site_host = site_path = None test_case_title = None |
def setupCurrentSkin( self, REQEUEST ): self._setup_called = True def clearCurrentSkin(self): pass | def setupCurrentSkin( self, REQEUEST ): | |
self.root.site = Folder( id='site' ) | self.root.site = DummySite() | def _initSite( self, selections=None, fsdvs=None ): |
self.failIf( skins_tool._setup_called ) | self.failIf( site._skin_setup_called ) | def test_parseXML_empty( self ): |
self.failIf( skins_tool._setup_called ) | self.failIf( site._skin_setup_called ) | def test_parseXML_normal( self ): |
self.failIf( skins_tool._setup_called ) | self.failIf( site._skin_setup_called ) | def test_empty_default_purge( self ): |
self.failUnless( skins_tool._setup_called ) | self.failUnless( site._skin_setup_called ) | def test_empty_default_purge( self ): |
self.failIf( skins_tool._setup_called ) | self.failIf( site._skin_setup_called ) | def test_empty_explicit_purge( self ): |
self.failUnless( skins_tool._setup_called ) | self.failUnless( site._skin_setup_called ) | def test_empty_explicit_purge( self ): |
self.failIf( skins_tool._setup_called ) | self.failIf( site._skin_setup_called ) | def test_empty_skip_purge( self ): |
self.failUnless( skins_tool._setup_called ) | self.failUnless( site._skin_setup_called ) | def test_empty_skip_purge( self ): |
self.failIf( skins_tool._setup_called ) | self.failIf( site._skin_setup_called ) | def test_normal( self ): |
self.failUnless( skins_tool._setup_called ) | self.failUnless( site._skin_setup_called ) | def test_normal( self ): |
self.failIf( skins_tool._setup_called ) | self.failIf( site._skin_setup_called ) | def test_normal_encode_as_ascii( self ): |
self.failUnless( skins_tool._setup_called ) | self.failUnless( site._skin_setup_called ) | def test_normal_encode_as_ascii( self ): |
self.failIf( skins_tool._setup_called ) | self.failIf( site._skin_setup_called ) | def test_fragment_skip_purge(self): |
self.failUnless( skins_tool._setup_called ) | self.failUnless( site._skin_setup_called ) | def test_fragment_skip_purge(self): |
subject = ('%s | subject = ('%s %s/%2d %s "%s"' | def _send_update_notice(self, action, actor, comment, orig_status, additions, removals, file, fileid): """Send email notification about issue event to relevant parties.""" |
def _entry_header(self, type, user, prefix="= ", suffix=" ="): | def _entry_header(self, type, user, prefix="= ", suffix=""): | def _entry_header(self, type, user, prefix="= ", suffix=" ="): """Return text for the header of a new transcript entry.""" # Ideally this would be a skin method (probly python script), but i # don't know how to call it from the product, sigh. t = string.capitalize(type) if self.action_number: lead = t + " - Entry #" + ... |
'status:' + (self.status() or ''), | def Subject(self): """The structured attrs, combined w/field names for targeted search.""" assigned_to = tuple(['assigned_to:' + i for i in self.assigned_to()]) return ('topic:' + self.topic, 'classification:' + self.classification, 'security_related:' + ((self.security_related and '1') or '0'), 'importance:' + self.im... | |
'reported_version:' + self.reported_version) + assigned_to | 'reported_version:' + self.reported_version, 'action_number:' + str(self.action_number), 'upload_number:' + str(len(self.objectIds()) - 1), ) + assigned_to | def Subject(self): """The structured attrs, combined w/field names for targeted search.""" assigned_to = tuple(['assigned_to:' + i for i in self.assigned_to()]) return ('topic:' + self.topic, 'classification:' + self.classification, 'security_related:' + ((self.security_related and '1') or '0'), 'importance:' + self.im... |
product_dir, utils_module_file = os.path.split( __file__ ) | def directlyProvides(obj, *interfaces): obj.__implements__ = ( getattr( obj.__class__, '__implements__', () ) + tuple( interfaces ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.