diff --git a/remo/events/e_urls.py b/remo/events/e_urls.py index 268d0edfb..6e74baa37 100644 --- a/remo/events/e_urls.py +++ b/remo/events/e_urls.py @@ -14,8 +14,6 @@ {'subscribe': True}, name='events_subscribe_to_event'), url(r'^(?P[a-z0-9-]+)/unsubscribe/$', events_views.manage_subscription, {'subscribe': False}, name='events_unsubscribe_from_event'), - url(r'^(?P[a-z0-9-]+)/plusoneconverted/$', events_views.count_converted_visitors, - name='events_count_converted_visitors'), url(r'^(?P[a-z0-9-]+)/ical/$', events_views.export_single_event_to_ical, name='events_icalendar_event'), url(r'^(?P[a-z0-9-]+)/emailattendees/$', events_views.email_attendees, diff --git a/remo/events/templates/view_event.jinja b/remo/events/templates/view_event.jinja index b1904503f..9d35a1145 100644 --- a/remo/events/templates/view_event.jinja +++ b/remo/events/templates/view_event.jinja @@ -523,24 +523,6 @@ Mozilla Reps - {{ event.name }} Planning pad -

- Use the "Get Involved" form to help people at your event sign up to Mozilla's Get Involved page. -

-

- This form will enable you to automatically keep track of their sign-ups during your event. -

-
-
- Sign-ups count: {{ event.converted_visitors }} -
- -
diff --git a/remo/events/templatetags/helpers.py b/remo/events/templatetags/helpers.py index 867d62570..8643b44d7 100644 --- a/remo/events/templatetags/helpers.py +++ b/remo/events/templatetags/helpers.py @@ -6,13 +6,6 @@ from remo.base.templatetags.helpers import urlparams -@library.filter -def get_event_converted_visitor_callback_url(obj): - """Return event converted visitor callback url.""" - return settings.SITE_URL + reverse('events_count_converted_visitors', - kwargs={'slug': obj.slug}) - - @library.global_function def get_link_to_osm(lat, lon, zoom=15): """Return link to OSM centered in lat, lon.""" @@ -80,16 +73,6 @@ def get_total_attendees(event): return event.attendees.all().count() -@library.global_function -def get_contribute_link(event): - """Returns custom link to m.o/contribute.""" - - return (settings.CONTRIBUTE_URL % - {'callbackurl': (settings.SITE_URL + - reverse('events_count_converted_visitors', - kwargs={'slug': event.slug}))}) - - @library.filter def get_event_comment_delete_url(obj): """Return the delete url of an event comment.""" diff --git a/remo/events/tests/test_helpers.py b/remo/events/tests/test_helpers.py index 1bdebbc29..c4223c8bb 100644 --- a/remo/events/tests/test_helpers.py +++ b/remo/events/tests/test_helpers.py @@ -1,14 +1,13 @@ import datetime -from django.conf import settings from django.core.urlresolvers import reverse from nose.tools import eq_, ok_ from remo.base.templatetags.helpers import urlparams from remo.base.tests import RemoTestCase -from remo.events.templatetags.helpers import (get_contribute_link, get_event_search_link, - get_sorted_attendance_list, is_multiday) +from remo.events.templatetags.helpers import (get_event_search_link, get_sorted_attendance_list, + is_multiday) from remo.events.tests import AttendanceFactory, EventFactory, START_DT from remo.reports import ACTIVITY_EVENT_CREATE from remo.reports.tests import ActivityFactory @@ -44,15 +43,6 @@ def test_attendance_list_sorting(self): eq_(copy_list, sorted_list[1:], 'List is not properly sorted.') - def test_contribute_link(self): - """Test /contribute link generation.""" - e = EventFactory.create(start=START_DT, end=self.single_day_end) - url = (settings.CONTRIBUTE_URL % - {'callbackurl': (settings.SITE_URL + - reverse('events_count_converted_visitors', - kwargs={'slug': e.slug}))}) - eq_(get_contribute_link(e), url) - def test_get_event_search_link(self): """Test event search link generation.""" search = 'SearchTerm' diff --git a/remo/events/tests/test_views.py b/remo/events/tests/test_views.py index 6ca856e20..5bb2c5404 100644 --- a/remo/events/tests/test_views.py +++ b/remo/events/tests/test_views.py @@ -313,16 +313,6 @@ def test_delete_event_admin(self, mock_success): ok_(not Event.objects.filter(pk=event.id).exists()) mock_success.assert_called_with(ANY, 'Event successfully deleted.') - def test_converted_visitors(self): - """Test converted visitors counter.""" - event = EventFactory.create() - converted_visitors = event.converted_visitors + 1 - self.client.post(reverse('events_count_converted_visitors', - kwargs={'slug': event.slug}), - follow=True) - event = Event.objects.get(slug=event.slug) - eq_(event.converted_visitors, converted_visitors) - def test_export_event_to_ical(self): """Test ical export.""" event = EventFactory.create() diff --git a/remo/events/views.py b/remo/events/views.py index 3236b969a..c3445f304 100644 --- a/remo/events/views.py +++ b/remo/events/views.py @@ -14,7 +14,6 @@ from django.utils.safestring import mark_safe from django.utils.timezone import now from django.views.decorators.cache import cache_control, never_cache -from django.views.decorators.csrf import csrf_exempt from django_statsd.clients import statsd @@ -252,20 +251,6 @@ def delete_event(request, slug): return redirect('events_list_events') -@never_cache -@csrf_exempt -def count_converted_visitors(request, slug): - """Increase event subscribers.""" - event = get_object_or_404(Event, slug=slug) - - if request.method == 'POST': - event.converted_visitors += 1 - event.save() - return HttpResponse('OK') - - return redirect('events_view_event', slug=event.slug) - - @cache_control(max_age=1800, s_maxage=1800) def export_single_event_to_ical(request, slug): """ICal export of single event.""" diff --git a/remo/settings/base.py b/remo/settings/base.py index bff502cf7..955890d4b 100644 --- a/remo/settings/base.py +++ b/remo/settings/base.py @@ -114,9 +114,6 @@ ETHERPAD_URL = 'https://public.etherpad-mozilla.org/p/' ETHERPAD_PREFIX = 'remo-' -CONTRIBUTE_URL = 'http://www.mozilla.org/contribute/event/?callbackurl=%(callbackurl)s' - - REPS_MENTORS_LIST = 'reps-mentors@lists.mozilla.org' REPS_COUNCIL_ALIAS = 'reps-council@mozilla.com' REPS_REVIEW_ALIAS = 'reps-review@mozilla.com'