Created
May 8, 2017 13:35
-
-
Save kezabelle/795596e2d71f74b5ca068d421cfaa4cd to your computer and use it in GitHub Desktop.
Finding use of exclude on a modelform ...
This file contains hidden or 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
| from django.forms.models import ModelFormOptions | |
| def lol(self, k, v): | |
| if k == "exclude" and v: | |
| print(v) | |
| return setattr(self, k, v) | |
| ModelFormOptions.__setattr__ = lol.__get__(ModelFormOptions) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment