Skip to main content

Django Indian Cities

Project description

PyPI version PyPI - License Downloads CodeFactor

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)

Uploaded Source

Built Distribution

indian_cities-1.0.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

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

Hashes for indian_cities-1.0.1.tar.gz
Algorithm Hash digest
SHA256 27caa26eba0e40fbdca6276398dd2c268d7b487bf8a84577da41e185ecf0b3fc
MD5 ec04d62fa5c1769b5660678ae00da242
BLAKE2b-256 b87374fefcccfbddd601b4adc16c5c57e3b2352caa219beae8a2e1f75467f68f

See more details on using hashes here.

File details

Details for the file indian_cities-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for indian_cities-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dd733cc9137e4f51b0bbb96f5b21fa7b5664b36293c3d95a136e8c30abd2ebb2
MD5 3d281173433d33a27463477c20788a42
BLAKE2b-256 324e8867ce835b35cb31a522ea99d40659cde448ac2f8332728290839a945745

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page