Django

Code

Ticket #8952 (new)

Opened 1 year ago

Last modified 9 months ago

Refactor a Django "site" to be just another view function

Reported by: simon Assigned to: nobody
Milestone: Component: Contrib apps
Version: 1.0 Keywords: djangocon
Cc: Triage Stage: Design decision needed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

At the moment middleware applies globally (unless you use the decorator_from_middleware hack). A Django powered site is essentially a thing that takes an HTTP request and returns an HTTP response. We should refactor things a bit so the highlest level of a Django site is just another view, which can compose bits of middleware and a URL dispatcher. This way Django applications end up composed of nested view functions, URL dispatchers and middleware which is really elegant. It won't be easy to do this due to lots of existing code expecting things to be how they are at the moment, but it's worth investigating.

Attachments

Change History

09/08/08 00:41:23 changed by simon

  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

Getting reverse to work will be really hard.

02/25/09 16:51:30 changed by jacob

  • stage changed from Unreviewed to Design decision needed.

05/08/09 11:12:17 changed by thejaswi_puthraya

  • component changed from Uncategorized to Contrib apps.

Add/Change #8952 (Refactor a Django "site" to be just another view function)




Change Properties
Action