Changeset 5140
- Timestamp:
- 12 Apr 2010, 14:28:51 (15 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/README.txt
r5072 r5140 2 2 ********************** 3 3 4 :Test-Layer: unit 4 .. :doctest: 5 .. :layer: waeup.sirp.testing.WAeUPSIRPUnitTestLayer 5 6 6 7 A portal software for student registration. 7 8 Prerequisites9 =============10 11 Before we can work with the environment, we have to register all the12 utilities, adapters, etc. We grok the `waeup` package to do that::13 14 >>> import grok15 >>> grok.testing.grok('waeup.sirp')16 8 17 9 Universities -
main/waeup.sirp/trunk/src/waeup/sirp/app.txt
r4920 r5140 2 2 ************************************************************** 3 3 4 :Test-Layer: unit 4 .. :doctest: 5 .. :layer: waeup.sirp.testing.WAeUPSIRPUnitTestLayer 5 6 6 7 .. module:: waeup.sirp.app … … 31 32 whole :mod:`waeup` package. This way all interfaces, utilities and adapters 32 33 defined in the package are looked up and registered with the global 33 registries: 34 35 >>> import grok 36 >>> grok.testing.grok('waeup') 34 registries (this is done by the testlayer automatically). 37 35 38 36 Now we can import the :class:`University` class and create an -
main/waeup.sirp/trunk/src/waeup/sirp/catalog.txt
r5094 r5140 8 8 9 9 .. :doctest: 10 10 .. :layer: waeup.sirp.testing.WAeUPSIRPUnitTestLayer 11 11 12 12 .. contents:: -
main/waeup.sirp/trunk/src/waeup/sirp/datacenter.txt
r4999 r5140 4 4 The WAeUP data center cares for managing CSV files and importing then. 5 5 6 :Test-Layer: unit 6 .. :doctest: 7 .. :layer: waeup.sirp.testing.WAeUPSIRPUnitTestLayer 7 8 8 9 Creating a data center -
main/waeup.sirp/trunk/src/waeup/sirp/hostel/hostelcontainer.txt
r4920 r5140 4 4 Containers for hostels. 5 5 6 :Test-Layer: unit 6 .. :doctest: 7 .. :layer: waeup.sirp.testing.WAeUPSIRPUnitTestLayer 7 8 8 9 Getting a hostel container … … 22 23 Another way to get a hostel container -- without importing the class 23 24 -- is via factories. We registered a factory for hostel containers 24 under the name ``waeup.HostelContainer``:: 25 26 >>> import grok 27 >>> grok.testing.grok('waeup') 28 29 Now we can ask for an object by calling the appropriate factory: 25 under the name ``waeup.HostelContainer``. So we can ask for an object 26 by calling the appropriate factory: 30 27 31 28 >>> from zope.component import createObject -
main/waeup.sirp/trunk/src/waeup/sirp/permissions.txt
r4920 r5140 4 4 Permissions and roles used in a WAeUP portal. 5 5 6 :Test-Layer: unit 7 8 9 Before we can do something useful with roles and permissions, we have 10 to register them. This can be done simply by grokking the `waeup` 11 package: 12 13 >>> import grok 14 >>> grok.testing.grok('waeup') 6 .. :doctest: 7 .. :layer: waeup.sirp.testing.WAeUPSIRPUnitTestLayer 15 8 16 9 We can get all roles defined in a WAeUP portal: -
main/waeup.sirp/trunk/src/waeup/sirp/university/certificate.txt
r5005 r5140 6 6 Components that represent and manage certificates. 7 7 8 :Test-Layer: unit 9 10 Because certificates make use of components registered with the Zope 11 Component Architecture (ZCA), we first have to grok the `waeup` 12 package. This happens automatically in real-world use: 13 14 >>> import grok 15 >>> grok.testing.grok('waeup') 8 .. :doctest: 9 .. :layer: waeup.sirp.testing.WAeUPSIRPUnitTestLayer 16 10 17 11 -
main/waeup.sirp/trunk/src/waeup/sirp/university/certificatecontainer.txt
r5005 r5140 6 6 Containers for certificates. 7 7 8 :Test-Layer: unit 8 .. :doctest: 9 .. :layer: waeup.sirp.testing.WAeUPSIRPUnitTestLayer 9 10 10 Because this module makes use of components registered with the Zope11 Component Architecture (ZCA), we first have to grok the `waeup`12 package if we want to deploy it. This happens automatically in13 real-world use:14 15 >>> import grok16 >>> grok.testing.grok('waeup')17 11 18 12 Content Classes (models and containers) -
main/waeup.sirp/trunk/src/waeup/sirp/university/course.txt
r5005 r5140 6 6 Components that represent courses. 7 7 8 :Test-Layer: unit 9 10 Because this module makes use of components registered with the Zope 11 Component Architecture (ZCA), we first have to grok the `waeup` 12 package if we want to deploy it. This happens automatically in 13 real-world use: 14 15 >>> import grok 16 >>> grok.testing.grok('waeup') 8 .. :doctest: 9 .. :layer: waeup.sirp.testing.WAeUPSIRPUnitTestLayer 17 10 18 11 Content Classes (models and containers) -
main/waeup.sirp/trunk/src/waeup/sirp/university/coursecontainer.txt
r5005 r5140 6 6 Containers for courses. 7 7 8 :Test-Layer: unit 8 .. :doctest: 9 .. :layer: waeup.sirp.testing.WAeUPSIRPUnitTestLayer 9 10 10 Because this module makes use of components registered with the Zope11 Component Architecture (ZCA), we first have to grok the `waeup`12 package if we want to deploy it. This happens automatically in13 real-world use:14 15 >>> import grok16 >>> grok.testing.grok('waeup')17 11 18 12 Content Classes (models and containers) -
main/waeup.sirp/trunk/src/waeup/sirp/university/department.txt
r5005 r5140 6 6 Components that represent university departments. 7 7 8 :Test-Layer: unit 9 10 Before we can create departments, we have to grok the :mod:`waeup` 11 package. This happens automatically in real-world use: 12 13 >>> import grok 14 >>> grok.testing.grok('waeup') 15 8 .. :doctest: 9 .. :layer: waeup.sirp.testing.WAeUPSIRPUnitTestLayer 16 10 17 11 Content Classes (models and containers) -
main/waeup.sirp/trunk/src/waeup/sirp/university/faculty.txt
r5005 r5140 6 6 Components that represent university faculties. 7 7 8 :Test-Layer: unit 9 10 Before we can create faculties, we have to grok the :mod:`waeup` 11 package. This happens automatically in real-world use: 12 13 >>> import grok 14 >>> grok.testing.grok('waeup') 8 .. :doctest: 9 .. :layer: waeup.sirp.testing.WAeUPSIRPUnitTestLayer 10 15 11 16 12 Content Classes (models and containers) -
main/waeup.sirp/trunk/src/waeup/sirp/university/facultycontainer.txt
r5015 r5140 6 6 Components that represent faculty containers. 7 7 8 :Test-Layer: unit 9 10 Before we can create faculty containers, we have to grok the 11 :mod:`waeup.sirp` package. This happens automatically in real-world 12 use: 13 14 >>> import grok 15 >>> grok.testing.grok('waeup.sirp') 8 .. :doctest: 9 .. :layer: waeup.sirp.testing.WAeUPSIRPUnitTestLayer 16 10 17 11 -
main/waeup.sirp/trunk/src/waeup/sirp/users.txt
r4920 r5140 2 2 ************************* 3 3 4 :Test-Layer: unit 4 .. :doctest: 5 .. :layer: waeup.sirp.testing.WAeUPSIRPUnitTestLayer 5 6 6 7 Before we can start, we need some password managers available: -
main/waeup.sirp/trunk/src/waeup/sirp/utils/converters.txt
r5012 r5140 9 9 10 10 11 :Test-Layer: unit 12 13 As converters are registered as adapters, we have to grok the package 14 first: 15 16 >>> import grok 17 >>> grok.testing.grok('waeup') 11 .. :doctest: 12 .. :layer: waeup.sirp.testing.WAeUPSIRPUnitTestLayer 13 18 14 19 15 Constants -
main/waeup.sirp/trunk/src/waeup/sirp/utils/helpers.txt
r4920 r5140 6 6 Helper functions for the WAeUP SRP. 7 7 8 :Test-Layer: unit 8 .. :doctest: 9 9 10 10 :func:`removeFileOrDirectory` -
main/waeup.sirp/trunk/src/waeup/sirp/utils/importexport.txt
r5011 r5140 5 5 exportable and importable. 6 6 7 :Test-Layer: unit 7 .. :doctest: 8 .. :layer: waeup.sirp.testing.WAeUPSIRPUnitTestLayer 8 9 9 10 As imports and exports of data are a cruical point when doing updates … … 13 14 Exports and imports are implemented using the Zope component framework 14 15 capabilities. This means we need some adapters and utilities, which we 15 register, by grokking the whole package:: 16 17 >>> import grok 18 >>> grok.testing.grok('waeup') 16 register, by grokking the whole package. This is done on startup 17 automatically, but in doctests (like this one) it is done by the 18 testlayer. 19 19 20 20 Furthermore we need something to import/export. As only pickable -
main/waeup.sirp/trunk/src/waeup/sirp/widgets/table.txt
r4942 r5140 5 5 6 6 7 :doctest: 7 .. :doctest: 8 .. :layer: waeup.sirp.testing.WAeUPSIRPUnitTestLayer 8 9 9 10 Tables … … 81 82 82 83 >>> import grok 83 >>> grok.testing.grok('waeup.sirp')84 84 >>> from waeup.sirp.widgets.interfaces import ITableProvider 85 85 >>> class TableAdapter(grok.Adapter):
Note: See TracChangeset for help on using the changeset viewer.