plugins append all instance variables to response...
Closed this issue · 3 comments
drevicko commented
This seems like a good idea at first, but we just built a plugin that has a vocabulary as an instance variable - you can imagine how big the response is!
Two ideas:
- provide a different mechanism for populating the 'analysis' part of the response
- provide guidelines on where/how to store instance/class variables in the docs
For now, can you recommend how we should proceed?
Thx
balkian commented
Just make your variables private. For instance:
def activate(self, *args, **kwargs):
self._classifier = 5
drevicko commented
ok, variables prefixed with an underscore are ignored? Thanks (:
We should mention that in the docs (and mention that class variables are added to http responses).