Opened 6 years ago

Closed 6 years ago

#15705 closed New feature (fixed)

Localflavor for Croatia

Reported by: zmasek Owned by: zmasek
Component: contrib.localflavor Version: master
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: UI/UX:

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 6 years ago.
15705.localflavor-hr.diff (24.9 KB) - added by Julien Phalip 6 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 6 years ago by Luke Plant

Type: New feature

comment:2 Changed 6 years ago by Luke Plant

Severity: Normal

comment:3 Changed 6 years ago by Julien Phalip

Triage Stage: UnreviewedReady for checkin

Thank you for your contribution!

comment:4 in reply to:  3 ; Changed 6 years ago by zmasek

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?

comment:5 in reply to:  4 Changed 6 years ago by Julien Phalip

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 Changed 6 years ago by Julien Phalip

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 Changed 6 years ago by zmasek

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 Changed 6 years ago by Julien Phalip

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 Changed 6 years ago by Julien Phalip

Needs documentation: set
Needs tests: set

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

Changed 6 years ago by zmasek

Attachment: localflavor_hr.diff added

comment:10 Changed 6 years ago by zmasek

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

Changed 6 years ago by Julien Phalip

Attachment: 15705.localflavor-hr.diff added

comment:11 Changed 6 years ago by Julien Phalip

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 Changed 6 years ago by zmasek

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

comment:13 Changed 6 years ago by Jannis Leidel

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