https://github.com/chayandatta/django_indian_cities
Simple Django states & cities for India
https://github.com/chayandatta/django_indian_cities
django django-cities pypi-package python python-library python-module python3
Last synced: 11 months ago
JSON representation
Simple Django states & cities for India
- Host: GitHub
- URL: https://github.com/chayandatta/django_indian_cities
- Owner: chayandatta
- License: mit
- Created: 2020-08-24T09:55:01.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-08-22T08:38:33.000Z (almost 3 years ago)
- Last Synced: 2025-05-25T02:47:39.545Z (about 1 year ago)
- Topics: django, django-cities, pypi-package, python, python-library, python-module, python3
- Language: Python
- Homepage: https://pypi.org/project/indian-cities/
- Size: 64.5 KB
- Stars: 5
- Watchers: 1
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://badge.fury.io/py/indian-cities)

[](https://pepy.tech/project/indian-cities)
[](https://pepy.tech/project/indian-cities)
[](https://www.codefactor.io/repository/github/chayandatta/django_indian_cities)
# indian-cities -- states & cities for india 🇮🇳
## Why?
If there was something plug 🔌 and play
which can be just imported and it'll fill the choices fields with Indian cities or states.
How good it'll be.
## How to use this
> To import just add this line
```
from indian_cities.dj_city import cities
```
> Test it
```
print(cities[0])
```
Now if the output looks like this
```
('Andaman and Nicobar Islands', (('Port Blair', 'Port Blair'),))
```
Then awesome, it did work 👍
```
class myModel(models.Model):
city = models.CharField(choices=cities, null=False, max_length=20)
```
### Requirements:
Any version of Python, Django
## Installation
To install this
> pip install indian-cities
---
## Connect with me:
LinkedIn: https://www.linkedin.com/in/chayandatta/
github: https://github.com/chayandatta
---
made with ❤️ and 🐍