Esempio n. 1
0
 def contribute_to_class(self, cls, name, virtual_only=False):
     super(VersionField, self).contribute_to_class(cls, name)
     if hasattr(cls, '_concurrencymeta') or cls._meta.abstract:
         return
     setattr(cls, '_concurrencymeta', ConcurrencyOptions())
     cls._concurrencymeta.field = self
     cls._concurrencymeta.base = cls
 def contribute_to_class(self, cls, *args, **kwargs):
     super(VersionField, self).contribute_to_class(cls, *args, **kwargs)
     if hasattr(cls, '_concurrencymeta') or cls._meta.abstract:
         return
     setattr(cls, '_concurrencymeta', ConcurrencyOptions())
     cls._concurrencymeta.field = self
     cls._concurrencymeta.base = cls
     cls._concurrencymeta.triggers = []