mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	[2.2.x] Fixed #30161 -- Added how to decorate class-based views to view decorators docs.
Backport of 406de977ea from master.
			
			
This commit is contained in:
		
				
					committed by
					
						 Tim Graham
						Tim Graham
					
				
			
			
				
	
			
			
			
						parent
						
							282961f553
						
					
				
				
					commit
					14240e491e
				
			| @@ -307,6 +307,9 @@ decorator. In the example, ``never_cache()`` will process the request before | ||||
| ``login_required()``. | ||||
|  | ||||
| In this example, every instance of ``ProtectedView`` will have login protection. | ||||
| These examples use ``login_required``, however, the same behavior can be | ||||
| obtained more simply using | ||||
| :class:`~django.contrib.auth.mixins.LoginRequiredMixin`. | ||||
|  | ||||
| .. note:: | ||||
|  | ||||
|   | ||||
| @@ -7,6 +7,9 @@ View decorators | ||||
| Django provides several decorators that can be applied to views to support | ||||
| various HTTP features. | ||||
|  | ||||
| See :ref:`decorating-class-based-views` for how to use these decorators with | ||||
| class-based views. | ||||
|  | ||||
| Allowed HTTP methods | ||||
| ==================== | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user