Ignore:
Timestamp:
11 Jan 2010, 23:18:18 (15 years ago)
Author:
uli
Message:

Fix all tests to reflect new namespace.

Location:
waeup/branches/ulif-namespace/src/waeup/sirp
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-namespace/src/waeup/sirp/README.txt

    r4789 r4797  
    2323We can easily create universities::
    2424
    25   >>> from waeup.app import University
     25  >>> from waeup.sirp.app import University
    2626  >>> u = University()
    2727  >>> u
    28   <waeup.app.University object at 0x...>
     28  <waeup.sirp.app.University object at 0x...>
    2929
    3030Universities have a name.
     
    3737
    3838  >>> u['faculties']
    39   <waeup.university.facultycontainer.FacultyContainer object at 0x...>
     39  <waeup.sirp.university.facultycontainer.FacultyContainer object at 0x...>
    4040
    4141  >>> u['students']
    42   <waeup.student.studentcontainer.StudentContainer object at 0x...>
     42  <waeup.sirp.student.studentcontainer.StudentContainer object at 0x...>
    4343
    4444  >>> u['hostels']
    45   <waeup.hostel.hostelcontainer.HostelContainer object at 0x...>
     45  <waeup.sirp.hostel.hostelcontainer.HostelContainer object at 0x...>
    4646
    4747We can export universities. For this we lookup an appropriate exporter
    4848first::
    4949
    50   >>> from waeup.interfaces import IWAeUPExporter
     50  >>> from waeup.sirp.interfaces import IWAeUPExporter
    5151  >>> exporter = IWAeUPExporter(u)
    5252  >>> exporter
    53   <waeup.utils.importexport.Exporter object at 0x...>
     53  <waeup.sirp.utils.importexport.Exporter object at 0x...>
    5454
    5555Now we can trigger the export::
     
    6262memory file::
    6363
    64   >>> from waeup.interfaces import IWAeUPXMLExporter
     64  >>> from waeup.sirp.interfaces import IWAeUPXMLExporter
    6565  >>> exporter = IWAeUPXMLExporter(u)
    6666  >>> f = exporter.export()
     
    8484We can create faculties easily::
    8585
    86   >>> from waeup.university.faculty import Faculty
     86  >>> from waeup.sirp.university.faculty import Faculty
    8787  >>> f = Faculty()
    8888  >>> f
    89   <waeup.university.faculty.Faculty object at 0x...>
     89  <waeup.sirp.university.faculty.Faculty object at 0x...>
    9090
    9191Also faculties want to be named::
  • waeup/branches/ulif-namespace/src/waeup/sirp/app.txt

    r4789 r4797  
    1 :mod:`waeup.app` -- central components for a WAeUP portal
    2 *********************************************************
     1:mod:`waeup.sirp.app` -- central components for a WAeUP portal
     2**************************************************************
    33
    44:Test-Layer: unit
    55
    6 .. module:: waeup.app
     6.. module:: waeup.sirp.app
    77
    88.. class:: University
     
    2020     An arbitrary object containing "faculties". In the case of
    2121     `University` it is a container of type
    22      `waeup.interfaces.IFacultyContainer`.
     22     `waeup.sirp.interfaces.IFacultyContainer`.
    2323
    2424
     
    3939instance:
    4040
    41     >>> from waeup.app import University
     41    >>> from waeup.sirp.app import University
    4242    >>> myuniversity = University()
    4343    >>> myuniversity
    44     <waeup.app.University object at 0x...>
     44    <waeup.sirp.app.University object at 0x...>
    4545
    4646Instances of `University` comply with the interface
    47 `waeup.interfaces.IUniversity`:
     47`waeup.sirp.interfaces.IUniversity`:
    4848
    4949    >>> from zope.interface.verify import verifyClass
    50     >>> from waeup.interfaces import IUniversity
     50    >>> from waeup.sirp.interfaces import IUniversity
    5151    >>> verifyClass(IUniversity, University)
    5252    True
     
    5555interface:
    5656
    57     >>> from waeup.app import University
     57    >>> from waeup.sirp.app import University
    5858    >>> myuniversity = University()
    5959    >>> myuniversity.name
     
    6161
    6262    >>> myuniversity['faculties']
    63     <waeup.university.facultycontainer.FacultyContainer object at 0x...>
     63    <waeup.sirp.university.facultycontainer.FacultyContainer object at 0x...>
  • waeup/branches/ulif-namespace/src/waeup/sirp/authentication.txt

    r4789 r4797  
    1212Before we can check access we have to create an app:
    1313
    14   >>> from waeup.app import University
     14  >>> from waeup.sirp.app import University
    1515  >>> root = getRootFolder()
    1616  >>> u = University()
     
    3636user credentials and some metadata persistently:
    3737
    38   >>> from waeup.authentication import Account
     38  >>> from waeup.sirp.authentication import Account
    3939  >>> alice = Account('alice', 'alicesecret')
    4040  >>> root['app']['users'].addAccount(alice)
  • waeup/branches/ulif-namespace/src/waeup/sirp/browser.txt

    r4789 r4797  
    2525  []
    2626
    27   >>> from waeup.app import University
     27  >>> from waeup.sirp.app import University
    2828  >>> u = University()
    2929  >>> root['myuniversity'] = u
     
    265265Courses are stored in :class:`ICourseContainer` instances with their
    266266code as key. CourseContainers are normally availabe as `course`
    267 attribute of :class:`waeup.university.department.Department`
     267attribute of :class:`waeup.sirp.university.department.Department`
    268268instances.
    269269
     
    413413with their code as key. CertificateContainers are normally availabe as
    414414`certificates` attribute of
    415 :class:`waeup.university.department.Department` instances.
     415:class:`waeup.sirp.university.department.Department` instances.
    416416
    417417To ease the life of users we do not require to browse the
     
    729729  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    730730  ...
    731   <b>Storage path:</b> <span>/.../waeup/files</span>
     731  <b>Storage path:</b> <span>/.../waeup/sirp/files</span>
    732732  ...
    733733
  • waeup/branches/ulif-namespace/src/waeup/sirp/browser/breadcrumbs.txt

    r4789 r4797  
    1313We create a university to check the breadcrumb functionality.
    1414
    15     >>> from waeup.app import University
     15    >>> from waeup.sirp.app import University
    1616    >>> root = getRootFolder()
    1717    >>> root['app'] = University()
     
    2424viewname:
    2525
    26     >>> from waeup.browser.breadcrumbs import getBreadcrumbList
     26    >>> from waeup.sirp.browser.breadcrumbs import getBreadcrumbList
    2727    >>> blist1 = getBreadcrumbList(app, 'index')
    2828    >>> blist1
    29     [<waeup.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>]
     29    [<waeup.sirp.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>]
    3030
    3131A slightly more extensive list for the datacenter:
     
    3434    >>> from pprint import pprint
    3535    >>> 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...>]
    3939
    4040We get a breadcrumb for university, administration area and data
     
    4949
    5050     >>> 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')]
    5454
    5555The administration area breadcrumb might be a surprise, as there is no
     
    9191Now we can get the breadcrumbs for this view:
    9292
    93     >>> from waeup.browser.breadcrumbs import getBreadcrumbListForView
     93    >>> from waeup.sirp.browser.breadcrumbs import getBreadcrumbListForView
    9494    >>> blist3 = getBreadcrumbListForView(page)
    9595    >>> [x.title for x in blist3]
     
    111111The returned breadcrumb container supports iteration:
    112112
    113     >>> from waeup.browser.interfaces import IBreadcrumbContainer
     113    >>> from waeup.sirp.browser.interfaces import IBreadcrumbContainer
    114114    >>> mybccontainer = IBreadcrumbContainer(page)
    115115    >>> [x.title for x in mybccontainer]
     
    133133
    134134    >>> from zope.component import getAdapter
    135     >>> from waeup.browser.interfaces import IBreadcrumb
     135    >>> from waeup.sirp.browser.interfaces import IBreadcrumb
    136136    >>> b1 = getAdapter(app, IBreadcrumb, 'index')
    137137    >>> b1
    138     <waeup.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>
     138    <waeup.sirp.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>
    139139
    140140Breadcrumb objects provide a title:
     
    158158    >>> b2 = getAdapter(app['datacenter'], IBreadcrumb, 'index')
    159159    >>> b2
    160     <waeup.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>
     160    <waeup.sirp.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>
    161161
    162162    >>> b2.title
     
    170170
    171171    >>> b2.parent
    172     (<waeup.app.University object at 0x...>, 'administration')
     172    (<waeup.sirp.app.University object at 0x...>, 'administration')
    173173
    174174This result denotes a new context object (the University instance we
     
    186186    >>> b3 = getAdapter(context, IBreadcrumb, viewname)
    187187    >>> b3
    188     <waeup...breadcrumbs.AdministrationBreadcrumb object at 0x...>
     188    <waeup.sirp...breadcrumbs.AdministrationBreadcrumb object at 0x...>
    189189
    190190As you can see, we get an AdministrationBreadcrumb, although the
     
    199199    >>> context, viewname = b3.parent
    200200    >>> context, viewname
    201     (<waeup.app.University object at 0x...>, 'index')
     201    (<waeup.sirp.app.University object at 0x...>, 'index')
    202202
    203203We create last breadcrumb:
  • waeup/branches/ulif-namespace/src/waeup/sirp/csvfile/README.txt

    r4789 r4797  
    1 :mod:`waeup.csvfile` -- generic support for handling CSV files
    2 **************************************************************
     1:mod:`waeup.sirp.csvfile` -- generic support for handling CSV files
     2*******************************************************************
    33
    44:Test-Layer: unit
    55
    6 .. module:: waeup.csvfile
     6.. module:: waeup.sirp.csvfile
    77   :synopsis: generic support for handling CSV files.
    88
     
    1010.. note::
    1111
    12    This version of the :mod:`waeup.csvfile` module doesn't support
     12   This version of the :mod:`waeup.sirp.csvfile` module doesn't support
    1313   Unicode input.  Also, there are currently some issues regarding
    1414   ASCII NUL characters.  Accordingly, all input should be UTF-8 or
     
    125125   The string can be uppercase, lowercase or mixed:
    126126
    127      >>> from waeup.csvfile import toBool
     127     >>> from waeup.sirp.csvfile import toBool
    128128     >>> toBool('y')
    129129     True
     
    168168object out of a path string:
    169169
    170     >>> from waeup.csvfile.interfaces import ICSVFile
     170    >>> from waeup.sirp.csvfile.interfaces import ICSVFile
    171171    >>> src = ICSVFile(path)
    172172    >>> src
    173     <waeup.csvfile.csvfile.CSVFile object at 0x...>
     173    <waeup.sirp.csvfile.csvfile.CSVFile object at 0x...>
    174174
    175175Create a receiver:
    176176
    177     >>> from waeup.csvfile.interfaces import ICSVDataReceiver
     177    >>> from waeup.sirp.csvfile.interfaces import ICSVDataReceiver
    178178    >>> class Receiver(object):
    179179    ...   grok.implements(ICSVDataReceiver)
     
    186186
    187187    >>> from zope.component import getMultiAdapter
    188     >>> from waeup.csvfile.interfaces import ICSVDataConnector
     188    >>> from waeup.sirp.csvfile.interfaces import ICSVDataConnector
    189189    >>> conn = getMultiAdapter((src, recv), ICSVDataConnector)
    190190    Traceback (most recent call last):
    191191    ...
    192     ComponentLookupError: ((<waeup.csvfile.csvfile.CSVFile object at 0x...>,
     192    ComponentLookupError: ((<waeup.sirp.csvfile.csvfile.CSVFile object at 0x...>,
    193193                            <Receiver object at 0x...>),
    194         <InterfaceClass waeup.csvfile.interfaces.ICSVDataConnector>, u'')
     194        <InterfaceClass waeup.sirp.csvfile.interfaces.ICSVDataConnector>, u'')
    195195
    196196Okay, create a connector:
     
    241241for an adapter to the path string:
    242242
    243     >>> from waeup.csvfile.interfaces import ICSVFile
     243    >>> from waeup.sirp.csvfile.interfaces import ICSVFile
    244244    >>> wrapper = ICSVFile(path)
    245245    >>> wrapper
    246     <waeup.csvfile.csvfile.CSVFile object at 0x...>
     246    <waeup.sirp.csvfile.csvfile.CSVFile object at 0x...>
    247247
    248248This wrapper can return the CSV data as a sequence of dicts:
     
    271271use the :func:`getCSVFile` function:
    272272
    273     >>> from waeup.csvfile.csvfile import getCSVFile
     273    >>> from waeup.sirp.csvfile.csvfile import getCSVFile
    274274    >>> wrapper = getCSVFile(path)
    275275    >>> wrapper
    276     <waeup.csvfile.csvfile.CSVFile object at 0x...>
     276    <waeup.sirp.csvfile.csvfile.CSVFile object at 0x...>
    277277
    278278As we currently have only one type of wrapper, we get this. Let's
    279279create another wrapper, that requires a column 'col1':
    280280
    281     >>> from waeup.csvfile.interfaces import ICSVFile
    282     >>> from waeup.csvfile import CSVFile
     281    >>> from waeup.sirp.csvfile.interfaces import ICSVFile
     282    >>> from waeup.sirp.csvfile import CSVFile
    283283    >>> class ICSVFileWithCol1(ICSVFile):
    284284    ...   """A CSV file that contains a 'col1' column.
     
    341341in constructor, whether this requirement is met:
    342342
    343     >>> from waeup.csvfile.interfaces import ICSVFile
    344     >>> from waeup.csvfile import CSVFile
     343    >>> from waeup.sirp.csvfile.interfaces import ICSVFile
     344    >>> from waeup.sirp.csvfile import CSVFile
    345345    >>> class ICSVFile13(ICSVFile):
    346346    ...   """A CSV file that contains a 'special_col' column.
     
    370370We create a wrapper that requires 'col1' and 'col2':
    371371
    372     >>> from waeup.csvfile.interfaces import ICSVFile
    373     >>> from waeup.csvfile import CSVFile
     372    >>> from waeup.sirp.csvfile.interfaces import ICSVFile
     373    >>> from waeup.sirp.csvfile import CSVFile
    374374    >>> class ICSVFile12(ICSVFile):
    375375    ...   """A CSV file that contains a 'special_col' column.
     
    390390  path (i.e. __init__ raises some kind of exception): score is -1:
    391391
    392     >>> from waeup.csvfile.csvfile import getScore
     392    >>> from waeup.sirp.csvfile.csvfile import getScore
    393393    >>> getScore('nonexistant', CSVFile)
    394394    -1
     
    426426
    427427    >>> import grok
    428     >>> from waeup.csvfile.interfaces import ICSVFile
    429     >>> from waeup.csvfile import CSVFile
     428    >>> from waeup.sirp.csvfile.interfaces import ICSVFile
     429    >>> from waeup.sirp.csvfile import CSVFile
    430430
    431431    >>> class ICustomCSVFile(ICSVFile):
     
    501501Now we create a wrapper, that requires that field:
    502502
    503     >>> from waeup.csvfile.interfaces import ICSVFile
    504     >>> from waeup.csvfile import CSVFile
     503    >>> from waeup.sirp.csvfile.interfaces import ICSVFile
     504    >>> from waeup.sirp.csvfile import CSVFile
    505505    >>> class ICSVFileWithSpecialCol(ICSVFile):
    506506    ...   """A CSV file that contains a 'special_col' column.
     
    629629before, using the :func:`getCSVFile` function:
    630630
    631     >>> from waeup.csvfile import getCSVFile
     631    >>> from waeup.sirp.csvfile import getCSVFile
    632632    >>> myfile = getCSVFile(path)
    633633    >>> ICSVFile12.providedBy(myfile)
  • waeup/branches/ulif-namespace/src/waeup/sirp/datacenter.txt

    r4789 r4797  
    1111A data center can be created easily:
    1212
    13     >>> from waeup.datacenter import DataCenter
     13    >>> from waeup.sirp.datacenter import DataCenter
    1414    >>> mydatacenter = DataCenter()
    1515    >>> mydatacenter
    16     <waeup.datacenter.DataCenter object at 0x...>
     16    <waeup.sirp.datacenter.DataCenter object at 0x...>
    1717
    1818Each data center has a location in file system where files are stored:
     
    2020    >>> storagepath = mydatacenter.storage
    2121    >>> storagepath
    22     '/.../src/waeup/files'
     22    '/.../src/waeup/sirp/files'
    2323
    2424
     
    7777
    7878    >>> mydatacenter.getFiles()
    79     [<waeup.datacenter.DataCenterFile object at 0x...>]
     79    [<waeup.sirp.datacenter.DataCenterFile object at 0x...>]
    8080
    8181As we can see, the actual file is wrapped by a convenience wrapper,
     
    122122
    123123    >>> import grok
    124     >>> from waeup.interfaces import ICSVDataReceivers
    125     >>> from waeup.datacenter import DataCenter
     124    >>> from waeup.sirp.interfaces import ICSVDataReceivers
     125    >>> from waeup.sirp.datacenter import DataCenter
    126126    >>> class SomeContainer(grok.Container):
    127127    ...   grok.implements(ICSVDataReceivers)
     
    142142to import data into instances of MyCSVReceiver:
    143143
    144     >>> from waeup.csvfile.interfaces import ICSVFile
    145     >>> from waeup.interfaces import IWAeUPCSVImporter
    146     >>> from waeup.utils.importexport import CSVImporter
     144    >>> from waeup.sirp.csvfile.interfaces import ICSVFile
     145    >>> from waeup.sirp.interfaces import IWAeUPCSVImporter
     146    >>> from waeup.sirp.utils.importexport import CSVImporter
    147147    >>> class MyCSVImporter(CSVImporter):
    148148    ...   grok.adapts(ICSVFile, MyCSVReceiver)
  • waeup/branches/ulif-namespace/src/waeup/sirp/ftesting.zcml

    r4789 r4797  
    22   xmlns="http://namespaces.zope.org/zope"
    33   i18n_domain="waeup"
    4    package="waeup"
     4   package="waeup.sirp"
    55   >
    66
    77  <include package="grok" />
    8   <include package="waeup" />
     8  <include package="waeup.sirp" />
    99
    1010  <!-- Typical functional testing security setup -->
  • waeup/branches/ulif-namespace/src/waeup/sirp/hostel/hostelcontainer.txt

    r4789 r4797  
    1 waeup.hostel.HostelContainer
    2 ****************************
     1waeup.sirp.hostel.HostelContainer
     2*********************************
    33
    44Containers for hostels.
     
    1111We can easily create `HostelContainers`::
    1212
    13     >>> from waeup.hostel.hostelcontainer import HostelContainer
     13    >>> from waeup.sirp.hostel.hostelcontainer import HostelContainer
    1414    >>> mycontainer = HostelContainer()
    1515
    1616Hostel containers provide ``IHostelContainer``:
    1717
    18     >>> from waeup.interfaces import IHostelContainer
     18    >>> from waeup.sirp.interfaces import IHostelContainer
    1919    >>> IHostelContainer.providedBy(mycontainer)
    2020    True
     
    3131    >>> from zope.component import createObject
    3232    >>> createObject(u'waeup.HostelContainer')
    33     <waeup.hostel.hostelcontainer.HostelContainer object at 0x...>
     33    <waeup.sirp.hostel.hostelcontainer.HostelContainer object at 0x...>
    3434
    3535This way we get a thing that implements IHostelContainer without
     
    5757Okay, so we have to get a hostel first::
    5858
    59     >>> from waeup.hostel.hostel import Hostel
     59    >>> from waeup.sirp.hostel.hostel import Hostel
    6060    >>> myhostel = Hostel()
    6161
  • waeup/branches/ulif-namespace/src/waeup/sirp/permissions.txt

    r4789 r4797  
    1616We can get all roles defined in a WAeUP portal:
    1717
    18     >>> from waeup.permissions import getRoles
     18    >>> from waeup.sirp.permissions import getRoles
    1919    >>> getRoles()
    2020    ['waeup.PortalManager', 'waeup.PortalUser']
  • waeup/branches/ulif-namespace/src/waeup/sirp/testing.py

    r4789 r4797  
    11import os.path
    2 import waeup
     2import waeup.sirp
    33from zope.app.testing.functional import ZCMLLayer
    44
    55ftesting_zcml = os.path.join(
    6     os.path.dirname(waeup.__file__), 'ftesting.zcml')
     6    os.path.dirname(waeup.sirp.__file__), 'ftesting.zcml')
    77FunctionalLayer = ZCMLLayer(ftesting_zcml, __name__, 'FunctionalLayer',
    88                            allow_teardown=True)
  • waeup/branches/ulif-namespace/src/waeup/sirp/university/certificate.txt

    r4789 r4797  
    1 :mod:`waeup.university.certificate` -- Certificates for WAeUP
    2 *************************************************************
    3 
    4 .. module:: waeup.university.certificate
     1:mod:`waeup.sirp.university.certificate` -- Certificates for WAeUP
     2******************************************************************
     3
     4.. module:: waeup.sirp.university.certificate
    55
    66Components that represent and manage certificates.
     
    3131   All parameters are optional:
    3232
    33      >>> from waeup.university.certificate import Certificate
     33     >>> from waeup.sirp.university.certificate import Certificate
    3434     >>> mycertificate = Certificate()
    3535
    3636   Certificates have the attributes required by the `ICertificate` interface:
    3737
    38      >>> from waeup.interfaces import ICertificate
     38     >>> from waeup.sirp.interfaces import ICertificate
    3939     >>> ICertificate.providedBy(mycertificate)
    4040     True
     
    174174
    175175      Add a reference to a course. A course is an object implementing
    176       :class:`waeup.interfaces.ICourse`.
     176      :class:`waeup.sirp.interfaces.ICourse`.
    177177
    178178      Please don't be confused by the term 'reference'. This just
    179       means an ordinary :class:`waeup.university.course.Course` object
     179      means an ordinary :class:`waeup.sirp.university.course.Course` object
    180180      in almost all cases. As this object will normaly be one stored
    181181      in a department, the course here will simply become a reference
     
    236236     >>> mycertificate = createObject(u'waeup.Certificate')
    237237     >>> mycertificate
    238      <waeup.university.certificate.Certificate object at 0x...>
     238     <waeup.sirp.university.certificate.Certificate object at 0x...>
    239239
    240240   The factory complies with the specifications from the
     
    243243     >>> from zope.interface.verify import verifyClass
    244244     >>> from zope.component.interfaces import IFactory
    245      >>> from waeup.university.certificate import CertificateFactory
     245     >>> from waeup.sirp.university.certificate import CertificateFactory
    246246     >>> verifyClass(IFactory, CertificateFactory)
    247247     True
     
    252252     >>> certificate_factory = CertificateFactory()
    253253     >>> certificate_factory.getInterfaces()
    254      <implementedBy waeup.university.certificate.Certificate>
     254     <implementedBy waeup.sirp.university.certificate.Certificate>
    255255
    256256
     
    270270     >>> mycertificatecourse = createObject(u'waeup.CertificateCourse')
    271271     >>> mycertificatecourse
    272      <waeup.university.certificate.CertificateCourse object at 0x...>
     272     <waeup.sirp.university.certificate.CertificateCourse object at 0x...>
    273273
    274274   The factory complies with the specifications from the
     
    277277     >>> from zope.interface.verify import verifyClass
    278278     >>> from zope.component.interfaces import IFactory
    279      >>> from waeup.university.certificate import CertificateCourseFactory
     279     >>> from waeup.sirp.university.certificate import CertificateCourseFactory
    280280     >>> verifyClass(IFactory, CertificateCourseFactory)
    281281     True
     
    286286     >>> certcourse_factory = CertificateCourseFactory()
    287287     >>> certcourse_factory.getInterfaces()
    288      <implementedBy waeup.university.certificate.CertificateCourse>
     288     <implementedBy waeup.sirp.university.certificate.CertificateCourse>
    289289
    290290
     
    321321We can create certificates:
    322322
    323     >>> from waeup.university.certificate import Certificate
     323    >>> from waeup.sirp.university.certificate import Certificate
    324324    >>> mycertificate = Certificate()
    325325    >>> mycertificate
    326     <waeup.university.certificate.Certificate object at 0x...>
     326    <waeup.sirp.university.certificate.Certificate object at 0x...>
    327327
    328328Another way to create certificates is by asking for a factory called
     
    333333    >>> mycertificate = createObject(u'waeup.Certificate')
    334334    >>> mycertificate
    335     <waeup.university.certificate.Certificate object at 0x...>
     335    <waeup.sirp.university.certificate.Certificate object at 0x...>
    336336
    337337CertificateCourses
     
    341341:class:`ICertificateCourse` interface:
    342342
    343     >>> from waeup.interfaces import ICertificateCourse
    344     >>> from waeup.university.certificate import CertificateCourse
     343    >>> from waeup.sirp.interfaces import ICertificateCourse
     344    >>> from waeup.sirp.university.certificate import CertificateCourse
    345345    >>> mycertcourse = CertificateCourse(None, 200, False)
    346346    >>> ICertificateCourse.providedBy(mycertcourse)
     
    357357    >>> mycertcourse = createObject(u'waeup.CertificateCourse')
    358358    >>> mycertcourse
    359     <waeup.university.certificate.CertificateCourse object at 0x...>
     359    <waeup.sirp.university.certificate.CertificateCourse object at 0x...>
    360360
    361361.. _removecertificatecourses:
  • waeup/branches/ulif-namespace/src/waeup/sirp/university/certificatecontainer.txt

    r4789 r4797  
    1 :mod:`waeup.university.certificatecontainer` -- Certificate containers
    2 **********************************************************************
     1:mod:`waeup.sirp.university.certificatecontainer` -- Certificate containers
     2***************************************************************************
    33
    4 .. module:: waeup.university.certificatecontainer
     4.. module:: waeup.sirp.university.certificatecontainer
    55
    66Containers for certificates.
     
    3232   :class:`CertificateContainer` instances are instances of
    3333   :class:`grok.Container` that hold and manage instances of
    34    :class:`waeup.university.certificate.Certificate`.
     34   :class:`waeup.sirp.university.certificate.Certificate`.
    3535
    36      >>> from waeup.university.certificatecontainer import CertificateContainer
     36     >>> from waeup.sirp.university.certificatecontainer import CertificateContainer
    3737     >>> mycontainer = CertificateContainer()
    3838     >>> mycontainer
    39      <waeup.university.certificatecontainer.CertificateContainer object at 0x...>
     39     <waeup.sirp.university.certificatecontainer.CertificateContainer object at 0x...>
    4040
    4141   Certificate containers provide `ICertificateContainer`:
    4242
    43      >>> from waeup.interfaces import ICertificateContainer
     43     >>> from waeup.sirp.interfaces import ICertificateContainer
    4444     >>> ICertificateContainer.providedBy(mycontainer)
    4545     True
     
    6363
    6464      *certificate* must be an instance of
    65       :class:`waeup.university.certificate.Certificate`:
     65      :class:`waeup.sirp.university.certificate.Certificate`:
    6666
    67         >>> from waeup.university.certificatecontainer import (
     67        >>> from waeup.sirp.university.certificatecontainer import (
    6868        ...   CertificateContainer)
    6969        >>> mycontainer = CertificateContainer()
     
    7575      The key of added items is the ``code`` attribute:
    7676
    77         >>> from waeup.university.certificate import Certificate
     77        >>> from waeup.sirp.university.certificate import Certificate
    7878        >>> mycertificate = Certificate(code='CERTIFICATE1')
    7979        >>> mycontainer.addCertificate(mycertificate)
     
    110110     >>> mycertificatecontainer = createObject(u'waeup.CertificateContainer')
    111111     >>> mycertificatecontainer
    112      <waeup.university.certificatecontainer.CertificateContainer object at 0x...>
     112     <waeup.sirp.university.certificatecontainer.CertificateContainer object at 0x...>
    113113
    114114   The factory complies with the specifications from the
     
    117117     >>> from zope.interface.verify import verifyClass
    118118     >>> from zope.component.interfaces import IFactory
    119      >>> from waeup.university.certificatecontainer import (
     119     >>> from waeup.sirp.university.certificatecontainer import (
    120120     ...   CertificateContainerFactory)
    121121     >>> verifyClass(IFactory, CertificateContainerFactory)
     
    127127     >>> certificatecontainer_factory = CertificateContainerFactory()
    128128     >>> certificatecontainer_factory.getInterfaces()
    129      <implementedBy waeup.university.certificatecontainer.CertificateContainer>
     129     <implementedBy waeup.sirp.university.certificatecontainer.CertificateContainer>
    130130
    131131
     
    138138We can easily create `CertificateContainers`:
    139139
    140     >>> from waeup.university.certificatecontainer import CertificateContainer
     140    >>> from waeup.sirp.university.certificatecontainer import CertificateContainer
    141141    >>> mycontainer = CertificateContainer()
    142142
     
    149149    >>> from zope.component import createObject
    150150    >>> createObject(u'waeup.CertificateContainer')
    151     <waeup.university.certificatecontainer.CertificateContainer object at 0x...>
     151    <waeup.sirp.university.certificatecontainer.CertificateContainer object at 0x...>
    152152
    153153This way we get a thing that implements ICertificateContainer without
  • waeup/branches/ulif-namespace/src/waeup/sirp/university/course.txt

    r4789 r4797  
    1 :mod:`waeup.university.course` -- Courses
    2 *****************************************
     1:mod:`waeup.sirp.university.course` -- Courses
     2**********************************************
    33
    4 .. module:: waeup.university.course
     4.. module:: waeup.sirp.university.course
    55
    66Components that represent courses.
     
    3030   All parameters are optional:
    3131
    32      >>> from waeup.university.course import Course
     32     >>> from waeup.sirp.university.course import Course
    3333     >>> mycourse = Course()
    3434     >>> mycourse
    35      <waeup.university.course.Course object at 0x...>
     35     <waeup.sirp.university.course.Course object at 0x...>
    3636
    3737   Course instances have the attributes required by the
    38    :class:`waeup.interfaces.ICourse` interface:
     38   :class:`waeup.sirp.interfaces.ICourse` interface:
    3939
    40      >>> from waeup.interfaces import ICourse
     40     >>> from waeup.sirp.interfaces import ICourse
    4141     >>> ICourse.providedBy(mycourse)
    4242     True
     
    105105.. class:: CourseFactory()
    106106
    107    .. attribute:: grok.name(u'waeup.Course')
     107   .. attribute:: grok.name(u'waeup.sirp.Course')
    108108
    109109   .. attribute:: grok.implements(IFactory)
     
    115115     >>> mycourse = createObject(u'waeup.Course')
    116116     >>> mycourse
    117      <waeup.university.course.Course object at 0x...>
     117     <waeup.sirp.university.course.Course object at 0x...>
    118118
    119119   The factory complies with the specifications from the
     
    122122     >>> from zope.interface.verify import verifyClass
    123123     >>> from zope.component.interfaces import IFactory
    124      >>> from waeup.university.course import CourseFactory
     124     >>> from waeup.sirp.university.course import CourseFactory
    125125     >>> verifyClass(IFactory, CourseFactory)
    126126     True
     
    131131     >>> course_factory = CourseFactory()
    132132     >>> course_factory.getInterfaces()
    133      <implementedBy waeup.university.course.Course>
     133     <implementedBy waeup.sirp.university.course.Course>
    134134
    135135Examples
     
    142142class and calling the constructor:
    143143
    144     >>> from waeup.university.course import Course
     144    >>> from waeup.sirp.university.course import Course
    145145    >>> mycourse = Course()
    146146    >>> mycourse
    147     <waeup.university.course.Course object at 0x...>
     147    <waeup.sirp.university.course.Course object at 0x...>
    148148
    149149Another way to create courses is by asking for a factory called
    150 ``waeup.Course``. This way we can create a factory without importing a
     150``waeup.sirp.Course``. This way we can create a factory without importing a
    151151class:
    152152
     
    154154    >>> mycourse = createObject(u'waeup.Course')
    155155    >>> mycourse
    156     <waeup.university.course.Course object at 0x...>
     156    <waeup.sirp.university.course.Course object at 0x...>
    157157
  • waeup/branches/ulif-namespace/src/waeup/sirp/university/coursecontainer.txt

    r4789 r4797  
    1 :mod:`waeup.university.coursecontainer` -- Course containers
    2 ************************************************************
     1:mod:`waeup.sirp.university.coursecontainer` -- Course containers
     2*****************************************************************
    33
    4 .. module:: waeup.university.coursecontainer
     4.. module:: waeup.sirp.university.coursecontainer
    55
    66Containers for courses.
     
    3232   :class:`CourseContainer` instances are instances of
    3333   :class:`grok.Container` that hold and manage instances of
    34    :class:`waeup.university.course.Course`.
     34   :class:`waeup.sirp.university.course.Course`.
    3535
    36      >>> from waeup.university.coursecontainer import CourseContainer
     36     >>> from waeup.sirp.university.coursecontainer import CourseContainer
    3737     >>> mycontainer = CourseContainer()
    3838     >>> mycontainer
    39      <waeup.university.coursecontainer.CourseContainer object at 0x...>
     39     <waeup.sirp.university.coursecontainer.CourseContainer object at 0x...>
    4040
    4141   Course containers provide `ICourseContainer`:
    4242
    43      >>> from waeup.interfaces import ICourseContainer
     43     >>> from waeup.sirp.interfaces import ICourseContainer
    4444     >>> ICourseContainer.providedBy(mycontainer)
    4545     True
     
    6363
    6464      *course* must be an instance of
    65       :class:`waeup.university.course.Course`:
     65      :class:`waeup.sirp.university.course.Course`:
    6666
    67         >>> from waeup.university.coursecontainer import CourseContainer
     67        >>> from waeup.sirp.university.coursecontainer import CourseContainer
    6868        >>> mycontainer = CourseContainer()
    6969        >>> mycontainer.addCourse('blah')
     
    7474      The key of added items is the ``code`` attribute:
    7575
    76         >>> from waeup.university.course import Course
     76        >>> from waeup.sirp.university.course import Course
    7777        >>> mycourse = Course(code='COURSE1')
    7878        >>> mycontainer.addCourse(mycourse)
     
    109109     >>> mycoursecontainer = createObject(u'waeup.CourseContainer')
    110110     >>> mycoursecontainer
    111      <waeup.university.coursecontainer.CourseContainer object at 0x...>
     111     <waeup.sirp.university.coursecontainer.CourseContainer object at 0x...>
    112112
    113113   The factory complies with the specifications from the
     
    116116     >>> from zope.interface.verify import verifyClass
    117117     >>> from zope.component.interfaces import IFactory
    118      >>> from waeup.university.coursecontainer import CourseContainerFactory
     118     >>> from waeup.sirp.university.coursecontainer import CourseContainerFactory
    119119     >>> verifyClass(IFactory, CourseContainerFactory)
    120120     True
     
    125125     >>> coursecontainer_factory = CourseContainerFactory()
    126126     >>> coursecontainer_factory.getInterfaces()
    127      <implementedBy waeup.university.coursecontainer.CourseContainer>
     127     <implementedBy waeup.sirp.university.coursecontainer.CourseContainer>
    128128
    129129
     
    136136We can easily create `CourseContainers`:
    137137
    138     >>> from waeup.university.coursecontainer import CourseContainer
     138    >>> from waeup.sirp.university.coursecontainer import CourseContainer
    139139    >>> mycontainer = CourseContainer()
    140140
     
    147147    >>> from zope.component import createObject
    148148    >>> createObject(u'waeup.CourseContainer')
    149     <waeup.university.coursecontainer.CourseContainer object at 0x...>
     149    <waeup.sirp.university.coursecontainer.CourseContainer object at 0x...>
    150150
    151151This way we get a thing that implements ICourseContainer without
  • waeup/branches/ulif-namespace/src/waeup/sirp/university/courserefs.txt

    r4789 r4797  
    1818As correct deletion of references needs support of catalogs (we lookup
    1919catalogs to find references), we need a fully blown ZODB here,
    20 including an instance of :class:`waeup.app.University`, as this is our
     20including an instance of :class:`waeup.sirp.app.University`, as this is our
    2121`ISite` object where the catalogs are stored.
    2222
     
    2525and course certificates:
    2626
    27     >>> from waeup.app import University
     27    >>> from waeup.sirp.app import University
    2828    >>> root = getRootFolder()
    2929    >>> root['app'] = University()
  • waeup/branches/ulif-namespace/src/waeup/sirp/university/department.txt

    r4789 r4797  
    1 :mod:`waeup.university.department` -- Departments
    2 *************************************************
     1:mod:`waeup.sirp.university.department` -- Departments
     2******************************************************
    33
    4 .. module:: waeup.university.department
     4.. module:: waeup.sirp.university.department
    55
    66Components that represent university departments.
     
    2626   Create a representation of a university department:
    2727
    28      >>> from waeup.university.department import Department
     28     >>> from waeup.sirp.university.department import Department
    2929     >>> mydept = Department()
    3030     >>> mydept
    31      <waeup.university.department.Department object at 0x...>
     31     <waeup.sirp.university.department.Department object at 0x...>
    3232
    3333   Another way to create :class:`Department` instances is by asking
     
    3838     >>> mydept = createObject(u'waeup.Department')
    3939     >>> mydept
    40      <waeup.university.department.Department object at 0x...>
     40     <waeup.sirp.university.department.Department object at 0x...>
    4141
    4242   :class:`Department` instances have the attributes required by the
    4343   `IDepartment` interface:
    4444
    45      >>> from waeup.interfaces import IDepartment
     45     >>> from waeup.sirp.interfaces import IDepartment
    4646     >>> IDepartment.providedBy(mydept)
    4747     True
     
    9292
    9393        >>> mydept.courses
    94         <waeup.university.coursecontainer.CourseContainer object at 0x...>
     94        <waeup.sirp.university.coursecontainer.CourseContainer object at 0x...>
    9595
    9696
     
    103103
    104104        >>> mydept.certificates
    105         <waeup...certificatecontainer.CertificateContainer object at 0x...>
     105        <waeup.sirp...certificatecontainer.CertificateContainer object at 0x...>
    106106
    107107Utilities
     
    123123     >>> mydepartment = createObject(u'waeup.Department')
    124124     >>> mydepartment
    125      <waeup.university.department.Department object at 0x...>
     125     <waeup.sirp.university.department.Department object at 0x...>
    126126
    127127   The factory complies with the specifications from the
     
    130130     >>> from zope.interface.verify import verifyClass
    131131     >>> from zope.component.interfaces import IFactory
    132      >>> from waeup.university.department import DepartmentFactory
     132     >>> from waeup.sirp.university.department import DepartmentFactory
    133133     >>> verifyClass(IFactory, DepartmentFactory)
    134134     True
     
    139139     >>> department_factory = DepartmentFactory()
    140140     >>> department_factory.getInterfaces()
    141      <implementedBy waeup.university.department.Department>
     141     <implementedBy waeup.sirp.university.department.Department>
  • waeup/branches/ulif-namespace/src/waeup/sirp/university/faculty.txt

    r4789 r4797  
    1 :mod:`waeup.university.faculty` -- Faculties
    2 ********************************************
    3 
    4 .. module:: waeup.university.faculty
     1:mod:`waeup.sirp.university.faculty` -- Faculties
     2*************************************************
     3
     4.. module:: waeup.sirp.university.faculty
    55
    66Components that represent university faculties.
     
    2525   Create a representation of a university faculty:
    2626
    27      >>> from waeup.university.faculty import Faculty
     27     >>> from waeup.sirp.university.faculty import Faculty
    2828     >>> myfac = Faculty()
    2929     >>> myfac
    30      <waeup.university.faculty.Faculty object at 0x...>
     30     <waeup.sirp.university.faculty.Faculty object at 0x...>
    3131
    3232   Another way to create :class:`Faculty` instances is by asking
     
    3737     >>> myfac = createObject(u'waeup.Faculty')
    3838     >>> myfac
    39      <waeup.university.faculty.Faculty object at 0x...>
     39     <waeup.sirp.university.faculty.Faculty object at 0x...>
    4040
    4141   :class:`Faculty` instances have the attributes required by the
    4242   `IFaculty` interface:
    4343
    44      >>> from waeup.interfaces import IFaculty
     44     >>> from waeup.sirp.interfaces import IFaculty
    4545     >>> IFaculty.providedBy(myfac)
    4646     True
     
    6666      Regular departments are accepted:
    6767
    68         >>> from waeup.university.department import Department
     68        >>> from waeup.sirp.university.department import Department
    6969        >>> myfac.addDepartment(Department(title='Physics',
    7070        ...                                code='DP'))
    7171
    7272        >>> list(myfac.items())
    73         [(u'DP', <waeup.university.department.Department object at 0x...>)]
     73        [(u'DP', <waeup.sirp.university.department.Department object at 0x...>)]
    7474
    7575   .. method:: clear()
     
    132132     >>> myfaculty = createObject(u'waeup.Faculty')
    133133     >>> myfaculty
    134      <waeup.university.faculty.Faculty object at 0x...>
     134     <waeup.sirp.university.faculty.Faculty object at 0x...>
    135135
    136136   The factory complies with the specifications from the
     
    139139     >>> from zope.interface.verify import verifyClass
    140140     >>> from zope.component.interfaces import IFactory
    141      >>> from waeup.university.faculty import FacultyFactory
     141     >>> from waeup.sirp.university.faculty import FacultyFactory
    142142     >>> verifyClass(IFactory, FacultyFactory)
    143143     True
     
    148148     >>> faculty_factory = FacultyFactory()
    149149     >>> faculty_factory.getInterfaces()
    150      <implementedBy waeup.university.faculty.Faculty>
     150     <implementedBy waeup.sirp.university.faculty.Faculty>
    151151
    152152
     
    156156We can create faculties:
    157157
    158     >>> from waeup.university.faculty import Faculty
     158    >>> from waeup.sirp.university.faculty import Faculty
    159159    >>> myfaculty = Faculty()
    160160    >>> myfaculty
    161     <waeup.university.faculty.Faculty object at 0x...>
     161    <waeup.sirp.university.faculty.Faculty object at 0x...>
    162162
    163163Another way to create faculties is by asking for a factory called
    164 ``waeup.Faculty``. Now we can create a factory without importing a
     164``waeup.sirp.Faculty``. Now we can create a factory without importing a
    165165class:
    166166
     
    168168    >>> myfaculty = createObject(u'waeup.Faculty')
    169169    >>> myfaculty
    170     <waeup.university.faculty.Faculty object at 0x...>
     170    <waeup.sirp.university.faculty.Faculty object at 0x...>
    171171
    172172Faculty attributes
     
    175175Faculties have the attributes required by the `IFaculty` interface:
    176176
    177     >>> from waeup.interfaces import IFaculty
     177    >>> from waeup.sirp.interfaces import IFaculty
    178178    >>> IFaculty.providedBy(myfaculty)
    179179    True
  • waeup/branches/ulif-namespace/src/waeup/sirp/university/facultycontainer.txt

    r4789 r4797  
    1111We can easily create `FacultyContainers`::
    1212
    13     >>> from waeup.university.facultycontainer import FacultyContainer
     13    >>> from waeup.sirp.university.facultycontainer import FacultyContainer
    1414    >>> mycontainer = FacultyContainer()
    1515
    1616Faculty containers provide `IFacultyContainer`:
    1717
    18     >>> from waeup.interfaces import IFacultyContainer
     18    >>> from waeup.sirp.interfaces import IFacultyContainer
    1919    >>> IFacultyContainer.providedBy(mycontainer)
    2020    True
     
    3131    >>> from zope.component import createObject
    3232    >>> createObject(u'waeup.FacultyContainer')
    33     <waeup.university.facultycontainer.FacultyContainer object at 0x...>
     33    <waeup.sirp.university.facultycontainer.FacultyContainer object at 0x...>
    3434
    3535This way we get a thing that implements IFacultyContainer without
     
    5757Okay, so we have to get a faculty first::
    5858
    59     >>> from waeup.university.faculty import Faculty
     59    >>> from waeup.sirp.university.faculty import Faculty
    6060    >>> myfaculty = Faculty()
    6161
  • waeup/branches/ulif-namespace/src/waeup/sirp/users.txt

    r4789 r4797  
    1616us:
    1717
    18     >>> from waeup.users import UserContainer
     18    >>> from waeup.sirp.users import UserContainer
    1919    >>> myusers = UserContainer()
    2020
     
    3333    >>> bob = myusers['bob']
    3434    >>> bob
    35     <waeup.authentication.Account object at 0x...>
     35    <waeup.sirp.authentication.Account object at 0x...>
    3636
    3737    >>> bob.name
  • waeup/branches/ulif-namespace/src/waeup/sirp/utils/csvimport.txt

    r4789 r4797  
    1 :mod:`waeup.utils.csvimport` -- CSV file importers
    2 **************************************************
     1:mod:`waeup.sirp.utils.csvimport` -- CSV file importers
     2*******************************************************
    33
    4 .. module:: waeup.utils.csvimport
     4.. module:: waeup.sirp.utils.csvimport
    55
    66Components for importing CSV files.
     
    2121data afterwards:
    2222
    23     >>> from waeup.university.facultycontainer import FacultyContainer
     23    >>> from waeup.sirp.university.facultycontainer import FacultyContainer
    2424    >>> mycontainer = FacultyContainer()
    2525
     
    3535We get a suitable importer by asking for a multi-adapter to
    3636our file and IWAeUPCSVExporter (see section above, the importexport
    37 module and the `waeup.csvfile` README for details):
     37module and the `waeup.sirp.csvfile` README for details):
    3838
    39     >>> from waeup.csvfile import getCSVFile
    40     >>> from waeup.interfaces import IWAeUPCSVImporter
     39    >>> from waeup.sirp.csvfile import getCSVFile
     40    >>> from waeup.sirp.interfaces import IWAeUPCSVImporter
    4141    >>> from zope.component import getMultiAdapter
    4242    >>> importer = getMultiAdapter((getCSVFile('myfaculties.csv'),
     
    4444    ...                            IWAeUPCSVImporter)
    4545    >>> importer
    46     <waeup.utils.csvimport.FacultyCSVImporter object at 0x...>
     46    <waeup.sirp.utils.csvimport.FacultyCSVImporter object at 0x...>
    4747
    4848This importer complies with the IWAeUPCSVImporter interface:
    4949
    50     >>> from waeup.utils.csvimport import FacultyCSVImporter
     50    >>> from waeup.sirp.utils.csvimport import FacultyCSVImporter
    5151    >>> IWAeUPCSVImporter.implementedBy(FacultyCSVImporter)
    5252    True
  • waeup/branches/ulif-namespace/src/waeup/sirp/utils/helpers.txt

    r4789 r4797  
    1 :mod:`waeup.utils.helpers` -- Helpers for the WAeUP SRP
    2 *******************************************************
    3 
    4 .. module:: waeup.utils.helpers
     1:mod:`waeup.sirp.utils.helpers` -- Helpers for the WAeUP SRP
     2************************************************************
     3
     4.. module:: waeup.sirp.utils.helpers
    55
    66Helper functions for the WAeUP SRP.
     
    1616
    1717     >>> import os
    18      >>> from waeup.utils.helpers import removeFileOrDirectory
     18     >>> from waeup.sirp.utils.helpers import removeFileOrDirectory
    1919     >>> open('blah', 'wb').write('nonsense')
    2020     >>> 'blah' in os.listdir('.')
     
    6767     >>> open(os.path.join('src', 'blah'), 'wb').write('nonsense')
    6868
    69      >>> from waeup.utils.helpers import copyFileSystemTree
     69     >>> from waeup.sirp.utils.helpers import copyFileSystemTree
    7070     >>> result = copyFileSystemTree('src', 'dst')
    7171
     
    172172   returned with all preceeding/following stuff stripped:
    173173
    174      >>> from waeup.utils.helpers import getInnerHTMLPart
     174     >>> from waeup.sirp.utils.helpers import getInnerHTMLPart
    175175     >>> print getInnerHTMLPart("""<html>
    176176     ... <head>
  • waeup/branches/ulif-namespace/src/waeup/sirp/utils/importexport.txt

    r4789 r4797  
    3333We can export faculties. First we create a faculty::
    3434
    35     >>> from waeup.university.faculty import Faculty
     35    >>> from waeup.sirp.university.faculty import Faculty
    3636    >>> myfaculty = Faculty()
    3737    >>> myfaculty.name = 'My very faculty.'
     
    4343an exporter::
    4444
    45     >>> from waeup.interfaces import IWAeUPXMLExporter
     45    >>> from waeup.sirp.interfaces import IWAeUPXMLExporter
    4646    >>> exporter = IWAeUPXMLExporter(myfaculty)
    4747    >>> exporter
    48     <waeup.utils.importexport.XMLExporter object at 0x...>
     48    <waeup.sirp.utils.importexport.XMLExporter object at 0x...>
    4949
    5050All exporters provide an ``export(<obj>)`` method::
     
    8585afterwards::
    8686
    87     >>> from waeup.university.faculty import Faculty
     87    >>> from waeup.sirp.university.faculty import Faculty
    8888    >>> myfaculty = Faculty()
    8989    >>> myfaculty.name = 'My very faculty.'
     
    9191We create an XML dump of this object::
    9292
    93     >>> from waeup.interfaces import IWAeUPXMLExporter
     93    >>> from waeup.sirp.interfaces import IWAeUPXMLExporter
    9494    >>> exporter = IWAeUPXMLExporter(myfaculty)
    9595    >>> result = exporter.export('myexport.xml')
     
    101101Now we create an importer for that file::
    102102
    103     >>> from waeup.interfaces import IWAeUPXMLImporter
     103    >>> from waeup.sirp.interfaces import IWAeUPXMLImporter
    104104    >>> importer = IWAeUPXMLImporter(myfaculty)
    105105
     
    114114
    115115    >>> new_obj
    116     <waeup.university.faculty.Faculty object at 0x...>
     116    <waeup.sirp.university.faculty.Faculty object at 0x...>
    117117
    118118    >>> new_obj.name
     
    135135
    136136    >>> new_obj
    137     <waeup.university.faculty.Faculty object at 0x...>
     137    <waeup.sirp.university.faculty.Faculty object at 0x...>
    138138
    139139Clean up::
     
    158158
    159159CSV sources build a plugin framework inside the WAeUP portal (that
    160 might be factored out one day). See `waeup.csvfile` to learn more
     160might be factored out one day). See `waeup.sirp.csvfile` to learn more
    161161about that.
    162162
    163 A `waeup.csvfile.CSVFile` plugin cares for a special kind of CSV file.
     163A `waeup.sirp.csvfile.CSVFile` plugin cares for a special kind of CSV file.
    164164
    165165To make clear what that means, we start by creating a simple CSV
     
    186186a file:
    187187
    188     >>> from waeup.csvfile import getCSVFile
     188    >>> from waeup.sirp.csvfile import getCSVFile
    189189    >>> mysource = getCSVFile('mycavedata.csv')
    190190    >>> mysource
    191     <waeup.csvfile.csvfile.CSVFile object at 0x...>
     191    <waeup.sirp.csvfile.csvfile.CSVFile object at 0x...>
    192192
    193193We define caves like this:
     
    218218importer, that imports data to the container:
    219219
    220     >>> from waeup.csvfile.interfaces import ICSVFile
    221     >>> from waeup.utils.importexport import CSVImporter
    222     >>> from waeup.interfaces import IWAeUPCSVImporter
     220    >>> from waeup.sirp.csvfile.interfaces import ICSVFile
     221    >>> from waeup.sirp.utils.importexport import CSVImporter
     222    >>> from waeup.sirp.interfaces import IWAeUPCSVImporter
    223223    >>> class CaveImporter(CSVImporter):
    224224    ...   # Tell, what kinds of objects we connect...
     
    268268  adapting this instead of ICSVData.
    269269
    270   In the `waeup.csvfile` subpackage's README it is shown, how this can
     270  In the `waeup.sirp.csvfile` subpackage's README it is shown, how this can
    271271  be accomplished.
    272272
  • waeup/branches/ulif-namespace/src/waeup/sirp/widgets/table.txt

    r4789 r4797  
    1 waeup.widgets
    2 *************
     1waeup.sirp.widgets
     2******************
    33
    44Widgets for the WAeUP SRP.
     
    1010======
    1111
    12     >>> from waeup.widgets.table import Col, Table
     12    >>> from waeup.sirp.widgets.table import Col, Table
    1313    >>> id = Col(
    1414    ...       header='Id', width=100, sortable=True, type='int',
     
    4545
    4646
    47     >>> from waeup.widgets.table import YUITable
     47    >>> from waeup.sirp.widgets.table import YUITable
    4848    >>> table = YUITable('My YUI Table', cols=(id, mycol1, mycol2))
    4949    >>> print table.getJSTableCode()
     
    7575of object. The YUIStaticTableView looks up such an adapter for a given
    7676context to find a table to manage. The adapter has to implement
    77 `ITableProvider` from `waeup.widgets.interfaces` and should provide a
     77`ITableProvider` from `waeup.sirp.widgets.interfaces` and should provide a
    7878`getTables` method.
    7979
     
    8282    >>> import grok
    8383    >>> grok.testing.grok('waeup')
    84     >>> from waeup.widgets.interfaces import ITableProvider
     84    >>> from waeup.sirp.widgets.interfaces import ITableProvider
    8585    >>> class TableAdapter(grok.Adapter):
    8686    ...   grok.context(SomeContent)
     
    102102    ...                        name='yuistatictables.js')
    103103    >>> view
    104     <waeup.widgets.table.YUIStaticTableView object at 0x...>
     104    <waeup.sirp.widgets.table.YUIStaticTableView object at 0x...>
    105105
    106106When we call the view we get pure JavaScript:
     
    126126    ...                        name='yuistatictables.js')
    127127    >>> view
    128     <waeup.widgets.table.YUIStaticTableView object at 0x...>
     128    <waeup.sirp.widgets.table.YUIStaticTableView object at 0x...>
    129129
    130130But if we call this adapter, we will get an empty result, because
Note: See TracChangeset for help on using the changeset viewer.