Last active
December 16, 2015 17:10
-
-
Save hub-cap/5468758 to your computer and use it in GitHub Desktop.
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
class DatabaseModelBase(models.ModelBase):¬ | |
_auto_generated_attrs = ['id']¬ | |
_uuid_strategy = uuidutils.generate_uuid¬ | |
¬ | |
@classmethod¬ | |
def create(cls, **values):¬ | |
print cls¬ | |
print cls._uuid_strategy | |
print cls._uuid_strategy() | |
Printed output | |
<class 'reddwarf.instance.models.ServiceImage'> | |
<unbound method ServiceImage.generate_uuid> | |
And error | |
Run tests failed: unbound method generate_uuid() must be called with ServiceImage instance as first argument (got nothing instead) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment