feat: add Nepali currency support, number-to-words conversion, and REST API enhancements

- Implement NepaliCurrencyField for model-level currency handling.
- Add format_nepali_currency utility with Lakhs/Crores comma formatting and decimal support.
- Implement number_to_nepali_words and english_to_nepali_unicode helper functions.
- Add nepali_currency, nepali_words, and nepali_unicode template filters.
- Enhance REST API (DRF) support:
    - Added NepaliCurrencySerializerField for formatted currency output.
    - Added NepaliLocalizedSerializerMixin for automatic Devanagari field generation.
    - Added flexible NepaliCurrencyRangeFilter and NepaliDateRangeFilter.
- Integrated automatic currency formatting into NepaliModelAdmin.
- Expanded the example demo app with a Transaction model and updated filters.
- Added comprehensive unit tests for formatting, models, and API components.
- Updated documentation (README.md and todo.md) to reflect new features.
This commit is contained in:
sankalp committed 2026-01-30 20:06:39 +05:45
1 parent 12de34e354
commit c6301686cc
10 files changed
+295 -13

No files matched your search

+1
View File
@@ -8,6 +8,7 @@ router = DefaultRouter()
router.register("api/persons", views.PersonViewSet, basename="person-api")
router.register("api/citizens", views.CitizenViewSet, basename="citizen-api")
router.register("api/audited", views.AuditedPersonViewSet, basename="audited-api")
router.register("api/transactions", views.TransactionViewSet, basename="transaction-api")
urlpatterns = [
path("", views.person_list, name="person-list"),