Skip to main content

Django Indian Cities

Project description

PyPI version PyPI - License Downloads

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.

Files for indian-cities, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size indian_cities-1.0.0-py3-none-any.whl (7.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size indian_cities-1.0.0.tar.gz (8.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page