mirror of
				https://github.com/django/django.git
				synced 2025-11-04 13:39:16 +00:00 
			
		
		
		
	Modernize the CSRF migration helper.
Thanks Lennart Regebro for spotting that code.
This commit is contained in:
		
							parent
							
								
									9c487b5974
								
							
						
					
					
						commit
						c6964feb54
					
				
					 1 changed files with 4 additions and 6 deletions
				
			
		| 
						 | 
					@ -281,12 +281,10 @@ def search_python_list(python_code, template_names):
 | 
				
			||||||
    Returns a list of tuples, each one being:
 | 
					    Returns a list of tuples, each one being:
 | 
				
			||||||
     (filename, line number)
 | 
					     (filename, line number)
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    retval = []
 | 
					    retval = set()
 | 
				
			||||||
    for tn in template_names:
 | 
					    for tn in template_names:
 | 
				
			||||||
        retval.extend(search_python(python_code, tn))
 | 
					        retval.update(search_python(python_code, tn))
 | 
				
			||||||
    retval = list(set(retval))
 | 
					    return sorted(retval)
 | 
				
			||||||
    retval.sort()
 | 
					 | 
				
			||||||
    return retval
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
def search_python(python_code, template_name):
 | 
					def search_python(python_code, template_name):
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue