Una librería Django para manejar regiones, provincias y ciudades en Chile.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_chile_cities-1.0.1.tar.gz.
File metadata
- Download URL: django_chile_cities-1.0.1.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e740aabb4db2fd275348599e8a7f1ab7bbcafdf54fac77335c5495e713d0495b
|
|
| MD5 |
95b63733556207ee6e9e6692b569189f
|
|
| BLAKE2b-256 |
9c46e31b90be7fdb5a3bc8b2cc62adf2b7442e3866f03b7e0183eaf6270ca935
|
File details
Details for the file django_chile_cities-1.0.1-py3-none-any.whl.
File metadata
- Download URL: django_chile_cities-1.0.1-py3-none-any.whl
- Upload date:
- Size: 21.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3eb06b6b63d89f04e9246108a99581a8ea92a9df6da8fe1c1b687d2d09d6d98
|
|
| MD5 |
a48e5250368876dc24b7c527af25a575
|
|
| BLAKE2b-256 |
d6fb41370e001118165aa41a7de624f68a768c400fe3a808d40443d3aa7f8571
|