Opened 3 years ago

Last modified 3 years ago

#33423 closed New feature

Load urls from function in URLResolver — at Initial Version

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

Description

Instead of immediately raising an error if the urlpatterns in the loaded module is not a list, it would instead check if there is a
get_urls function in the module and call it. If there is no such function or it returns something other then a list raise the error, if it returns a list then use that instead of raising an error.

Change History (0)

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