This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.utmMirror = function () { | |
if (window.location.search) { | |
var sep = this.attr('href').includes('?') ? '&' : '?'; | |
this.attr('href', this.attr('href') + sep + window.location.search.substring(1)); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def index(): | |
motech_payload = get_payload_from_motech() | |
payload = FormattedResponse(motech_payload, 'index') | |
class FormattedResponse: | |
def __init__(self, payload, type): | |
if type == 'index': | |
# perform index-related processing | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def index(): | |
motech_payload = get_stuff_from_motech() | |
self.__format_payload(motech_payload, 'index') | |
def __format_payload(self, payload, type): | |
""" | |
Call relevant restructuring methods for Motech response payload. | |
:payload: JSON payload. | |
:type: a string representing the type of request |
NewerOlder