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
-
Create a new project
$ mkdir new_project && cd new_project
-
Create a new virtual environment for this project
$ virtualenv venv $ source venv/bin/activate
-
Install using
pip
(venv) $ pip install django-vi-address
Quick start
-
Add
rest_framework
,vi_address
to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
... 'rest_framework', # new 'vi_address', # new ...
]
-
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 ]
-
Create the models.
python manage.py migrate
-
Insert data.
python manage.py insert_data
Endpoint
-
Get cities list
/api/address/cities
-
Get districts list of a city
/api/address/city/{city_id}
-
Get wards list of a district
/api/address/district/{district_id}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file django_vi_address-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: django_vi_address-0.1.6-py3-none-any.whl
- Upload date:
- Size: 663.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e12dc25b84ca999a4cf972612958a1edf784089e64731a1efe9149a7b0d7207 |
|
MD5 | ac7cdcdb6e32c76c902c234353666158 |
|
BLAKE2b-256 | e62beb613da38f4a86da051e2b05cfac4cfc7544ee107f6747e493689c2f2e2d |