removing google analytics and clicky
This commit is contained in:
@@ -385,6 +385,24 @@ def handle_sendemail_hard(workoutid, useremail,
|
||||
return 1
|
||||
|
||||
|
||||
# send email when user deletes account
|
||||
@app.task
|
||||
def handle_sendemail_userdeleted(name, email, debug=False, **kwargs):
|
||||
fullemail = 'roosendaalsander@gmail.com'
|
||||
subject = 'User account deleted'
|
||||
message = 'Sander,\n\n'
|
||||
message += 'The user {name} ({email}) has just deleted his account'.format(
|
||||
name=name,
|
||||
email=email
|
||||
)
|
||||
email = EmailMessage(subject,message,
|
||||
'Rowsandall <info@rowsandall.com>',
|
||||
[fullemail])
|
||||
|
||||
res = email.send()
|
||||
|
||||
return 1
|
||||
|
||||
# send email to me when an unrecognized file is uploaded
|
||||
@app.task
|
||||
def handle_sendemail_unrecognized(unrecognizedfile, useremail,
|
||||
|
||||
@@ -204,24 +204,6 @@
|
||||
|
||||
</div>
|
||||
<!-- end container -->
|
||||
<!-- Clicky disabled on internal IP address
|
||||
|
||||
<script type="text/javascript">
|
||||
var clicky = { log: function(){ return; }, goal: function(){ return; }};
|
||||
var clicky_site_ids = clicky_site_ids || [];
|
||||
clicky_site_ids.push(101011008);
|
||||
var clicky_custom = {};
|
||||
(function() {
|
||||
var s = document.createElement('script');
|
||||
s.type = 'text/javascript';
|
||||
s.async = true;
|
||||
s.src = '//static.getclicky.com/js';
|
||||
( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild( s );
|
||||
})();
|
||||
</script>
|
||||
<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/101011008ns.gif" /></p></noscript>
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/static/debug_toolbar/css/print.css" type="text/css" media="print" />
|
||||
|
||||
@@ -123,7 +123,8 @@ from rowers.tasks import (
|
||||
handle_sendemailnewresponse, handle_updatedps,
|
||||
handle_updatecp,long_test_task,long_test_task2,
|
||||
handle_zip_file,handle_getagegrouprecords,
|
||||
handle_updatefitnessmetric
|
||||
handle_updatefitnessmetric,
|
||||
handle_sendemail_userdeleted,
|
||||
)
|
||||
|
||||
from scipy.signal import savgol_filter
|
||||
@@ -631,9 +632,16 @@ def remove_user(request):
|
||||
user_form = DeleteUserForm(request.POST,instance=user)
|
||||
if user_form.is_valid():
|
||||
cd = user_form.cleaned_data
|
||||
print cd
|
||||
name = user.first_name+' '+user.last_name
|
||||
email = user.email
|
||||
|
||||
|
||||
if cd['delete_user']:
|
||||
user.delete()
|
||||
res = myqueue(queuehigh,
|
||||
handle_sendemail_userdeleted,
|
||||
name, email)
|
||||
|
||||
url = reverse(auth_views.logout_then_login)
|
||||
return HttpResponseRedirect(url)
|
||||
return render(request, "userprofile_delete.html", {
|
||||
|
||||
@@ -119,7 +119,7 @@ TEMPLATES = [
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'django.template.context_processors.i18n',
|
||||
'context_processors.google_analytics',
|
||||
# 'context_processors.google_analytics',
|
||||
'context_processors.warning_message',
|
||||
],
|
||||
# 'loaders': [
|
||||
|
||||
@@ -26,9 +26,7 @@
|
||||
<script type="text/javascript" src="/static/admin/js/inlines.js"></script>
|
||||
<script src="/static/cookielaw/js/cookielaw.js"></script>
|
||||
{% analytical_head_top %}
|
||||
{% if GOOGLE_ANALYTICS_PROPERTY_ID %}
|
||||
{% include "ga.html" %}
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" href="/static/css/bokeh-0.12.3.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="/static/css/bokeh-widgets-0.12.3.min.css" type="text/css" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user