Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

53 rindas
1.5 KiB

  1. :mod:`doclist` --- Doclist Module
  2. =================================
  3. .. module:: doclist
  4. :synopsis: Collection of functions that are used on a list of Document objects (doclist)
  5. .. function:: getlist(doclist, field)
  6. Filter a list of records for a specific field from the full doclist
  7. Example::
  8. # find all phone call details
  9. dl = getlist(self.doclist, 'contact_updates')
  10. pl = []
  11. for d in dl:
  12. if d.type=='Phone':
  13. pl.append(d)
  14. .. function:: copy(doclist, no_copy = [])
  15. Save & return a copy of the given doclist
  16. Pass fields that are not to be copied in `no_copy`
  17. .. function:: to_html(doclist)
  18. Return a simple HTML format of the doclist
  19. functions for internal use
  20. ---------------------------
  21. .. function:: expand(docs)
  22. Expand a doclist sent from the client side. (Internally used by the request handler)
  23. .. function:: compress(doclist)
  24. Compress a doclist before sending it to the client side. (Internally used by the request handler)
  25. .. function:: validate_links_doclist(doclist)
  26. Validate link fields and return link fields that are not correct.
  27. Calls the `validate_links` function on the Document object
  28. .. function:: getvaluelist(doclist, fieldname)
  29. Returns a list of values of a particualr fieldname from all Document object in a doclist
  30. .. function:: getchildren(name, childtype, field='', parenttype='')
  31. Returns the list of all child records of a particular record (used internally)