title: Reverse Many-to-Many relation in Django REST Framework
body: <p>How can I create reverse field in Django REST framework for both many-to-many related objects serializers?</p>
  
  <pre><code>**Models**
  
  class Tag(models.Model):
      name = models.CharField(max_length=500, blank=True)
  
  class Event(models.Model):
      max_attendee = models.IntegerField(default=0)
      description = models.TextField(blank=True)
      tags = models.ManyToManyField(Tag, related_name='events_tags')
  
  
  ** Serializers **
  
  class EventSerializer(serializers.HyperlinkedModelSerializer):
      tags = serializers.HyperlinkedRelatedField(many=True, view_name='tag-detail')
  
      class Meta:
          model = Event
          fields = ('id', 'location', 'location_name', 'date', 'max_attendee', 'description', 'image', 'created_by', 'tags')
  
  class TagSerializer(serializers.HyperlinkedModelSerializer):
      events = serializers.HyperlinkedRelatedField(many=True, view_name='event-detail')
  
      class Meta:
          model = Tag
          fields = ('name',)
  </code></pre>
  
  <p>Because there is no <code>events</code> field in Tags model, I cannot display events related to tags. However, reverse performs great because Many-to-Many relation is set in Events model.</p>