Django Indian Cities
Project description
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 🐍
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
indian_cities-1.0.1.tar.gz
(7.9 kB
view details)
Built Distribution
File details
Details for the file indian_cities-1.0.1.tar.gz
.
File metadata
- Download URL: indian_cities-1.0.1.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27caa26eba0e40fbdca6276398dd2c268d7b487bf8a84577da41e185ecf0b3fc |
|
MD5 | ec04d62fa5c1769b5660678ae00da242 |
|
BLAKE2b-256 | b87374fefcccfbddd601b4adc16c5c57e3b2352caa219beae8a2e1f75467f68f |
File details
Details for the file indian_cities-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: indian_cities-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd733cc9137e4f51b0bbb96f5b21fa7b5664b36293c3d95a136e8c30abd2ebb2 |
|
MD5 | 3d281173433d33a27463477c20788a42 |
|
BLAKE2b-256 | 324e8867ce835b35cb31a522ea99d40659cde448ac2f8332728290839a945745 |