@never_cache
def send_invitation_email(request, invite_pk):
 invite = get_object_or_404(Invite, pk=invite_pk)
 is_curator = invite.group.curators.filter(pk=request.user.userprofile.pk).exists()
 is_manager = request.user.userprofile.is_manager
 if (not (is_curator or is_manager)):
  raise Http404
 notify_redeemer_invitation.delay(invite.pk, invite.group.invite_email_text)
 msg = _(u'Invitation to {0} has been sent successfully.'.format(invite.redeemer))
 messages.success(request, msg)
 next_section = request.GET.get('next')
 next_url = urlparams(reverse('groups:group_edit', args=[invite.group.url]), next_section)
 return HttpResponseRedirect(next_url)

@ never_cache def send_invitation_email ( request , invite_pk ) : invite = get_object_or_404 ( Invite , pk = invite_pk ) is_curator = invite . group . curators . filter ( pk = request . user . userprofile . pk ) . exists ( ) is_manager = request . user . userprofile . is_manager if ( not ( is_curator or is_manager ) ) : raise Http404 notify_redeemer_invitation . delay ( invite . pk , invite . group . invite_email_text ) msg = _ ( u'Invitation to {0} has been sent successfully.' . format ( invite . redeemer ) ) messages . success ( request , msg ) next_section = request . GET . get ( 'next' ) next_url = urlparams ( reverse ( 'groups:group_edit' , args = [ invite . group . url ] ) , next_section ) return HttpResponseRedirect ( next_url )
send group invitation email .