Customizing authentication e autorization, with constant for models names User, Permission, Group, PermissionMixin and constant for field names and table name

2023-02-15 Thread Jansen Magalhães
Dear, I would like to debate the possibility of updating Django regarding a better customization of the Auth app, with the possibility of customizing the models, field names, table names, through constants to be defined throughout the application for the actions of the models User, Permission,

Re: Customizing authentication e autorization, with constant for models names User, Permission, Group, PermissionMixin and constant for field names and table name

2023-02-15 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Jansen, I would like to see a more concrete and thought-out proposal, with the motivation. For many problems you might encounter with the auth module, there is a way to customize it. Beyond a certain point though, “reimplement it yourself” is a reasonable solution. For example, if you need a di

Re:

2023-02-15 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Please don’t email random code snippets to this list. On Mon, Feb 13, 2023 at 3:29 PM Thomas Ménès wrote: > def extra_permissions(permission_classes): > """Decorate a CBV method to add specific permissions on the instance.""" > def decorator(func): > def decorated_func(self, *args, **kwargs): >

Re: I would like to participate and contribute in your project

2023-02-15 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Welcome Mohammed! There are many different ways to contribute to Django - the forum, blogging, translating, documenting, writing code, and more. Our Contributing Guide can help you get started with many of these: https://docs.djangoproject.com/en/stable/internals/contributing/ If you’re looking t

Re: Customizing authentication e autorization, with constant for models names User, Permission, Group, PermissionMixin and constant for field names and table name

2023-02-15 Thread Jansen Magalhães
Hi Adam, Thanks for the feedback! I tried to leverage app auth framework to customize User, Permission, Group, PermissionMixin models. As for the User it works normally. There is the possibility to extend the models and place the db_table in the User Meta. There is also a constant AUTH_USE