Changeset 6249


Ignore:
Timestamp:
30 May 2011, 13:28:16 (13 years ago)
Author:
Henrik Bettermann
Message:

Provide source for LGA field (Nigerian local government areas). We need a place where we can put large lists for vocabularies. The best place would be the customization package.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/applicants
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py

    r6248 r6249  
    3838from waeup.sirp.interfaces import IWAeUPObject, SimpleWAeUPVocabulary
    3939from waeup.sirp.university.vocabularies import application_categories
     40from waeup.sirp.applicants.lgas import LGAS
    4041
    4142
     
    7374application_pins_vocab = SimpleWAeUPVocabulary(
    7475    *[(u"%s (%s)" % (x[2],x[0]),x[2]) for x in APPLICATION_TYPES])
     76lgas_vocab = SimpleWAeUPVocabulary(
     77    *sorted([(x[1],x[0]) for x in LGAS]))
    7578
    7679class CertificateSource(BasicContextualSourceFactory):
     
    383386        required = False,
    384387        )
    385     lga = schema.TextLine(
    386         # XXX: should be choice
     388    lga = schema.Choice(
     389        source = lgas_vocab,
    387390        title = u'State/LGA',
    388391        required = False,
Note: See TracChangeset for help on using the changeset viewer.