Opened 3 years ago

Last modified 3 years ago

#33423 closed New feature

Load urls from function in URLResolver — at Version 1

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 (last modified by William)

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.

PR

Change History (1)

comment:1 by William, 3 years ago

Description: modified (diff)
Has patch: set
Note: See TracTickets for help on using tickets.
Back to Top