Remove ? from path if no get parameters are given
This commit is contained in:
		
							parent
							
								
									ee42c89f48
								
							
						
					
					
						commit
						1952578f71
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		
							
								
								
									
										7
									
								
								game.py
									
										
									
									
									
								
							
							
						
						
									
										7
									
								
								game.py
									
										
									
									
									
								
							|  | @ -32,10 +32,15 @@ def log_the_request(response): | |||
|     else: | ||||
|         referrer = request.referrer | ||||
| 
 | ||||
|     if request.full_path[-1] == '?': | ||||
|         full_path = request.full_path[:-1] | ||||
|     else: | ||||
|         full_path = request.full_path | ||||
| 
 | ||||
|     log = { | ||||
|         'remote_addr': request.remote_addr, | ||||
|         'remote_user': remote_user, | ||||
|         'url': request.full_path, | ||||
|         'url': full_path, | ||||
|         'date': now.strftime("%d/%b/%Y:%H:%M:%S %z"), | ||||
|         'referrer': referrer, | ||||
|         'user_agent': request.user_agent.string, | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue