Metadata-Version: 2.4
Name: django-currency-list
Version: 0.2.0
Summary: This library simplifies the handling of the currency field in Django projects.
Author-email: Alex Suvertok <alex.suvertok@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/alex-suvertok/django-currency-list
Project-URL: Repository, https://github.com/alex-suvertok/django-currency-list
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Django>=5.2
Dynamic: license-file

# django-currency-list

This library simplifies the handling of the currency field in Django projects.

## Features

- `Currency` — provides all ISO 4217 currency codes and names as `TextChoices`.
- `CurrencyField` — a ready-to-use `CharField` subclass with currency choices and max length `3`.

## Installation

```bash
pip install django-currency-list
```

## Usage

```python
from currency_list import CurrencyField, CurrencyChoices, get_label, currency_dict

# In models.py
class Product(models.Model):
    currency = CurrencyField()

# Get all currency codes
currency_codes = Currency.currency_code_list()

# Get a label for a code
get_label("USD")  # "United States Dollar"

# Full code → name mapping
currency_dict()  # {"USD": "United States Dollar", ...}
```

## Python / Django support

- Python 3.10 — 3.14
- Django 5.2 — 6.1+
