django-pipeline icon indicating copy to clipboard operation
django-pipeline copied to clipboard

Settings variable name conflict

Open dedayoa opened this issue 4 years ago • 1 comments

I'm using both django-pipeline and django-social-auth. It turns out that djano-social-auth has a setting discovery mechanism that attempts to read the "PIPELINE" setting, but ends up reading the setting for django-pipeline instead and consequently breaks my site. Rather than call the setting dict for pipeline 'PIPELINE', can this be made customizable in a way that it doesn't break existing projects using django-pipeline? Is there any other way around this?

dedayoa avatar Nov 16 '20 08:11 dedayoa

I mean no disrespect, but I don't think this is true:

turns out that djano-social-auth has a setting discovery mechanism that attempts to read the "PIPELINE" setting [...]

Since I am also using both django-pipeline and django-social-auth and never had this problem, I investigated a little...

Quoting the docs you linked:

Almost all settings are prefixed with SOCIAL_AUTH_, there are some exceptions for Django framework like AUTHENTICATION_BACKENDS.

And python-social-auth source confirms the use of a setting_name() function using the SETTING_PREFIX variable, which is used to load all settings including the "PIPELINE".

Is it possible you have overwritten some of that in a custom strategy?

In any case, my 2 cents, I'd vote for closing this and the PR as not reproducable and not a necessary change to django-pipeline.

fdemmer avatar May 24 '24 10:05 fdemmer