@login_required
@require_POST
def join_contributors(request):
 next = (get_next_url(request) or reverse('home'))
 group = Group.objects.get(name='Contributors')
 request.user.groups.add(group)
 messages.add_message(request, messages.SUCCESS, _('You are now part of the Contributors group!'))
 return HttpResponseRedirect(next)

@ login_required @ require_POST def join_contributors ( request ) : next = ( get_next_url ( request ) or reverse ( 'home' ) ) group = Group . objects . get ( name = 'Contributors' ) request . user . groups . add ( group ) messages . add_message ( request , messages . SUCCESS , _ ( 'You are now part of the Contributors group!' ) ) return HttpResponseRedirect ( next )
join the contributors group .