- Timestamp:
- 28 Jan 2010, 09:37:05 (15 years ago)
- Location:
- waeup/branches/ulif-namespace/src/waeup/sirp
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-namespace/src/waeup/sirp/authentication.txt
r4789 r4921 12 12 Before we can check access we have to create an app: 13 13 14 >>> from waeup. app import University14 >>> from waeup.sirp.app import University 15 15 >>> root = getRootFolder() 16 16 >>> u = University() … … 36 36 user credentials and some metadata persistently: 37 37 38 >>> from waeup. authentication import Account38 >>> from waeup.sirp.authentication import Account 39 39 >>> alice = Account('alice', 'alicesecret') 40 40 >>> root['app']['users'].addAccount(alice) -
waeup/branches/ulif-namespace/src/waeup/sirp/browser.txt
r4905 r4921 25 25 [] 26 26 27 >>> from waeup. app import University27 >>> from waeup.sirp.app import University 28 28 >>> u = University() 29 29 >>> root['myuniversity'] = u … … 265 265 Courses are stored in :class:`ICourseContainer` instances with their 266 266 code as key. CourseContainers are normally availabe as `course` 267 attribute of :class:`waeup. university.department.Department`267 attribute of :class:`waeup.sirp.university.department.Department` 268 268 instances. 269 269 … … 413 413 with their code as key. CertificateContainers are normally availabe as 414 414 `certificates` attribute of 415 :class:`waeup. university.department.Department` instances.415 :class:`waeup.sirp.university.department.Department` instances. 416 416 417 417 To ease the life of users we do not require to browse the … … 725 725 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 726 726 ... 727 <b>Storage path:</b> <span>/.../waeup/ files</span>727 <b>Storage path:</b> <span>/.../waeup/sirp/files</span> 728 728 ... 729 729 -
waeup/branches/ulif-namespace/src/waeup/sirp/browser/batchprocessing.txt
r4899 r4921 23 23 Create a site: 24 24 25 >>> from waeup. app import University25 >>> from waeup.sirp.app import University 26 26 >>> getRootFolder()['app'] = University() 27 27 -
waeup/branches/ulif-namespace/src/waeup/sirp/browser/breadcrumbs.txt
r4789 r4921 13 13 We create a university to check the breadcrumb functionality. 14 14 15 >>> from waeup. app import University15 >>> from waeup.sirp.app import University 16 16 >>> root = getRootFolder() 17 17 >>> root['app'] = University() … … 24 24 viewname: 25 25 26 >>> from waeup. browser.breadcrumbs import getBreadcrumbList26 >>> from waeup.sirp.browser.breadcrumbs import getBreadcrumbList 27 27 >>> blist1 = getBreadcrumbList(app, 'index') 28 28 >>> blist1 29 [<waeup. browser.breadcrumbs.UniversityBreadcrumb object at 0x...>]29 [<waeup.sirp.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>] 30 30 31 31 A slightly more extensive list for the datacenter: … … 34 34 >>> from pprint import pprint 35 35 >>> pprint(blist2) 36 [<waeup. browser.breadcrumbs.UniversityBreadcrumb object at 0x...>,37 <waeup. browser.breadcrumbs.AdministrationBreadcrumb object at 0x...>,38 <waeup. browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>]36 [<waeup.sirp.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>, 37 <waeup.sirp.browser.breadcrumbs.AdministrationBreadcrumb object at 0x...>, 38 <waeup.sirp.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>] 39 39 40 40 We get a breadcrumb for university, administration area and data … … 49 49 50 50 >>> pprint([(x.context, x.viewname) for x in blist2]) 51 [(<waeup. app.University object at 0x...>, 'index'),52 (<waeup. app.University object at 0x...>, 'administration'),53 (<waeup. datacenter.DataCenter object at 0x...>, 'index')]51 [(<waeup.sirp.app.University object at 0x...>, 'index'), 52 (<waeup.sirp.app.University object at 0x...>, 'administration'), 53 (<waeup.sirp.datacenter.DataCenter object at 0x...>, 'index')] 54 54 55 55 The administration area breadcrumb might be a surprise, as there is no … … 91 91 Now we can get the breadcrumbs for this view: 92 92 93 >>> from waeup. browser.breadcrumbs import getBreadcrumbListForView93 >>> from waeup.sirp.browser.breadcrumbs import getBreadcrumbListForView 94 94 >>> blist3 = getBreadcrumbListForView(page) 95 95 >>> [x.title for x in blist3] … … 111 111 The returned breadcrumb container supports iteration: 112 112 113 >>> from waeup. browser.interfaces import IBreadcrumbContainer113 >>> from waeup.sirp.browser.interfaces import IBreadcrumbContainer 114 114 >>> mybccontainer = IBreadcrumbContainer(page) 115 115 >>> [x.title for x in mybccontainer] … … 133 133 134 134 >>> from zope.component import getAdapter 135 >>> from waeup. browser.interfaces import IBreadcrumb135 >>> from waeup.sirp.browser.interfaces import IBreadcrumb 136 136 >>> b1 = getAdapter(app, IBreadcrumb, 'index') 137 137 >>> b1 138 <waeup. browser.breadcrumbs.UniversityBreadcrumb object at 0x...>138 <waeup.sirp.browser.breadcrumbs.UniversityBreadcrumb object at 0x...> 139 139 140 140 Breadcrumb objects provide a title: … … 158 158 >>> b2 = getAdapter(app['datacenter'], IBreadcrumb, 'index') 159 159 >>> b2 160 <waeup. browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>160 <waeup.sirp.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...> 161 161 162 162 >>> b2.title … … 170 170 171 171 >>> b2.parent 172 (<waeup. app.University object at 0x...>, 'administration')172 (<waeup.sirp.app.University object at 0x...>, 'administration') 173 173 174 174 This result denotes a new context object (the University instance we … … 186 186 >>> b3 = getAdapter(context, IBreadcrumb, viewname) 187 187 >>> b3 188 <waeup. ..breadcrumbs.AdministrationBreadcrumb object at 0x...>188 <waeup.sirp...breadcrumbs.AdministrationBreadcrumb object at 0x...> 189 189 190 190 As you can see, we get an AdministrationBreadcrumb, although the … … 199 199 >>> context, viewname = b3.parent 200 200 >>> context, viewname 201 (<waeup. app.University object at 0x...>, 'index')201 (<waeup.sirp.app.University object at 0x...>, 'index') 202 202 203 203 We create last breadcrumb: -
waeup/branches/ulif-namespace/src/waeup/sirp/ftesting.zcml
r4789 r4921 1 1 <configure 2 2 xmlns="http://namespaces.zope.org/zope" 3 i18n_domain="waeup "4 package="waeup "3 i18n_domain="waeup.sirp" 4 package="waeup.sirp" 5 5 > 6 6 7 7 <include package="grok" /> 8 <include package="waeup " />8 <include package="waeup.sirp" /> 9 9 10 10 <!-- Typical functional testing security setup --> -
waeup/branches/ulif-namespace/src/waeup/sirp/university/courserefs.txt
r4789 r4921 18 18 As correct deletion of references needs support of catalogs (we lookup 19 19 catalogs to find references), we need a fully blown ZODB here, 20 including an instance of :class:`waeup. app.University`, as this is our20 including an instance of :class:`waeup.sirp.app.University`, as this is our 21 21 `ISite` object where the catalogs are stored. 22 22 … … 25 25 and course certificates: 26 26 27 >>> from waeup. app import University27 >>> from waeup.sirp.app import University 28 28 >>> root = getRootFolder() 29 29 >>> root['app'] = University() -
waeup/branches/ulif-namespace/src/waeup/sirp/utils/batching.txt
r4912 r4921 1 :mod:`waeup. utils.batching` -- Batch processing2 *********************************************** 1 :mod:`waeup.sirp.utils.batching` -- Batch processing 2 **************************************************** 3 3 4 4 Batch processing is much more than pure data import. … … 190 190 All we need, is a batch processor now. 191 191 192 >>> from waeup. utils.batching import BatchProcessor192 >>> from waeup.sirp.utils.batching import BatchProcessor 193 193 >>> class CaveProcessor(BatchProcessor): 194 194 ... util_name = 'caveprocessor'
Note: See TracChangeset for help on using the changeset viewer.