#16202: Localflavor support for Slovenia (si) -------------------------------------+------------------------------------- Reporter: Jure | Owner: nobody Cuhalev <gandalf@…> | Status: new Type: New | Component: contrib.localflavor feature | Severity: Normal Milestone: | Keywords: Version: 1.3 | Has patch: 1 Resolution: | Needs tests: 0 Triage Stage: Accepted | Easy pickings: 0 Needs documentation: 0 | Patch needs improvement: 0 | UI/UX: 0 | -------------------------------------+------------------------------------- Changes (by iElectric):
* needs_better_patch: 1 => 0 Comment: Hey vasiliyeah, good feedback. First of all, since apparently UMCN has the same implementation across YU countries, we could share some code. Don't know how this touches Django's internal policy of handling localflavor. I made following fixes to the patch: * more PEP8 friendly * additional tests for info dictionary * additional postecode tests * remove all whitespaces in phonenumber before validating * assume year is <2000 if birth year is 890 or higher * EMSO non-valid dates and dates in future raise validation error * ESMO validation errors are now elaborate * removed redundand error message in SIPostalCodeField * removed trailing spaces in docs According to http://www.uradni- list.si/1/objava.jsp?urlid=19998&stevilka=345, every resident in Slovenia should have a valid EMSO. And if not, valid one should be issued. I would say storing computed information to self.info will give user most freedom how to use it further since there are so many use cases. PS: It would remove lots of code django currently uses internally by switching to https://github.com/daviddrysdale/python-phonenumbers.\\ PPS: I wonder if it makes sense validating the date, since there is a slight possibility of incorrectly issued ESMO? -- Ticket URL: <https://code.djangoproject.com/ticket/16202#comment:6> 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 post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.