Re: Single user as a seller and buyer at the same time.

2022-05-10 Thread George Tantiras
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

Re: Single user as a seller and buyer at the same time.

2022-05-10 Thread George Tantiras
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

Re: Multiple user roles with permissions

2019-09-26 Thread George Tantiras
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

Re: Multiple user roles with permissions

2019-09-25 Thread George Tantiras
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.