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 🐍
Release files for indian-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 | |
|---|---|---|---|
| indian_cities-1.0.1.tar.gz | 7.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| indian_cities-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:15.7 kB
Release files / indian_cities-1.0.1.tar.gz
| Download URL | indian_cities-1.0.1.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27caa26eba0e40fbdca6276398dd2c268d7b487bf8a84577da41e185ecf0b3fc
|
|
BLAKE2b-256 checksum How to use checksums |
b87374fefcccfbddd601b4adc16c5c57e3b2352caa219beae8a2e1f75467f68f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Release files / indian_cities-1.0.1-py3-none-any.whl
| Download URL | indian_cities-1.0.1-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dd733cc9137e4f51b0bbb96f5b21fa7b5664b36293c3d95a136e8c30abd2ebb2
|
|
BLAKE2b-256 checksum How to use checksums |
324e8867ce835b35cb31a522ea99d40659cde448ac2f8332728290839a945745
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|