Add core_office_customer_account_url()
convenience/config function
This commit is contained in:
parent
35c74ff996
commit
8d47a1449c
|
@ -62,3 +62,14 @@ def core_office_url(config, require=False, **kwargs):
|
|||
url = config.get(*args, **kwargs)
|
||||
if url:
|
||||
return url.rstrip('/')
|
||||
|
||||
|
||||
def core_office_customer_account_url(config, card_number, office_url=None):
|
||||
"""
|
||||
Returns the CORE Office URL for the customer account with the given card
|
||||
number.
|
||||
"""
|
||||
if not office_url:
|
||||
office_url = core_office_url(config, require=True)
|
||||
return '{}/mem/MemberEditor.php?memNum={}'.format(
|
||||
office_url, card_number)
|
||||
|
|
Loading…
Reference in a new issue