Code

Opened 3 years ago

Closed 3 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 3 years ago.
15705.localflavor-hr.diff (24.9 KB) - added by julien 3 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 3 years ago by lukeplant

  • Type set to New feature

comment:2 Changed 3 years ago by lukeplant

  • Severity set to Normal

comment:3 follow-up: Changed 3 years ago by julien

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

Thank you for your contribution!

comment:4 in reply to: ↑ 3 ; follow-up: Changed 3 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 3 years ago by julien

  • Triage Stage changed from Ready for checkin to Accepted

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 3 years ago by julien

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 3 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 3 years ago by julien

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 3 years ago by julien

  • Needs documentation set
  • Needs tests set

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

Changed 3 years ago by zmasek

comment:10 Changed 3 years ago by zmasek

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

Changed 3 years ago by julien

comment:11 Changed 3 years ago by julien

  • Needs documentation unset
  • Needs tests unset
  • Triage Stage changed from Accepted to Ready 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 3 years ago by zmasek

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

comment:13 Changed 3 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

In [16077]:

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.