#25711: django.conf.urls.include() documentation should be more consistent
-------------------------------+--------------------
Reporter: EvilDMP | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
* in the tutorial https://docs.djangoproject.com/en/dev/intro/tutorial01
/#write-your-first-view we advise to use `include('polls.urls'))`
* in the default project template
https://github.com/django/django/blob/master/django/conf/project_template/project_name/urls.py#L12-L15
we advise to import the module and use `url(r'^blog/',
include(blog_urls))`
* in https://docs.djangoproject.com/en/dev/topics/http/urls/#including-
other-urlconfs we have examples of both - even in the same file
I think that we need to be more consistent and clearer about this.
For the tutorial and the default `urls.py` I like the use of a dotted
string rather than an import; it's one less thing to do.
Other than that, should we generally prefer one style over another? I can
imagine that a dotted string might sometimes help avoid a circular import
or have related advantages, but otherwise they seem to behave in just the
same way.
--
Ticket URL: <https://code.djangoproject.com/ticket/25711>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.924509a40193513bba2b875974419e92%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.