I'm unclear if this is a user 'how to' question, or a badly phrased
suggestion for an improvement to Django.
If it's a user question, it should be asked on django-users.
django-developers is for discussing the development of django itself.
That said - unless overridden with the db_table setting or the use of
a through model, the m2m table name will be "model.db_table +
field_name" - in your case, that means account_user_groups.
If this is a suggestion for an improvement to Django, can you clarify
what exactly you are proposing? The current m2m table naming scheme
has been in place since the very beginning, and with the exception of
a few customizations, it hasn't changed in all that time. Why do you
think it is necessary to change the naming scheme?
Yours,
Russ Magee %-)
Ok - do you think this might have been useful information to include
on your original query?
> I have a
> working patch, but
> if I set the db_table on the User model, the queryset and syncdb
> doesn't seem to agree
> on what the m2m table should be called.
>
> As a sidenote there seems to a problem with certain combinations
> db_table and app_name
> for models with an abstract base class. I haven't isolated the problem
> yet though.
Well... lets think this through. Django has had m2m since day 1.
Django has a large collection of unit tests that exercise m2m
relations. They test all sorts of combinations of m2m and db_table
combinations.
You have been messing around with modifying the internals of Django.
So, either:
1) Django has a fundamental problem with m2m tables that has gone
unnoticed for 3 years
2) There is something wrong with your code
Which do you think is more likely?
Please note that I'm not saying that Django is flawless. However, I
have a lot more confindence in Django that I have in a random
"something seems to be wrong" comment that isn't backed up with a
concrete example. Until you present a concrete example where vanilla
Django fails, you're going to find that anyone with the ability to
help you isn't going to be particularly helpful.
Yours,
Russ Magee %-)
I hope your reply was helpful to others. I asked a question because I
am not as knowledgeable about Django internals as you obviously are,
and this is this is to my knowledge the place to ask.
I make no assumptions about where there is a bug, or if there is one,
as I haven't figured out how things are supposed to work, hence my
original question.
I have the source code so I can figure out the answers myself given
enough time. I will try not to slam the door too hard behind me.