forked from jan/debianmemberportfolio
Merge branch 'master' into pylons0.10
* master: remove default readonly field support updated translations populate wikihomepage in dddatabuilder.py add input fields for wikihomepage and forumsid update translations hide showall field for non ECMAScript clients add checkbox and ECMAScript code to toggle display of all fields enable GPG fingerprint entry with disabled ECMAScript handle empty email field onBlur event correctly
This commit is contained in:
commit
47ecf9b4ea
6 changed files with 145 additions and 47 deletions
|
@ -22,12 +22,15 @@
|
|||
#
|
||||
"""This file contains code to build a representation of a person based
|
||||
on keyring data associated to a given email address."""
|
||||
import logging
|
||||
from ddportfolioservice.model import keyfinder
|
||||
|
||||
TYPE_NO = 0
|
||||
TYPE_DM = 1
|
||||
TYPE_DD = 2
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def build_data(email_address):
|
||||
"""Build a DD data structure from a given email address."""
|
||||
|
@ -43,4 +46,9 @@ def build_data(email_address):
|
|||
fields['type'] = TYPE_DM
|
||||
else:
|
||||
fields['type'] = TYPE_NO
|
||||
if fields['name']:
|
||||
log.debug('generate wikihomepage from name')
|
||||
fields['wikihomepage'] = "".join(
|
||||
[part.capitalize() for part in fields['name'].split()])
|
||||
|
||||
return fields
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue