Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StateField with abstract models #59

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

lehins
Copy link

@lehins lehins commented May 19, 2014

Changes submitted in this pull request allow adding a StateField to an abstract model.
It behaves as expected: _state_log_model and other model methods are added only to concrete models.
Also couple minor changes that allow using test_proj to run tests:

  • get_state_info().initial is referenced here, but not implemented
  • test_proj/settings.py uses os but doesn't import it

And it also implements suggestion #56

@lehins
Copy link
Author

lehins commented Jun 20, 2014

As is specified in django documentation sender should be a model class not an instance. This pull request fixes that too.

@@ -85,6 +85,14 @@ def name(si_self):
return getattr(self, field)

@property
def initial(si_self):
"""
The description of the current state
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this docstring correct? Don't you mean the initial state?

@gvangool gvangool mentioned this pull request Oct 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants