mirror of
				https://github.com/django/django.git
				synced 2025-11-03 21:25:09 +00:00 
			
		
		
		
	Fixed #21264 -- Incorrect RST usage in docs
This commit is contained in:
		
							parent
							
								
									13ddf0e002
								
							
						
					
					
						commit
						8fc63087f6
					
				
					 2 changed files with 5 additions and 4 deletions
				
			
		| 
						 | 
					@ -69,9 +69,10 @@ and override the template name::
 | 
				
			||||||
        template_name = "about.html"
 | 
					        template_name = "about.html"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Then we just need to add this new view into our URLconf.
 | 
					Then we just need to add this new view into our URLconf.
 | 
				
			||||||
`~django.views.generic.base.TemplateView` is a class, not a function, so we
 | 
					:class:`~django.views.generic.base.TemplateView` is a class, not a function,
 | 
				
			||||||
point the URL to the :meth:`~django.views.generic.base.View.as_view` class
 | 
					so we point the URL to the :meth:`~django.views.generic.base.View.as_view`
 | 
				
			||||||
method instead, which provides a function-like entry to class-based views::
 | 
					class method instead, which provides a function-like entry to class-based
 | 
				
			||||||
 | 
					views::
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # urls.py
 | 
					    # urls.py
 | 
				
			||||||
    from django.conf.urls import patterns
 | 
					    from django.conf.urls import patterns
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -191,7 +191,7 @@ If you want to override the :setting:`TEMPLATE_DIRS` setting, use the
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   The arguments could be:
 | 
					   The arguments could be:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   * A model: the model's `:meth:`~django.db.models.Model.get_absolute_url()`
 | 
					   * A model: the model's :meth:`~django.db.models.Model.get_absolute_url()`
 | 
				
			||||||
     function will be called.
 | 
					     function will be called.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   * A view name, possibly with arguments: :func:`urlresolvers.reverse
 | 
					   * A view name, possibly with arguments: :func:`urlresolvers.reverse
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue