Opened 16 years ago

Closed 16 years ago

#8197 closed (wontfix)

Update Polish administrative entites

Reported by: Piotr Lewandowski <django@…> Owned by: nobody
Component: contrib.localflavor Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Attached file contains a list of Polish administrative entites from a official government source.

Attachments (4)

pl_regions.py (83.2 KB ) - added by Piotr Lewandowski <django@…> 16 years ago.
pl_regions.2.py (83.4 KB ) - added by Piotr Lewandowski <django@…> 16 years ago.
Updated version with recent changes introduced by government
pl_regions.3.py (82.9 KB ) - added by Piotr Lewandowski <django@…> 16 years ago.
+ PL_CITIES
pl_regions.4.py (11.1 KB ) - added by Piotr Lewandowski <django@…> 16 years ago.
- PL_{CITIES,COMMUNES}

Download all attachments as: .zip

Change History (11)

by Piotr Lewandowski <django@…>, 16 years ago

Attachment: pl_regions.py added

by Piotr Lewandowski <django@…>, 16 years ago

Attachment: pl_regions.2.py added

Updated version with recent changes introduced by government

by Piotr Lewandowski <django@…>, 16 years ago

Attachment: pl_regions.3.py added

+ PL_CITIES

comment:1 by Jacob, 16 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Piotr Lewandowski <django@…>, 16 years ago

The main part of pl_regions.py can be easily generated from official source using a script described on PolishLocalflavor.

comment:3 by Malcolm Tredinnick, 16 years ago

Resolution: wontfix
Status: newclosed

I think this is too much data, even for something as loose as localflavor. We're not going to carry around megabytes of every city in every localflavor like this. Django isn't meant to be an encyclopedia.

by Piotr Lewandowski <django@…>, 16 years ago

Attachment: pl_regions.4.py added
  • PL_{CITIES,COMMUNES}

comment:4 by Piotr Lewandowski <django@…>, 16 years ago

Resolution: wontfix
Status: closedreopened
Summary: Add Polish administrative entitesUpdate Polish administrative entites

How about after removing information about communes and cities?

  • pl_region.py now has 11.1kB (versus 13.67kB of total size of pl_administrativeunits.py and pl_voivodeships.py),
  • it's up-to-date and the source of information is authoritative (versus Wikipedia),
  • naming is coherent with #8276.

comment:5 by Malcolm Tredinnick, 16 years ago

We already have this information in the code, so let's not just add it in a different format. Update the existing files if there are errors, but that should be enough.

comment:6 by Piotr Lewandowski <django@…>, 16 years ago

pl_regions.py has serveral advantages over current state:

  • it merges information from two files into one (pl_regions.py) which is coherent with other localflavors (cl, es, sk, uk). Currently, file names don't reflect changes from [8345].
  • it can be automatically generated what makes future updates easy (see PolishLocalflavor for details).
  • it doesn't use manually crafted key values for *_CHOICES tuples so collisions are unlikely. Currently, there are 10 duplicates in ADMINISTRATIVE_UNIT_CHOICES - it's because there are counties in Poland with the same name. I can't imagine how this outdated, buggy data could get into Django 1.0.
  • TERYT codes (which are used for keys in pl_regions.py) contain additional information - they enable user to group counties by province they belong to (it's impossible to do it now). Such possibility would be very handy - instead confusing user with a counties list which has about 400 items, you can ask him for province in a first place and then show a list with only ~25 counties.

I'm willing to prepare transition patch (replacing pl_administrativeunits.py and pl_voivodeships.py by pl_regions.py).

comment:7 by Malcolm Tredinnick, 16 years ago

Resolution: wontfix
Status: reopenedclosed

As I mentioned above, please feel free to fix the existing data (and open a new ticket for those changes, since this is really becoming about pl_regions.py and I want to close it out). It is not worth making such a change in the data structures right now. If you'd come up with this proposal before the 1.0 feature freeze, it might have been a different story, but we're in the final approach to 1.0 and these changes simply don't fix bugs in a way that cannot be fixed less intrusively.

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