#34683: get_object_or_404 and get_list_or_404 custom messaging
------------------------------------------------+--------------------------
               Reporter:  eavendano             |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  HTTP handling         |        Version:  4.2
               Severity:  Normal                |       Keywords:  HTTP 404
           Triage Stage:  Unreviewed            |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  0                     |
------------------------------------------------+--------------------------
 Is there a possibility to add a message parameter to **get_object_or_404**
 and **get_list_or_404**? This function is lovely and reduces boilerplate a
 lot. In the view that I'm currently using it, I have business logic that
 depends on finding other models first, and having a message should be
 excellent since the lack of a message parameter sends me back to using
 **try-catch** or **if-None** statements.

 I know there might be another design or security feature as well but the
 gain in my code would be significant.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34683>
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/01070189050f90d3-b8dfaadc-6e0d-4bb1-997a-dd6680a68029-000000%40eu-central-1.amazonses.com.

Reply via email to