Metadata-Version: 2.1
Name: django-thailand-geography
Version: 0.1.2
Summary: 
License: MIT
Keywords: django,thailand,geography,address
Author: Preeti Yuankrathok
Author-email: preetisatit@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: django (>=3.2)
Requires-Dist: factory-boy (>=3.3.0,<4.0.0)
Requires-Dist: urllib3 (>=2.0.6,<3.0.0)
Description-Content-Type: text/markdown

# django-thailand-geography

[![GitHub](https://img.shields.io/github/license/earthpyy/django-thailand-geography)](https://github.com/earthpyy/django-thailand-geography/blob/main/LICENSE)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/earthpyy/django-thailand-geography/ci.yml?branch=main)](https://github.com/earthpyy/django-thailand-geography/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/earthpyy/django-thailand-geography/branch/main/graph/badge.svg?token=PW280Y917H)](https://codecov.io/gh/earthpyy/django-thailand-geography)
[![PyPI](https://img.shields.io/pypi/v/django-thailand-geography)](https://pypi.org/project/django-thailand-geography/)  
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-thailand-geography)](https://github.com/earthpyy/django-thailand-geography)

Django models for Thailand geography information. This library also includes a command to import geography data from [thailand-geography-data/thailand-geography-json](https://github.com/thailand-geography-data/thailand-geography-json)

## Installation

```bash
pip install django-thailand-geography
```

## Setup

1. Add `thailand_geography` into `INSTALLED_APPS`

   ```python
   # settings.py

   INSTALLED_APPS = [
       ...
       'thailand_geography',
   ]
   ```

1. Run migration

   ```bash
   python manage.py migrate
   ```

1. Import data from JSON database

   ```bash
   python manage.py import_geo
   ```

## Development

### Requirements

- Docker
- Python
- Poetry

### Migrate

```bash
make migrate
```

### Linting

```bash
make lint
```

### Testing

```bash
make test
```

### Fix Formatting

```bash
make yapf
```

