#22943: Some validators defined in django.core.validators can't be serialized -------------------------------------+------------------------------------- Reporter: antialiasis@… | Owner: nobody Type: Bug | Status: new Component: Core (Other) | Version: 1.7-rc-1 Severity: Release blocker | Resolution: Keywords: validators, | Triage Stage: Accepted migrations | Needs documentation: 0 Has patch: 1 | Patch needs improvement: 0 Needs tests: 0 | UI/UX: 0 Easy pickings: 1 | -------------------------------------+-------------------------------------
Comment (by antialiasis@…): claudep's solution is more along the lines of what I meant to do here (it stupidly slipped my mind that `slug_re` etc. were public API and not just intermediate variable names for cleaner constructor calls). Then again, the reason that's what I meant to do was that I had assumed actually making validators with compiled regexes serializable was impossible, or at least a lot trickier than it sounded, given it hadn't been done and the release notes were telling people to just stop passing precompiled regexes to RegexValidator. I've attached my attempt at making compiled regexes serializable (plus factoring out the validator tests and removing that item from the documentation); if it really is that simple, then of course that's a more general and useful solution. -- Ticket URL: <https://code.djangoproject.com/ticket/22943#comment:7> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/079.3aed52d0bce09ece6b1f7ec79dc14e0b%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.