Code

Opened 5 years ago

Closed 2 years ago

#10435 closed New feature (fixed)

WSGI handler class cannot be overridden in runserver

Reported by: trevor Owned by: nobody
Component: Core (Management commands) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It is currently impossible to use an alternate WSGI handler class than the default django.core.handlers.wsgi.WSGIHandler with the development server. I've included a patch with parameterizes it via an option --handler.

Attachments (2)

runserver-custom-handler.diff (2.9 KB) - added by trevor 5 years ago.
runserver-custom-handler2.diff (3.5 KB) - added by trevor 5 years ago.
Only accept subclasses of WSGIHandler (this prevents strange issues when the object was found but is not a WSGIHandler). Handle options in such a way that testserver works.

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by trevor

Changed 5 years ago by trevor

Only accept subclasses of WSGIHandler (this prevents strange issues when the object was found but is not a WSGIHandler). Handle options in such a way that testserver works.

comment:1 Changed 5 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

comment:2 Changed 3 years ago by gabrielhurley

  • Component changed from django-admin.py runserver to Core (Management commands)

comment:3 Changed 3 years ago by SmileyChris

  • Severity set to Normal
  • Type set to New feature

comment:4 Changed 3 years ago by jezdez

  • Easy pickings unset
  • UI/UX unset

This has been fixed in the past by introducing the get_handler method in the BaseRunserverCommand.

comment:5 Changed 2 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

Huh, not sure why I haven't set this to fixed.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.