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