Question: Should the event subscriber always register the event handler, or is it ok for another class to do it?

Example:

```
class EventPublisher {

    public event EventHandler Event;
}

class EventSubscriber {

    public void Handler(object sender, EventArgs e) { }
}

class Glue {

    private EventPublisher _publisher = new EventPublisher();

    private EventSubscriber _subscriber = new EventSubscriber();

    public Glue() {
        _publisher.Event += _subscriber.Handler;
    }
}

```

Answer: 
I saw this in the django many to many documentation and it worked:

```
posts = Post.objects.filter(mentions__pk=customer.id)

```
It absolutely isn't, I'm afraid.

```
customer = Customer.objects.get(user=request.user)
posts = Post.objects.filter(mentions__in=customer).order_by('-created_at')

```

Would fail at `mentions__in = customer` because the `__in` [lookup](https://docs.djangoproject.com/en/2.0/ref/models/querysets/#in) expects an iterable (which a single customer is not).

Aside from that, that query would give you all posts in which `customer` was mentioned, which could also be achieved in two more straight forward ways:

```
posts = Post.objects.filter(mentions=customer).order_by('-created_at')

posts = customer.mentions.order_by('-created_at') # using the 'related_name' from the customer's side

```

You want to get all the users that are mentioned in a post. But what post? You forgot to mention that in your question. You only gave us the current user (`request.user`), who can have multiple posts.  

I'm going to guess and show how you could get all other users mentioned in posts made by the current user.  

To make things clearer in respect to the `related_name` of that relation, I will change it to `related_name = 'mentionend'`.

```
posts = Post.objects.filter(mentions=customer) # all posts of the current user

# all other users mentioned in those posts
users = Customer.objects.exclude(user=customer).filter(mentionend__in=posts) # using 'related_name'
# or
users = posts.mentions.exclude(user=customer) 

```