Skip to main content

A Django app to migrate Vietnam address.

Project description

django-vi-address

This is a Django project about provinces/cities, districts, wards of Vietnam. The project provides a model to store data about provinces/cities, districts and wards of Vietnam.

Requirements

Python >= 3.6

Installation

  1. Create a new project :: mkdir new_project && cd new_project

  2. Create a new virtual environment for this project :: virtualenv venv source venv/bin/activate

  3. Install using pip ::

    (venv) $ pip install django-vi-address

Quick start

  1. Add "rest_framework", "vi_address" to your INSTALLED_APPS setting like this:: ::

    INSTALLED_APPS = [

     ...
     'rest_framework', # new
     'vi_address', # new
     ...
    

    ]

  2. Include the "vi_address" URLconf in your project urls.py like this:: ::

    your_project/urls.py

    from django.urls import path, include # new

    urlpatterns = [ ... path('api/address/', include('vi_address.urls')), # new ]

  3. Create the models. :: python manage.py migrate

  4. Insert data cities of Vietnam. :: python manage.py insert_data --datatype=city

  5. Insert data districts of Vietnam. :: python manage.py insert_data --datatype=district

  6. Insert data wards of Vietnam. :: python manage.py insert_data --datatype=ward

Endpoint

  1. Get cities list :: /api/address/cities
  2. Get districts list of a city :: /api/address/city/{city_id}
  3. Get wards list of a district :: /api/address/district/{district_id}

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-vi-address-0.1.5.tar.gz (398.1 kB view details)

Uploaded Source

Built Distribution

django_vi_address-0.1.5-py3-none-any.whl (664.3 kB view details)

Uploaded Python 3

File details

Details for the file django-vi-address-0.1.5.tar.gz.

File metadata

  • Download URL: django-vi-address-0.1.5.tar.gz
  • Upload date:
  • Size: 398.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.2

File hashes

Hashes for django-vi-address-0.1.5.tar.gz
Algorithm Hash digest
SHA256 4065099e5c755c6436c712bca0289db7df17353ec73030703fd5a310d910f49c
MD5 3ebe317d16f4b66e3187e0be7668c96a
BLAKE2b-256 cf75b65b01d562fd74703759a48e6284f03865135ae55c32afcd2d6cf690f706

See more details on using hashes here.

File details

Details for the file django_vi_address-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: django_vi_address-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 664.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.2

File hashes

Hashes for django_vi_address-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f61bd96ece84ca7fc8cf5a80ef9bda8ef73a933fde8ff5bceb3266214d2a023e
MD5 26b507cbf09ed950b57e777cecd69ae7
BLAKE2b-256 63e6075c4c69c255ee5c22afd99bb7ec86a937973115c7796df1becc518a3a70

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