Issue #518 , Logging download and packdownload clicks on django. Also changing the
path of preview files, capturing their clicks in django and redirecting to the original path of the preview files. We also set up a new logger for logging
clickthrough data. The logger can be turned on/off from insde the settings.py file.
- Move the logging logic from preview,sound download and pack download into one single function
- removed declaration of 'do_log' from sounds/views.py (l:226) since it was unused.
- code cleaning in search/views.py : instead of having a if/else statement, used of dict.setdefault to initialize/append to query_chain key
- changed DO_LOG_CLICKTHROUGH_DATA to LOG_CLICKTHROUGH_DATA
- changed .replace("_alt","") to .replace("data/previews_alt/","data/previews/")
- removed the mp3_alt and ogg_alt and added a url_alt inside the mp3 and ogg in the locations function (to avoid redundancy)
check for previous entries of queries to avoid logging the same query when user requests more search results pages.
Fixing merge conflicts with master