code: def model(method):
          
          def wrapper(self, *args, **kwargs):
              if self.__model__ is None:
                  raise ValidationError(
                      'You cannot perform CRUD operations without selecting a '
                      'model first.',
                  )
              return method(self, *args, **kwargs)
          return wrapper
docs: Use this to decorate methods that expect a model.