#32378: Incorrect exception raising syntax in documentation
-----------------------------------------+------------------------
Reporter: johnthagen | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-----------------------------------------+------------------------
https://docs.djangoproject.com/en/dev/ref/views/#the-403-http-forbidden-
view
{{{
from django.core.exceptions import PermissionDenied
def edit(request, pk):
if not request.user.is_staff:
raise PermissionDenied
# ...
}}}
Should that be `raise PermissionDenied()` to raise an instance?
--
Ticket URL: <https://code.djangoproject.com/ticket/32378>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/053.4c164495bf51dc5814f0a6b469d11d34%40djangoproject.com.