Gramex 1.43 Release Notes

FormHandler Edits Modify

FormHandler Edit methods now supports modify: method. For PUT, POST, etc, methods now you can run an action AFTER the edit action.

Below configuration has two modify: – which are called after edit operation.

formhandler-edits-multidata-modify:
  pattern: /$YAMLURL/edits-multidata-modify
  handler: FormHandler
  kwargs:
    csv:
      url: $YAMLPATH/sales-edits.csv
      encoding: utf-8
      id: [city, product]
      modify: emailer.send
    sql:
      url: mysql+pymysql://root@$MYSQL_SERVER/DB?charset=utf8
      table: sales
      id: [city, product]
    modify: emailer.sendall

modify: can be any expression/function that uses data – count of records edited and handlerhandler.args contains data submitted by the user.

Developer Updates

This also fixes responsive layouts in PDF and PNG downloads.

Bug fixes

Stats

Upgrade

Note: gramex >= 1.41 onwards requires Anaconda >= 5.2.0

To upgrade Gramex, run:

pip install --verbose gramex==1.43

To upgrade apps dependencies, run:

gramex setup --all

This downloads Chromium and other front-end dependencies. That may take time.