Opened 5 years ago

Last modified 2 years ago

#12075 assigned New feature

Add wsgiorg.routing args support

Reported by: Gustavo Owned by: Gustavo
Component: HTTP handling Version: master
Severity: Normal Keywords: WSGI, wsgiorg.routing_args
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by aaugustin)

The wsgiorg.routing_args standard may be really useful if you want to use WSGI middleware or applications inside Django because some of them take advantage of that to do nice/useful things.

It's currently not supported in Django - But it will with the attached patch.

[edit] fixed broken link.

Attachments (1)

django-wsgiorg-routing_args.diff (1.1 KB) - added by Gustavo 5 years ago.
Improved patch to support wsgiorg.routing_args

Download all attachments as: .zip

Change History (9)

comment:1 Changed 5 years ago by Gustavo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

I forgot to mention, the patch assumes that the WSGI environment is available, which won't true with mod_python until the patch I sent for #8927 is applied.

Changed 5 years ago by Gustavo

Improved patch to support wsgiorg.routing_args

comment:2 Changed 5 years ago by russellm

  • milestone 1.2 deleted
  • Needs tests set
  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 5 years ago by Gustavo

  • Status changed from new to assigned

I reimplemented this functionality as a Django middleware in twod.wsgi. That middleware has full unit test coverage:
http://bitbucket.org/2degrees/twod.wsgi/src/tip/twod/wsgi/middleware.py
http://bitbucket.org/2degrees/twod.wsgi/src/tip/tests/test_middleware.py

Would you like me to write a patch with the middleware or write tests for the initial patch?

comment:4 Changed 4 years ago by julien

  • Severity set to Normal
  • Type set to New feature

comment:5 Changed 3 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:6 Changed 3 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:7 Changed 2 years ago by aaugustin

  • Description modified (diff)

comment:8 Changed 2 years ago by Gustavo

  • Needs documentation set

I've created a pull request for this: https://github.com/django/django/pull/1004

I haven't written any documentation, but I'm happy to do it once it's been approved, in case the solution changes radically.

Note: See TracTickets for help on using tickets.
Back to Top