Changeset 7321 for main/waeup.sirp/trunk/src/waeup/sirp/accesscodes
- Timestamp:
- 10 Dec 2011, 06:15:17 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/accesscodes
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/accesscode.py
r7195 r7321 31 31 from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState 32 32 from random import SystemRandom as random 33 from waeup.sirp.interfaces import I WAeUPSIRPPluggable, IObjectHistory33 from waeup.sirp.interfaces import ISIRPPluggable, IObjectHistory 34 34 from waeup.sirp.accesscodes.interfaces import ( 35 35 IAccessCode, IAccessCodeBatch, IAccessCodeBatchContainer … … 398 398 class AccessCodePlugin(grok.GlobalUtility): 399 399 grok.name('accesscodes') 400 grok.implements(I WAeUPSIRPPluggable)400 grok.implements(ISIRPPluggable) 401 401 402 402 def setup(self, site, name, logger): -
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/accesscode.txt
r6632 r7321 7 7 8 8 .. :NOdoctest: 9 .. :NOlayer: waeup.sirp.testing. WAeUPSIRPUnitTestLayer9 .. :NOlayer: waeup.sirp.testing.SIRPUnitTestLayer 10 10 11 11 About access-codes … … 591 591 .. class:: AccessCodePlugin 592 592 593 A `waeup.sirp` plugin that updates existing WAeUPSIRP university593 A `waeup.sirp` plugin that updates existing SIRP university 594 594 instances so that they provide support for access-codes. 595 595 596 .. attribute:: grok.implements(I WAeUPSIRPPluggable)596 .. attribute:: grok.implements(ISIRPPluggable) 597 597 .. attribute:: grok.name('accesscodes') 598 598 … … 608 608 609 609 The AccessCodePlugin is available as a global named utility for the 610 I WAeUPSIRPPluggable interface named ``accesscodes``.610 ISIRPPluggable interface named ``accesscodes``. 611 611 612 612 It is looked up by a university instance when created, so that this … … 615 615 616 616 >>> from zope.component import getUtility 617 >>> from waeup.sirp.interfaces import I WAeUPSIRPPluggable618 >>> plugin = getUtility(I WAeUPSIRPPluggable, name='accesscodes')617 >>> from waeup.sirp.interfaces import ISIRPPluggable 618 >>> plugin = getUtility(ISIRPPluggable, name='accesscodes') 619 619 >>> plugin 620 620 <waeup.sirp.accesscodes.accesscodes.AccessCodePlugin object at 0x...> -
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser.py
r7195 r7321 22 22 from hurry.workflow.interfaces import InvalidTransitionError 23 23 from waeup.sirp.browser.resources import datatable 24 from waeup.sirp.browser import WAeUPPage, WAeUPAddFormPage24 from waeup.sirp.browser import SIRPPage, SIRPAddFormPage 25 25 from waeup.sirp.browser.breadcrumbs import Breadcrumb 26 26 from waeup.sirp.browser.viewlets import ( 27 27 AdminTask, AddActionButton, SearchActionButton, BatchOpButton, ManageLink) 28 from waeup.sirp.interfaces import I WAeUPObject28 from waeup.sirp.interfaces import ISIRPObject 29 29 30 30 from waeup.sirp.accesscodes.interfaces import ( … … 33 33 from waeup.sirp.accesscodes.catalog import search 34 34 35 grok.context(I WAeUPObject)36 37 class BatchContainerPage( WAeUPPage):35 grok.context(ISIRPObject) 36 37 class BatchContainerPage(SIRPPage): 38 38 grok.name('index') 39 39 grok.context(IAccessCodeBatchContainer) … … 61 61 self.flash('Deleted batch %s' % name) 62 62 63 class AddBatchPage( WAeUPAddFormPage):63 class AddBatchPage(SIRPAddFormPage): 64 64 grok.name('add') 65 65 grok.context(IAccessCodeBatchContainer) … … 89 89 self.redirect(self.url(self.context)) 90 90 91 class ReimportBatchPage( WAeUPPage):91 class ReimportBatchPage(SIRPPage): 92 92 """Screen for reimporting AC batches. 93 93 """ … … 123 123 self.redirect(self.url(self.context)) 124 124 125 class BatchContainerSearchPage( WAeUPPage):125 class BatchContainerSearchPage(SIRPPage): 126 126 grok.name('search') 127 127 grok.context(IAccessCodeBatchContainer) -
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/browser.txt
r6932 r7321 4 4 .. module:: waeup.sirp.accesscodes.browser 5 5 6 Here we visit the access-code related parts of a WAeUPSIRP site using6 Here we visit the access-code related parts of a SIRP site using 7 7 a virtual browser. 8 8 -
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/interfaces.py
r7195 r7321 20 20 from zope import schema 21 21 from zope.interface import Interface 22 from waeup.sirp.interfaces import I WAeUPObject22 from waeup.sirp.interfaces import ISIRPObject 23 23 24 class IAccessCode(I WAeUPObject):24 class IAccessCode(ISIRPObject): 25 25 """An access code. 26 26 """ … … 91 91 ) 92 92 93 class IAccessCodeBatchContainer(I WAeUPObject):93 class IAccessCodeBatchContainer(ISIRPObject): 94 94 """A container for access code batches. 95 95 """ -
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/tests/test_accesscode.py
r7195 r7321 29 29 from zope.testing import renormalizing 30 30 from waeup.sirp.app import University 31 from waeup.sirp.interfaces import IObjectHistory, I WAeUPSIRPPluggable31 from waeup.sirp.interfaces import IObjectHistory, ISIRPPluggable 32 32 from waeup.sirp.testing import ( 33 33 FunctionalLayer, FunctionalTestCase, setUp, tearDown, getRootFolder) … … 412 412 def test_iface(self): 413 413 plugin = AccessCodePlugin() 414 assert verifyObject(I WAeUPSIRPPluggable, plugin)415 assert verifyClass(I WAeUPSIRPPluggable, AccessCodePlugin)414 assert verifyObject(ISIRPPluggable, plugin) 415 assert verifyClass(ISIRPPluggable, AccessCodePlugin) 416 416 417 417 def test_update_w_ac_container(self): -
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/workflow.py
r7195 r7321 24 24 from hurry.workflow.interfaces import IWorkflowState, IWorkflowTransitionEvent 25 25 from waeup.sirp.accesscodes.interfaces import IAccessCode 26 from waeup.sirp.interfaces import IObjectHistory, I WAeUPWorkflowInfo27 from waeup.sirp.workflow import WAeUPWorkflow, WAeUPWorkflowInfo26 from waeup.sirp.interfaces import IObjectHistory, ISIRPWorkflowInfo 27 from waeup.sirp.workflow import SIRPWorkflow, SIRPWorkflowInfo 28 28 29 29 INITIALIZED = 'initialized' … … 104 104 ) 105 105 106 accesscode_workflow = WAeUPWorkflow(ACCESSCODE_TRANSITIONS)106 accesscode_workflow = SIRPWorkflow(ACCESSCODE_TRANSITIONS) 107 107 108 108 class AccessCodeWorkflowState(WorkflowState, grok.Adapter): … … 113 113 state_id = 'wf.accesscode.id' 114 114 115 class AccessCodeWorkflowInfo( WAeUPWorkflowInfo, grok.Adapter):115 class AccessCodeWorkflowInfo(SIRPWorkflowInfo, grok.Adapter): 116 116 grok.context(IAccessCode) 117 grok.provides(I WAeUPWorkflowInfo)117 grok.provides(ISIRPWorkflowInfo) 118 118 119 119 def __init__(self, context):
Note: See TracChangeset for help on using the changeset viewer.