#34812: Validate that URLConf modules contain a urlpatterns entry
-----------------------------+--------------------------------------
Reporter: The Epic | Owner: nobody
Type: New feature | Status: new
Component: Core (URLs) | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Comment (by The Epic):
Replying to [comment:1 David Sanders]:
> Hello,
>
> Django already does this with:
>
> > django.core.exceptions.ImproperlyConfigured: The included URLconf
'<module 'foo.urls' from '/path/to/foo/urls.py'>' does not appear to have
any patterns in it. If you see the 'urlpatterns' variable with valid
patterns in the file then the issue is probably caused by a circular
import.
>
> 🤔
Oh, you're right. I guess the message should be clearer. I don't really
see how circular imports would affect it.
--
Ticket URL: <https://code.djangoproject.com/ticket/34812#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018a5b1c333b-d67929b6-fcc3-42aa-bc36-1b88a4824325-000000%40eu-central-1.amazonses.com.