Changeset 7903


Ignore:
Timestamp:
17 Mar 2012, 23:54:05 (13 years ago)
Author:
uli
Message:

Make description_dict a simple attribute.

Location:
main/waeup.kofa/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/buildout.cfg

    r7808 r7903  
    7777recipe = zc.recipe.egg
    7878eggs = waeup.kofa [beaker]
     79       grokcore.startup
     80       zope.app.appsetup
    7981arguments = "${buildout:parts-directory}/etc/zdaemon.conf"
    8082scripts = kofactl=kofactl
  • main/waeup.kofa/trunk/etc/site.zcml.in

    r7808 r7903  
    33           i18n_domain="waeup.kofa">
    44
    5   <include package="waeup.kofa" />
     5  <include package="waeup.kofa" file="configure.zcml" />
    66  <include package="waeup.kofa" file="mail.zcml" />
    77
  • main/waeup.kofa/trunk/setup.py

    r7808 r7903  
    2424    'reportlab',
    2525    'PIL',
     26    'zope.app.appsetup',
    2627    'zope.app.authentication', # BBB: During switch to grok 1.1
    2728    'zope.app.file',
    2829    'zope.app.testing',        # XXX: test_permissions needs this
    2930    'zope.app.undo',
     31    'zope.app.wsgi',
    3032    'zope.file',
    3133    'zope.interface >= 3.6.0',
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py

    r7868 r7903  
    2424from datetime import datetime, date
    2525from zope.component import getUtility, createObject, getAdapter
    26 from zope.formlib.form import setUpEditWidgets
    2726from zope.i18n import translate
    2827from hurry.workflow.interfaces import (
     
    150149
    151150    form_fields = grok.AutoFields(
    152         IApplicantsContainerAdd).omit('code').omit('title', 'description_dict')
     151        IApplicantsContainerAdd).omit('code').omit('title')
    153152    form_fields['startdate'].custom_widget = FriendlyDateWidget('le')
    154153    form_fields['enddate'].custom_widget = FriendlyDateWidget('le')
     
    224223    pnav = 3
    225224
    226     form_fields = grok.AutoFields(IApplicantsContainer).omit(
    227         'title', 'description_dict')
     225    form_fields = grok.AutoFields(IApplicantsContainer).omit('title')
    228226    form_fields['startdate'].custom_widget = FriendlyDateDisplayWidget('le')
    229227    form_fields['enddate'].custom_widget = FriendlyDateDisplayWidget('le')
     
    251249    grok.name('manage')
    252250    grok.template('applicantscontainermanagepage')
    253     form_fields = grok.AutoFields(IApplicantsContainer).omit(
    254         'title', 'description_dict')
     251    form_fields = grok.AutoFields(IApplicantsContainer).omit('title')
    255252    taboneactions = [_('Save'),_('Cancel')]
    256253    tabtwoactions = [_('Add applicant'), _('Remove selected'),_('Cancel')]
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/container.py

    r7847 r7903  
    5959    #: to create proper applicant objects.
    6060    factory_name = 'waeup.Applicant'
     61    #: A dictionary to hold per language translations of description string.
     62    description_dict = {}
    6163
    6264    @property
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py

    r7865 r7903  
    3131    fields = ('code', 'title', 'prefix', 'entry_level', 'year',
    3232              'provider', 'application_category', 'description',
    33               'description_dict', 'startdate', 'enddate', 'strict_deadline')
     33              'startdate', 'enddate', 'strict_deadline')
    3434
    3535    def export(self, containers, filepath=None):
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py

    r7867 r7903  
    265265        )
    266266
    267     description_dict = schema.Dict(
    268         title = u'Content as language dictionary with values in html format',
    269         required = False,
    270         default = {},
    271         )
     267    description_dict = Attribute(
     268        """Content as language dictionary with values in HTML format.""")
    272269
    273270    startdate = schema.Date(
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py

    r7864 r7903  
    4848            result,
    4949            'code,title,prefix,entry_level,year,provider,application_category,'
    50             'description,description_dict,startdate,enddate,strict_deadline\r\n'
    51             'dp2012,-,,100,,,,"This text can been seen by anonymous users.\nHere we put mult-lingual information about the study courses provided, the application procedure and deadlines.\n>>de<<\nDieser Text kann von anonymen Benutzern gelesen werden.\nHier koennen mehrsprachige Informationen fuer Antragsteller hinterlegt werden.",{},2012-01-01,,1\r\n'
     50            'description,startdate,enddate,strict_deadline\r\n'
     51            'dp2012,-,,100,,,,"This text can been seen by anonymous users.\nHere we put mult-lingual information about the study courses provided, the application procedure and deadlines.\n>>de<<\nDieser Text kann von anonymen Benutzern gelesen werden.\nHier koennen mehrsprachige Informationen fuer Antragsteller hinterlegt werden.",2012-01-01,,1\r\n'
    5252            )
    5353        return
Note: See TracChangeset for help on using the changeset viewer.