I cannot but agree with Kasper, but here is a naive example: @login_requireddef create_sale_view(request): if request.user.has_perm("sell.add_product"): # The user can add new product for sale else: # The user cannot add new product for salehttps://docs.djangoproject.com/en/4.0/topi
What about Django permissions? https://docs.djangoproject.com/en/4.0/topics/auth/default/A user can be related to many groups.20:23, 9 May 2022, DJANGO DEVELOPER :https://stackoverflow.com/questions/72161764/how-to-make-a-user-act-as-a-seller-and-as-a-buyer-at-the-same-time-in-djangoI have posted m
Repositories using django-rules: https://github.com/dfunckt/django-rules/network/dependents?dependent_type=REPOSITORY Packages using django-rules: https://github.com/dfunckt/django-rules/network/dependents?dependent_type=PACKAGE Search engine for python code examples: https://www.programcreek.com/p
I would recommend django-rules:
https://github.com/dfunckt/django-rules
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.
4 matches
Mail list logo