Opened 3 years ago

Closed 3 years ago

#19556 closed Cleanup/optimization (needsinfo)

Extend url include to search all packages in a namespace path

Reported by: mcanix@… Owned by: nobody
Component: Core (URLs) Version: 1.4
Severity: Normal Keywords: urls eggs
Cc: hirokiky@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: yes
Easy pickings: yes UI/UX: no

Description

When installing django eggs in the same namespace it is required to include each egg in the settings.py INSTALLED_APPS variable.

The following patch is intended to reduce the configuration when installing additional modules by only including the namespace and adding

urlpatterns += patterns('',
        (r'', include('urls', 'namespace')),
)

The patch will search all package paths declared in the namespace and collect each urlpattern to create a consolidated urlpattern attribute which it appends to the last urlconf_module to return

Attachments (2)

url_loader.diff (1.8 KB) - added by mcanix@… 3 years ago.
Patch to include all urls.py from a namespace package
url_loader_2.diff (1.7 KB) - added by hirokiky 3 years ago.
Fixed indents for the first patch.

Download all attachments as: .zip

Change History (5)

Changed 3 years ago by mcanix@…

Patch to include all urls.py from a namespace package

Changed 3 years ago by hirokiky

Fixed indents for the first patch.

comment:1 Changed 3 years ago by hirokiky

  • Cc hirokiky@… added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 3 years ago by hirokiky

  • Needs documentation set
  • Needs tests set
  • Patch needs improvement set

comment:3 Changed 3 years ago by akaariai

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

Again, we need a test case or small sample project showing us why we want this.

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