Chile Cities
Chile Cities is a Django app to load cities and regions of Chile.
Detailed documentation is in the docs directory.
Quick Start
-
Add
chile-citiesto yourINSTALLED_APPSsetting like this:INSTALLED_APPS = [ ..., "django_chile_cities", ]
-
Run the following command to create the
chile-citiesmodels:python manage.py migrate
-
Load the seed data by running:
python manage.py load_chile_cities
Usage
-
Import
django_chile_citiesmodels in your project:from django_chile_cities.models import Region, Province, City class MyTable(models.Model): ... city = models.ForeignKey(City, on_delete=models.PROTECT)
-
Access to province and region trough city instance:
my_table_instance.city.province.region
And that's it, simple, but needed in multiple projects.
Release files for django-chile-cities 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_chile_cities-1.0.1.tar.gz | 18.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_chile_cities-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.5 kB
Release files / django_chile_cities-1.0.1.tar.gz
| Download URL | django_chile_cities-1.0.1.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e740aabb4db2fd275348599e8a7f1ab7bbcafdf54fac77335c5495e713d0495b
|
|
BLAKE2b-256 checksum How to use checksums |
9c46e31b90be7fdb5a3bc8b2cc62adf2b7442e3866f03b7e0183eaf6270ca935
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.3
|
Release files / django_chile_cities-1.0.1-py3-none-any.whl
| Download URL | django_chile_cities-1.0.1-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3eb06b6b63d89f04e9246108a99581a8ea92a9df6da8fe1c1b687d2d09d6d98
|
|
BLAKE2b-256 checksum How to use checksums |
d6fb41370e001118165aa41a7de624f68a768c400fe3a808d40443d3aa7f8571
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.3
|