source: WAeUP_SRP/trunk/skins/waeup_academics/academics_rename_items.py @ 5044

Last change on this file since 5044 was 805, checked in by joachim, 18 years ago

propset Id

  • Property svn:keywords set to Id
File size: 576 bytes
Line 
1## Script (Python) "folder_rename_items"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=
8##title=
9##
10# $Id: academics_rename_items.py 805 2006-11-09 09:38:29Z joachim $
11"""
12Get the list of renameable objects from REQUEST's 'ids' list.
13"""
14
15# This is bad but we want to keep CMF 1.4's API for now
16REQUEST = context.REQUEST
17
18ids = REQUEST.get('ids', [])
19
20objects = []
21for id in ids:
22    ob = getattr(context.academics, id, None)
23    if ob is None:
24        continue
25    if not ob.cb_isMoveable():
26        continue
27    objects.append(ob)
28
29return objects
Note: See TracBrowser for help on using the repository browser.