Reputation: 51
In my django application i have the below code
if not exist:
return PermissionDenied
This line will returns following error
type object 'PermissionDenied' has no attribute 'set_cookie'
Can any one help me please
Upvotes: 1
Views: 107
Reputation: 191
Import this file in your file:
from django.core.exceptions import PermissionDenied
Raise Permission Denied as follows:
if not exist:
raise PermissionDenied()
Upvotes: 1