Opened 11 years ago

Closed 11 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@… 11 years ago.
Patch to include all urls.py from a namespace package
url_loader_2.diff (1.7 KB ) - added by Hiroki Kiyohara 11 years ago.
Fixed indents for the first patch.

Download all attachments as: .zip

Change History (5)

by mcanix@…, 11 years ago

Attachment: url_loader.diff added

Patch to include all urls.py from a namespace package

by Hiroki Kiyohara, 11 years ago

Attachment: url_loader_2.diff added

Fixed indents for the first patch.

comment:1 by Hiroki Kiyohara, 11 years ago

Cc: hirokiky@… added

comment:2 by Hiroki Kiyohara, 11 years ago

Needs documentation: set
Needs tests: set
Patch needs improvement: set

comment:3 by Anssi Kääriäinen, 11 years ago

Resolution: needsinfo
Status: newclosed

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