djangomany-to-manyrelationships

How to define a Many-To-Many relationship to another app?


I have two apps: Ads Domains

An Ad can be associated via Many-To-Many to a Domain. In my Ad model I have put:

domains = models.ManyToManyField(Domain)

How do I make it so it uses the Domains app and not the Ads app?

Thanks


Solution

  • Sorry for even asking this all I had to do was do an import of the apps model:

    from domains.models import Domain