I am trying to use permission required decorator using authorization
header.And it always gives me 302 error. although my user has permission
for it.Kindly help I am beginner to django.
Here is my code
@permission_required('access_admin', login_url=None)
@permission_classes((IsAuthenticated,))
@
Hi I am trying to build an authentication system. I have added following in
my setting.py file
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.TokenAuthentication',
),
'DEFAULT_PAGINATION_CLASS':
'rest_framework.pagination.LimitOffsetPaginatio
Hi,
I am building authorization in django framework using python.. The problem
is that my code is working fine on local server but when I run the same in
production it returns "Anonymous User"
Am I doing it right?
if request.user.has_perm('auth.access_admin')
""whole code""
else:
return
3 matches
Mail list logo