[Answer]-Where is groups__name documented?

1👍

The groups__name documentation is basically found as a combination of the auth.User documentation and the fields lookup documentation, with the assumption you know that auth.models.User has a method groups that relates to auth.models.Group.

limit_choices only limits the choices available in the admin and (Model)forms; it doesn’t limit the choices in the database, so any available choice can still be programmatically set; in your case, none at all (default). You could poke inside the database and see what it actually gives you for the pm field.

0👍

limit_choices_to only limits choices in selects in forms (in admin and in your own ModelForms). In your code, you can still assign whoever you like.

The django.contrib.auth documentation covers the User and Group models and their fields.

Leave a comment