Changes between Version 4 and Version 5 of IS_ONE_OF_EMPTY


Ignore:
Timestamp:
06/17/10 20:51:55 (11 years ago)
Author:
Fran Boon
Comment:

Update hyperlinks

Legend:

Unmodified
Added
Removed
Modified
  • IS_ONE_OF_EMPTY

    v4 v5  
    1818Keep in mind that the corresponding model assumes ''default validator'' against the organisation_id.
    1919
    20 The working example is [http://bazaar.launchpad.net/~flavour/sahana/sahanapy-trunk/annotate/569/controllers/or.py controllers/or.py]:[[BR]]
     20The working example is [http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/annotate/569/controllers/or.py controllers/or.py]:
    2121
    2222here the organisation_id is not mandatory, but: if present, must be validated against the (large) organisation table.
     
    2626
    2727    # the update forms are not ready. when they will - uncomment this and comment the next one
    28     #if request.args(0) in ('create','update'):
    29     if request.args(0) == 'create':
    30         db[table].organisation_id.requires = IS_NULL_OR(IS_ONE_OF_EMPTY(db, 'or_organisation.id'))
     28    #if request.args(0) in ("create", "update"):
     29    if request.args(0) == "create":
     30        db[table].organisation_id.requires = IS_NULL_OR(IS_ONE_OF_EMPTY(db, "or_organisation.id"))
    3131
    3232...
     
    3838Once it is ready, the line
    3939{{{
    40 if request.args(0) in ('create','update'):
     40if request.args(0) in ("create", "update"):
    4141}}}
    4242will replace the existing one, taking care of just ''create'':
    4343
    4444{{{
    45 if request.args(0) == 'create':
     45if request.args(0) == "create":
    4646}}}
    4747
     
    4949'''2. View - Auto-complete'''
    5050
    51 And the complimentary view [http://bazaar.launchpad.net/~flavour/sahana/sahanapy-trunk/annotate/569/views/or/office_create.html or/office_create.html]
     51And the complimentary view [http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/annotate/569/views/or/office_create.html or/office_create.html]
    5252
    5353{{{