You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Django community has been interested in finding a way, for a while now, to remove global state from the framework. This is a good pattern to adopt in any API, in practice. For instance:
In the above example, the get_gateway method would instantiate the gateway matching the given gateway name with the provided settings. The gateway's __init__ method would be updated to support this. If no settings were provided, the existing merchant_settings = getattr(settings, "MERCHANT_SETTINGS") would take over. The change would be fully backwards compatible.
The text was updated successfully, but these errors were encountered:
I think this is a valid request and I think there may have been a fork [1] with someone working on it. Would you be interested in contributing a pull request?
The Django community has been interested in finding a way, for a while now, to remove global state from the framework. This is a good pattern to adopt in any API, in practice. For instance:
In the above example, the
get_gateway
method would instantiate the gateway matching the given gateway name with the provided settings. The gateway's__init__
method would be updated to support this. If no settings were provided, the existingmerchant_settings = getattr(settings, "MERCHANT_SETTINGS")
would take over. The change would be fully backwards compatible.The text was updated successfully, but these errors were encountered: