Ignore:
Timestamp:
28 Nov 2014, 16:17:38 (10 years ago)
Author:
Henrik Bettermann
Message:

Rename dictionaries in order to not confuse all the dicts.

Rename UserExporter?.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/customer.py

    r12035 r12087  
    124124    def translated_state(self):
    125125        try:
    126             TRANSLATED_STATES = getUtility(ICustomersUtils).TRANSLATED_STATES
     126            TRANSLATED_STATES = getUtility(
     127                ICustomersUtils).TRANSLATED_CUSTOMER_STATES
    127128            ts = TRANSLATED_STATES[self.state]
    128129            return ts
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/utils.py

    r12062 r12087  
    281281    SKIP_UPLOAD_VIEWLETS = ()
    282282
    283     TRANSLATED_STATES = {
     283    TRANSLATED_CUSTOMER_STATES = {
    284284        CREATED: _('created'),
    285285        STARTED: _('started'),
  • main/waeup.ikoba/trunk/src/waeup/ikoba/documents/document.py

    r12063 r12087  
    6464    def translated_state(self):
    6565        try:
    66             TRANSLATED_STATES = getUtility(IDocumentsUtils).TRANSLATED_STATES
     66            TRANSLATED_STATES = getUtility(
     67                IDocumentsUtils).TRANSLATED_DOCUMENT_STATES
    6768            return TRANSLATED_STATES[self.state]
    6869        except KeyError:
  • main/waeup.ikoba/trunk/src/waeup/ikoba/documents/utils.py

    r12033 r12087  
    3939    DOCMANAGE_STATES = (CREATED,)
    4040
    41     TRANSLATED_STATES = {
     41    TRANSLATED_DOCUMENT_STATES = {
    4242        CREATED: _('created'),
    4343        SUBMITTED: _('submitted for verification'),
  • main/waeup.ikoba/trunk/src/waeup/ikoba/userscontainer.py

    r11954 r12087  
    6666
    6767
    68 class UsersExporter(grok.GlobalUtility, ExporterBase):
     68class UserExporter(grok.GlobalUtility, ExporterBase):
    6969    """Exporter for user accounts.
    7070    """
     
    9898                value[role] = object_list
    9999        return super(
    100             UsersExporter, self).mangle_value(
     100            UserExporter, self).mangle_value(
    101101            value, name, context=context)
    102102
  • main/waeup.ikoba/trunk/src/waeup/ikoba/userscontainer.txt

    r11952 r12087  
    5050We can export user accounts:
    5151
    52     >>> from waeup.ikoba.userscontainer import UsersExporter
     52    >>> from waeup.ikoba.userscontainer import UserExporter
    5353    >>> import os
    5454    >>> import tempfile
    5555    >>> workdir = tempfile.mkdtemp()
    5656    >>> outfile = os.path.join(workdir, 'myoutput.csv')
    57     >>> exporter = UsersExporter()
     57    >>> exporter = UserExporter()
    5858    >>> site = {'users':myusers}
    5959    >>> exporter.export_all(site, outfile)
Note: See TracChangeset for help on using the changeset viewer.