#35108: Have SingleObjectMixin.get_object handle ValidationError/ValueError
-------------------------------+--------------------------------------
Reporter: Alex Tomkins | Owner: nobody
Type: New feature | Status: closed
Component: Generic views | Version: 5.0
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):
* status: new => closed
* type: Uncategorized => New feature
* resolution: => wontfix
Comment:
> Should `get_object` handle these?
I don't think so, I've used class-based views in many projects and I've
never needed it. This is not something that you will need unless you use
some kind of models generalization. If you really need it, you can also
implement your own mixin that will overwrite `get_object()`.
> Should the functions in `django.shortcuts` also handle these?
This idea has already been rejected (as you noticed).
--
Ticket URL: <https://code.djangoproject.com/ticket/35108#comment:1>
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/0107018cff21921f-4e5b6a20-649a-4722-ab66-10626590ce3b-000000%40eu-central-1.amazonses.com.