mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[1.8.x] Fixed #25711 -- Updated the project template's include() example.
Referencing URLs by dotted path is a stronger convention than
importing the URLs.
Backport of 179fbab7e0 from master
			
			
This commit is contained in:
		| @@ -10,8 +10,7 @@ Class-based views | |||||||
|     1. Add an import:  from other_app.views import Home |     1. Add an import:  from other_app.views import Home | ||||||
|     2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home') |     2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home') | ||||||
| Including another URLconf | Including another URLconf | ||||||
|     1. Add an import:  from blog import urls as blog_urls |     1. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls')) | ||||||
|     2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls)) |  | ||||||
| """ | """ | ||||||
| from django.conf.urls import include, url | from django.conf.urls import include, url | ||||||
| from django.contrib import admin | from django.contrib import admin | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user