Opened 4 years ago

#3513 new enhancement

Provide helpers for doStepIf on properties

Reported by: gracinet Owned by:
Priority: minor Milestone: undecided
Version: 0.8.12 Keywords:
Cc:

Description

If I understood correctly, on Nine, doStepIf can't access properties directly anymore, they have to access db, use a deferred etc.

It would be nice for adoption to provide helpers for that. I can share something that works like this, provided one tells me where to put it.

      @conditions.props
      def is_python_34(props):  # will be readily usable as a doStepIf 
          return props.get('py_version'[0]) == 3.4

The conditions.props decorator takes care of calling the DB API, inlineCallbacks etc.

Change History (0)

Note: See TracTickets for help on using tickets.