Add rattail provider for NationBuilder integration
and use it to generate NB URLs
This commit is contained in:
parent
eb6bcf8673
commit
8e4b5a2971
3 changed files with 68 additions and 3 deletions
|
@ -24,8 +24,14 @@
|
|||
NationBuilder utils
|
||||
"""
|
||||
|
||||
import warnings
|
||||
|
||||
|
||||
def get_nationbuilder_url(config):
|
||||
url = config.get('nationbuilder', 'url')
|
||||
if url:
|
||||
return url.rstrip('/')
|
||||
warnings.warn("get_nationbuilder_url() function is deprecated; "
|
||||
"please use nationbuilder_handler.get_url() instead",
|
||||
DeprecationWarning, stacklevel=2)
|
||||
|
||||
app = config.get_app()
|
||||
nationbuilder = app.get_nationbuilder_handler()
|
||||
return nationbuilder.get_url()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue