Add events for new teams, events, and user confirmation
This commit is contained in:
parent
8edfa1c3ee
commit
4fdd428f57
3 changed files with 11 additions and 0 deletions
|
@ -45,6 +45,8 @@ from events import location
|
|||
|
||||
from accounts.models import EmailRecord
|
||||
|
||||
import simple_ga as ga
|
||||
|
||||
import datetime
|
||||
import simplejson
|
||||
|
||||
|
@ -145,6 +147,8 @@ def create_event(request, team_id):
|
|||
new_event.save()
|
||||
|
||||
messages.add_message(request, messages.SUCCESS, message=_('Your event has been scheduled! Next, find a place for your event.'))
|
||||
ga.add_event(request, action='new_event', category='activity', label='event', value=new_event.get_full_url())
|
||||
|
||||
return redirect('add-place', new_event.id)
|
||||
else:
|
||||
context = {
|
||||
|
|
|
@ -11,6 +11,8 @@ from events.models.events import Event, CommonEvent, Place, Attendee
|
|||
from events.forms import TeamForm, NewTeamForm, TeamDefinitionForm
|
||||
from events import location
|
||||
|
||||
import simple_ga as ga
|
||||
|
||||
import datetime
|
||||
import simplejson
|
||||
|
||||
|
@ -35,6 +37,7 @@ def start_new_team(request, *args, **kwargs):
|
|||
new_team.owner_profile = request.user.profile
|
||||
new_team.save()
|
||||
Member.objects.create(team=new_team, user=request.user.profile, role=Member.ADMIN)
|
||||
ga.add_event(request, action='new_team', category='growth', label='team', value=new_team.name)
|
||||
return redirect('define-team', team_id=new_team.pk)
|
||||
else:
|
||||
context = {
|
||||
|
|
|
@ -17,6 +17,8 @@ from accounts.models import EmailRecord
|
|||
|
||||
from .utils import get_nearby_teams
|
||||
|
||||
import simple_ga as ga
|
||||
|
||||
import datetime
|
||||
import simplejson
|
||||
|
||||
|
@ -169,6 +171,8 @@ def user_send_confirmation_email(request):
|
|||
def user_confirm_email(request, confirmation_key):
|
||||
if request.user.account.confirm_email(confirmation_key):
|
||||
messages.add_message(request, messages.SUCCESS, message=_('Your email address has been confirmed.'))
|
||||
ga.add_event(request, action='email_confirmed', category='activity', label='user', value=str(request.user.profile))
|
||||
|
||||
return redirect('confirm-notifications')
|
||||
else:
|
||||
return render(request, 'get_together/new_user/bad_email_confirmation.html')
|
||||
|
|
Loading…
Reference in a new issue