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

Pristine methods don't seem to work

Open jklingen92 opened this issue 4 years ago • 1 comments

I have the following code in my settings configuration:

@pristinemethod
    def TEST(x):
        return x

When I try to invoke settings.TEST(4), I get a TypeError that says TypeError: TEST() takes 1 positional argument but 2 were given

As far as I can find in the docs there are no examples of invoking pristine methods. pristine doesn't seem to have any meaning outside of this project. Could you explain how to properly invoke a pristine method and why it's not behaving the way I expect it to?

jklingen92 avatar May 29 '20 22:05 jklingen92

I ran into the same problem. The docs currently have an example of using @pristinemethod here. However, the example they show also doesn't work. I get the same behavior as @jklingen92, the function is still provided a reference to self.

ElliottDenlinger avatar May 25 '21 13:05 ElliottDenlinger