Changeset 12951
- Timestamp:
- 15 May 2015, 08:56:17 (9 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 1 added
- 15 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/docs/source/userdocs/security.rst
r12922 r12951 6 6 .. seealso:: 7 7 8 :ref:`Security Doctests < permissions_txt>`8 :ref:`Security Doctests <security_txt>` 9 9 10 10 Kofa has a very efficient security machinery. The machinery does not -
main/waeup.kofa/trunk/docs/source/userdocs/testing.rst
r12947 r12951 130 130 testing/userscontainer 131 131 132 University 133 ---------- 134 135 .. toctree:: 136 :maxdepth: 2 137 138 testing/app 139 132 140 Academic Section 133 141 ---------------- … … 136 144 :maxdepth: 2 137 145 138 testing/cert ificate146 testing/certcourse 139 147 140 148 Batch Processing -
main/waeup.kofa/trunk/docs/source/userdocs/testing/certcourse.rst
r12950 r12951 1 .. _cert ificate_txt:1 .. _certcourse_txt: 2 2 3 .. include:: ../../../../src/waeup/kofa/doctests/certificate.txt 4 5 .. include:: ../../../../src/waeup/kofa/doctests/certcourses.txt 3 .. include:: ../../../../src/waeup/kofa/doctests/certcourse.txt -
main/waeup.kofa/trunk/docs/source/userdocs/testing/permissions.rst
r12950 r12951 1 .. _ permissions_txt:1 .. _security_txt: 2 2 3 3 .. include:: ../../../../src/waeup/kofa/doctests/permissions.txt 4 5 .. include:: ../../../../src/waeup/kofa/doctests/authentication.txt -
main/waeup.kofa/trunk/src/waeup/kofa/catalog.py
r11483 r12951 32 32 @implementer(IQuery) 33 33 class KofaQuery(Query): 34 """A hurry.query-like query that supports also ``apply``. 34 """A `hurry.query.query.Query` compatible query that also supports 35 retrival of plain ``Bree`` result sets as used inside a catalog. 36 37 Like `hurry.query.query.Query` objects, `KofaQuery` is some kind 38 of a meta query or 'compound query' that can give the cataloged 39 objects (or their int ids) matching one or more 'subqueries'. 40 41 This way you can search for objects (or their int ids) that match 42 several criteria at the same time. See ``examples`` section below. 43 44 A singleton instance of this class is also available as global 45 utility. 46 47 A hurry.query-like query that supports also ``apply``. 35 48 """ 36 49 def apply(self, query): 37 """Get a catalog's BTree set of intids conforming to a query. 50 """Get the list of int ids (a `BTree` result set) for objects 51 determined by ``query``. 52 53 The list of int ids is less expensive to compute than the 54 complete search results and sufficient, for instance, when you 55 only need the number of objects that match a query and not the 56 objects themselves. 38 57 """ 39 58 return query.apply() -
main/waeup.kofa/trunk/src/waeup/kofa/doctests/app.txt
r12948 r12951 1 :mod:`waeup.kofa.app` -- central components for Kofa 2 ****************** **********************************1 Central Components 2 ****************** 3 3 4 4 .. :doctest: … … 6 6 7 7 .. module:: waeup.kofa.app 8 9 .. class:: University10 11 The main Kofa application object is given with12 :class:`University`. It provides the main containers as faculties,13 hostels, etc.14 15 .. attribute:: name16 17 A string. The name of a university.18 19 .. attribute:: faculties20 21 An arbitrary object containing "faculties". In the case of22 `University` it is a container of type23 `waeup.kofa.interfaces.IFacultiesContainer`.24 8 25 9 … … 37 21 instance: 38 22 39 40 41 42 23 >>> from waeup.kofa.app import University 24 >>> myuniversity = University() 25 >>> myuniversity 26 <waeup.kofa.app.University object at 0x...> 43 27 44 28 Instances of `University` comply with the interface 45 29 `waeup.kofa.interfaces.IUniversity`: 46 30 47 48 49 50 31 >>> from zope.interface.verify import verifyClass 32 >>> from waeup.kofa.interfaces import IUniversity 33 >>> verifyClass(IUniversity, University) 34 True 51 35 52 36 A freshly created instance provides the attributes promised by the 53 37 interface: 54 38 55 56 57 58 39 >>> from waeup.kofa.app import University 40 >>> myuniversity = University() 41 >>> myuniversity['configuration'].name 42 u'Sample University' 59 43 60 61 44 >>> myuniversity['faculties'] 45 <waeup.kofa.university.facultiescontainer.FacultiesContainer object at 0x...> 62 46 63 47 >>> myuniversity['students'] -
main/waeup.kofa/trunk/src/waeup/kofa/doctests/authentication.txt
r12948 r12951 1 Kofa authentication2 ************** *****1 Authentication 2 ************** 3 3 4 4 We need to protect most pieces of our portals from unauthenticated … … 24 24 >>> browser.handleErrors = False 25 25 26 Creating users (principals)27 ================= ==========26 Creating officers 27 ================= 28 28 29 29 Before we can login, we have to provide a user (``principal`` in Zope … … 42 42 See ``userscontainer.txt`` for details about the UsersContainer we use here. 43 43 44 Users and local roles45 ===================== 44 Officers and local roles 45 ======================== 46 46 47 47 Accounts also hold infos about local roles assigned to a user. In the -
main/waeup.kofa/trunk/src/waeup/kofa/doctests/catalog.txt
r12948 r12951 10 10 .. :layer: waeup.kofa.testing.KofaUnitTestLayer 11 11 12 The KofaQuery Class13 ===================14 15 .. class:: KofaQuery()16 17 .. attribute:: grok.implements(hurry.query.interfaces.IQuery)18 19 A `hurry.query.query.Query` compatible query that also supports20 retrival of plain ``Bree`` result sets as used inside a catalog.21 22 Like `hurry.query.query.Query` objects, `KofaQuery` is some kind23 of a meta query or 'compound query' that can give the cataloged24 objects (or their int ids) matching one or more 'subqueries'.25 26 This way you can search for objects (or their int ids) that match27 several criteria at the same time. See ``examples`` section below.28 29 A singleton instance of this class is also available as global30 utility.31 32 .. method:: searchResults(query)33 34 Get the cataloged objects determined by ``query``.35 36 .. method:: apply(query)37 38 Get the list of int ids (a `BTree` result set) for objects39 determined by ``query``.40 41 The list of int ids is less expensive to compute than the42 complete search results and sufficient, for instance, when you43 only need the number of objects that match a query and not the44 objects themselves.45 46 Examples47 ========48 49 12 Getting a general query object 50 ------------------------------ 13 ============================== 51 14 52 15 We can get a KofaQuery object by asking for an unnamed global utility … … 64 27 65 28 Setting up a catalog and feeding it 66 ----------------------------------- 29 =================================== 67 30 68 31 >>> from zope.catalog.interfaces import ICatalog … … 143 106 144 107 Searching for result sets 145 ------------------------- 108 ========================= 146 109 147 110 Finally we can perform queries: … … 193 156 194 157 Searching for objects 195 --------------------- 158 ===================== 196 159 197 160 Very often we don't want to know the catalog-internal 'ids' of -
main/waeup.kofa/trunk/src/waeup/kofa/doctests/certificatescontainer.txt
r12949 r12951 1 :mod:`waeup.kofa.university.certificatescontainer` -- Certificate containers2 ********************** ******************************************************1 Certificate Containers 2 ********************** 3 3 4 4 .. module:: waeup.kofa.university.certificatescontainer -
main/waeup.kofa/trunk/src/waeup/kofa/doctests/course.txt
r12949 r12951 1 :mod:`waeup.kofa.university.course` --Courses2 ******* ***************************************1 Courses 2 ******* 3 3 4 4 .. module:: waeup.kofa.university.course -
main/waeup.kofa/trunk/src/waeup/kofa/doctests/coursescontainer.txt
r12949 r12951 1 :mod:`waeup.kofa.university.coursescontainer` -- Course containers2 ***************** *************************************************1 Course Containers 2 ***************** 3 3 4 4 .. module:: waeup.kofa.university.coursescontainer -
main/waeup.kofa/trunk/src/waeup/kofa/doctests/department.txt
r12949 r12951 1 :mod:`waeup.kofa.university.department` --Departments2 *********** *******************************************1 Departments 2 *********** 3 3 4 4 .. module:: waeup.kofa.university.department -
main/waeup.kofa/trunk/src/waeup/kofa/doctests/facultiescontainer.txt
r12949 r12951 1 :mod:`waeup.kofa.university.facultiescontainer` --Faculty Containers2 ****************** ***************************************************1 Faculty Containers 2 ****************** 3 3 4 4 .. module:: waeup.kofa.university.facultiescontainer -
main/waeup.kofa/trunk/src/waeup/kofa/doctests/faculty.txt
r12949 r12951 1 :mod:`waeup.kofa.university.faculty` --Faculties2 ********* ****************************************1 Faculties 2 ********* 3 3 4 4 .. module:: waeup.kofa.university.faculty -
main/waeup.kofa/trunk/src/waeup/kofa/doctests/helpers.txt
r12939 r12951 1 :mod:`waeup.kofa.utils.helpers` --Helpers for Kofa2 **************** ***********************************1 Helpers for Kofa 2 **************** 3 3 4 4 .. module:: waeup.kofa.utils.helpers -
main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_university.py
r12950 r12951 33 33 def test_suite(): 34 34 # collect doctests for university subpackage 35 suite = get_doctest_suite(['doctests/certcourse s.txt',])35 suite = get_doctest_suite(['doctests/certcourse.txt',]) 36 36 # add local unittests (actually only one) 37 37 for testcase in [UniversitySubpackageTests,]:
Note: See TracChangeset for help on using the changeset viewer.