def activate_users(self, request, queryset):
        """
        Activates the selected users, if they are not already
        activated.

        """
        n = 0
        for user in queryset:
            if not user.is_active:
                user.activate()
                n += 1
        self.message_user(
            request,
            _('Successfully activated %(count)d %(items)s.') %
            {'count': n, 'items': model_ngettext(self.opts, n)},  messages.SUCCESS)
def activate_users ( self , request , queryset ) : n = 0 for user in queryset : if not user . is_active : user . activate ( ) n += 1 self . message_user ( request , _ ( 'Successfully activated %(count)d %(items)s.' ) % { 'count' : n , 'items' : model_ngettext ( self . opts , n ) } , messages . SUCCESS )
Activates the selected users, if they are not already
        activated.