Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Reason given by maintainers: This version has an error in the logic to remove the app name and model name from the permission

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.
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

pip install django-perm-trans

settings.py

INSTALLED_APPS = [
    ...
    'django_perm_trans',
    ...
]
Configuration
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

  • Apply of capitalize in the words.
  • Separator configurable.
  • Remove app name from the permission.
  • Remove model name from the permission.
  • 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

Metadata

Release files for django-perm-trans 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-perm-trans 0.1.0
File Size Uploaded
django_perm_trans-0.1.0.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-perm-trans 0.1.0
File Interpreter ABI Platform
django_perm_trans-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / django_perm_trans-0.1.0.tar.gz

Download URL django_perm_trans-0.1.0.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
be3f353b4ffb4fef7f4a3c572827c34602517fa1d0cce316879f980f8cfd89a1
BLAKE2b-256 checksum
How to use checksums
60daa9bc64e079c21daeeb7f30b82af116a4b1831c14d696c935c867ce40e476
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.1 CPython/3.11.3 Darwin/22.4.0

Release files / django_perm_trans-0.1.0-py3-none-any.whl

Download URL django_perm_trans-0.1.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3e27f41b837e1a0b1212129459d6bf3da0ef336c641675e14f332586b2a2be6
BLAKE2b-256 checksum
How to use checksums
dbf6d65c259e61233a071c6fd71502abf591adf2c441ddae099b0a66a00f7cc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.1 CPython/3.11.3 Darwin/22.4.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page