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

57 views
Skip to first unread message

DJANGO DEVELOPER

unread,
May 9, 2022, 1:23:14 PM5/9/22
to Django users

George Tantiras

unread,
May 10, 2022, 4:12:17 AM5/10/22
to django...@googlegroups.com

What about Django permissions?


A user can be related to many groups.
20:23, 9 May 2022, DJANGO DEVELOPER <abubak...@gmail.com>:

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKPY9p%3D%2BirhRbBaH%3DXi033FAX9EhQZVWJJ7fUP0c0HOn6pHsSQ%40mail.gmail.com.


--
Sent from Yandex Mail for mobile

DJANGO DEVELOPER

unread,
May 10, 2022, 5:53:52 AM5/10/22
to Django users
yes, I know. but how to use them?

Kasper Laudrup

unread,
May 10, 2022, 8:06:24 AM5/10/22
to django...@googlegroups.com
On 10/05/2022 11.53, DJANGO DEVELOPER wrote:
> yes, I know. but how to use them?
>

The link literally starts with "This document explains the usage of
Django’s authentication system in its default configuration" so it seems
like an obvious place to look in order to figure out "how to use them".

Have you tried reading the documentation?

Kind regards,

Kasper Laudrup

DJANGO DEVELOPER

unread,
May 10, 2022, 10:57:12 AM5/10/22
to Django users
yes. I went through the documentation but did not work on what I wanted to achieve. I am totally lost

--
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...@googlegroups.com.

George Tantiras

unread,
May 10, 2022, 2:22:39 PM5/10/22
to django...@googlegroups.com
I cannot but agree with Kasper, but here is a naive example:
 
@login_required
def 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 sale
 
 
10.05.2022, 15:06, "Kasper Laudrup" <lau...@stacktrace.dk>:
--

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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ab9cf185-708b-607e-5923-b98a1319e130%40stacktrace.dk.
Reply all
Reply to author
Forward
0 new messages