Skip to main content

Countries States Cities models for Django

Project description

.. role:: python(code) :language: python

######################################## django-countries-states-cities ########################################


Usage


  1. Installation ===============

The preferred installation method is directly from pypi:

.. code:: console

pip install -U django-countries-states-cities

.. _readme-quickstart:

  1. Quickstart =============

  2. In settings.py:

.. code:: python

INSTALLED_APPS = [
    'modeltranslation',
    'django.contrib.admin',
    ...
    'countries_states_cities'
]

def gettext_noop(s):
    return s

LANGUAGES = [  # supported languages
    ("en", gettext_noop("English")),
    ("ja", gettext_noop("Japanese")),
    ("ko", gettext_noop("Korean")),
]
  1. In urls.py:

.. code:: python

urlpatterns = [
    ...
    path('csc/', include('countries_states_cities.urls')),
]
  1. Run python manage.py migrate to create the countries_states_cities models.

  2. Configuration ================

Todo...

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

django-countries-states-cities-0.1.1.tar.gz (16.0 kB view hashes)

Uploaded Source

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