Opened 14 years ago

Closed 14 years ago

#15705 closed New feature (fixed)

Localflavor for Croatia

Reported by: zmasek Owned by: zmasek
Component: contrib.localflavor Version: dev
Severity: Normal Keywords: localflavor croatia
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This patch adds several form fields specific to Croatia.

HRPostalNumber
HRCountySelect
HROIBField
HRJMBGField
HRPhoneNumberField
HRPhoneNumberPrefixSelect
HRLicencePlatePrefixSelect
HRLicencePlateField
HRJMBAGField

(My first patch/contribution. Hope I got it right.)

Attachments (2)

localflavor_hr.diff (24.0 KB ) - added by zmasek 14 years ago.
15705.localflavor-hr.diff (24.9 KB ) - added by Julien Phalip 14 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 by Luke Plant, 14 years ago

Type: New feature

comment:2 by Luke Plant, 14 years ago

Severity: Normal

comment:3 by Julien Phalip, 14 years ago

Triage Stage: UnreviewedReady for checkin

Thank you for your contribution!

in reply to:  3 ; comment:4 by zmasek, 14 years ago

Replying to julien:

Thank you for your contribution!

I'm considering adding another field for custom license plates. If I find it useful to have (as opposed to having an ordinary non-validated text input), should I make another ticket or add to this one?

in reply to:  4 comment:5 by Julien Phalip, 14 years ago

Triage Stage: Ready for checkinAccepted

Replying to zmasek:

I'm considering adding another field for custom license plates. If I find it useful to have (as opposed to having an ordinary non-validated text input), should I make another ticket or add to this one?

You can add it to this one. I'm just moving back to accepted so someone gets a change to review your new patch.

comment:6 by Julien Phalip, 14 years ago

It would be great if you could also add tests for your patch in source:django/trunk/tests/regressiontests/localflavor

There currently aren't many tests for localflavors and it'd be good to set a good example. Plus that will be good training for your testing skills ;)

comment:7 by zmasek, 14 years ago

I'll probably decide against the custom license plate field for now since the law is very messy and vague regarding them, but I'll try to add tests before the end of the week.

comment:8 by Julien Phalip, 14 years ago

You might also consider putting your tests in source:django/trunk/tests/regressiontests/forms/localflavor
Where ever it seems most logical to you.

comment:9 by Julien Phalip, 14 years ago

Needs documentation: set
Needs tests: set

Just noting that the patch would need to include documentation too.

by zmasek, 14 years ago

Attachment: localflavor_hr.diff added

comment:10 by zmasek, 14 years ago

Added documentation and tests in a replaced attachment. If somebody could verify everything's ok? Julien?

by Julien Phalip, 14 years ago

Attachment: 15705.localflavor-hr.diff added

comment:11 by Julien Phalip, 14 years ago

Needs documentation: unset
Needs tests: unset
Triage Stage: AcceptedReady for checkin

You forgot to add the reference to your test case in tests/regressiontests/forms/tests/__init__.py so it wasn't run. I've fixed this small thing in the attached patch. Other than that everything looks great. Thanks for your work.

comment:12 by zmasek, 14 years ago

I'm glad I could contribute! Thanks for the tips and all the help, julien. :)

comment:13 by Jannis Leidel, 14 years ago

Resolution: fixed
Status: newclosed

In [16077]:

Fixed #15705 -- Added Croatian (hr) localflavor. Thanks, Zlatko Mašek and Julien Phalip.

Note: See TracTickets for help on using tickets.
Back to Top