Skip to main content

Chile Cities

Chile Cities is a Django app to load cities and regions of Chile.

Detailed documentation is in the docs directory.

Quick Start

  1. Add chile-cities to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...,
        "django_chile_cities",
    ]
    
  2. Run the following command to create the chile-cities models:

    python manage.py migrate
    
  3. Load the seed data by running:

    python manage.py load_chile_cities
    

Usage

  1. Import django_chile_cities models in your project:

    from django_chile_cities.models import Region, Province, City
    
    class MyTable(models.Model):
        ...
        city = models.ForeignKey(City, on_delete=models.PROTECT)
    
  2. 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)

Source distribution for django-chile-cities 1.0.1
File Size Uploaded
django_chile_cities-1.0.1.tar.gz 18.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-chile-cities 1.0.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page