Search code examples
djangodjango-admin

Django admin many to many table name


Can I specify the name I want for the many to many table?


Solution

  • Yes. See Table Names for all of the exciting details.

    Update: OK, then perhaps the related_name option is what you are looking for. There are some caveats covered here.

    Updatex2: OK, Kelvin gets a star for answering his own question! It's been an age since I perused the Django Meta Model Options, but, in retrospect, that's where we should have started.

    BTW, wandering through the django/db/ code on only half a cup of coffee is definitely a challenge.