Appends the request URL to SQL statements in Django