Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django permission required

from django.contrib.auth.decorators import permission_required

# permission = 'applicationName.permission'
# Ex.
permission = "main.add_post"
@permission_required(permission, login_url="/login", raise_exception=True)
def view(request):
  	...
 
PREVIOUS NEXT
Tagged: #django #permission #required
ADD COMMENT
Topic
Name
5+6 =