I still doubt if I understood correctly, but if yes --
https://docs.djangoproject.com/en/2.1/topics/db/examples/many_to_many/ contains your answer. Either you don't need 'through' table (because it would not carry any additional data), or if you do... you can just add only foreign keys to 'User' and 'Group' to your Enrollment model, but then access is a bit different.
# models.py
class User(models.Model):
# things that normally belongs there
class Group(models.Model):
# things that normally belongs there
class Enrollment(models.Model):
group = models.ForeignKey(Group, on_delete=models.CASCADE, related_name='contains_users')
user = models.ForeignKey(User, on_delete=models.CASCADE, related_name='in_group')
And access (you can use single filtering):
models.Enrollment.objects.filter(group=..., user=...)
or via related name (not tested):