django-perm-trans-0.1.0


توضیحات

A simple way to translate the permissions of your Django project.
ویژگی مقدار
سیستم عامل -
نام فایل django-perm-trans-0.1.0
نام django-perm-trans
نسخه کتابخانه 0.1.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Silas Vasconcelos
ایمیل نویسنده silasvasconcelos@hotmail.com.br
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/django-perm-trans/
مجوز MIT
# Django permissions translation #### A simple way to translate the permissions of your Django project. ## Overview This package helps you translate the permissions of your Django project.<br> It's very useful when you have a project with multiple languages or when you use the Django Admin for end users. ## Requirements - Python 3.8+ - Django 4.2 (tested) ## Installation ```bash pip install django-perm-trans ``` #### settings.py ```python INSTALLED_APPS = [ ... 'django_perm_trans', ... ] ``` ##### Configuration ```python DJANGO_PERM_TRANS = { 'separator': '->', # Default: '|' - Separator between words (change | to ->) # 'capitalize_words': True, # Default: False # 'remove_app': True, # Default: False # 'remove_model': True, # Default: False # Custom function to translate the permission and format # ATTENTION: This function overrides the other options # 'custom_function': lambda perm: perm.name, # Default: None } ``` ## Roadmap - [x] Apply of capitalize in the words. - [x] Separator configurable. - [x] Remove app name from the permission. - [x] Remove model name from the permission. - [x] Custom function to translate the permission. - [ ] Unit tests. - [ ] Compatibility tests (Django versions). - [ ] Use translation from database (configurable in admin). - [ ] Command to translate the permissions from API. - [ ] Documentation. ## License [MIT](LICENSE.md)


نیازمندی

مقدار نام
>=0.1.0,<0.2.0 dotpath


زبان مورد نیاز

مقدار نام
>=3.8,<4.0 Python


نحوه نصب


نصب پکیج whl django-perm-trans-0.1.0:

    pip install django-perm-trans-0.1.0.whl


نصب پکیج tar.gz django-perm-trans-0.1.0:

    pip install django-perm-trans-0.1.0.tar.gz