[ckan-changes] [ckan/ckan] 7387de: Only return session if it's available on environ

GitHub noreply at github.com
Wed Jun 8 07:57:10 UTC 2016


  Branch: refs/heads/poc-flask-views
  Home:   https://github.com/ckan/ckan
  Commit: 7387de097b3136d3066e5c027d3bdf7109b53567
      https://github.com/ckan/ckan/commit/7387de097b3136d3066e5c027d3bdf7109b53567
  Author: Brook Elgie <specialbrew at gmail.com>
  Date:   2016-06-08 (Wed, 08 Jun 2016)

  Changed paths:
    M ckan/config/middleware/flask_app.py

  Log Message:
  -----------
  Only return session if it's available on environ


  Commit: 5692ecc48631081760e1fdc695f95783eb8c862f
      https://github.com/ckan/ckan/commit/5692ecc48631081760e1fdc695f95783eb8c862f
  Author: Brook Elgie <specialbrew at gmail.com>
  Date:   2016-06-08 (Wed, 08 Jun 2016)

  Changed paths:
    M ckan/config/middleware/flask_app.py
    M ckan/tests/config/test_middleware.py
    M ckan/views/api.py

  Log Message:
  -----------
  Move assignment of user objects to before_request.

In Pylons we use a BaseController superclass to run common code across
all requests. In Flask, we can use handlers such as `before_request` to
achieve the same thing. In this case, we're identifying the user and
adding appropriate user objects to g.


Compare: https://github.com/ckan/ckan/compare/1f44524b4386...5692ecc48631


More information about the ckan-changes mailing list