Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/20tab/twentytab-tab-translation
A django app to apply jQuery UI tab view to translated modeltranslation fields.
https://github.com/20tab/twentytab-tab-translation
Last synced: 21 days ago
JSON representation
A django app to apply jQuery UI tab view to translated modeltranslation fields.
- Host: GitHub
- URL: https://github.com/20tab/twentytab-tab-translation
- Owner: 20tab
- License: mit
- Created: 2014-02-10T18:08:33.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-12T12:09:10.000Z (about 10 years ago)
- Last Synced: 2024-11-19T16:17:08.175Z (about 1 month ago)
- Language: Python
- Size: 293 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
twentytab-tab-translation
=========================A django app to apply jQuery UI tab view to translated modeltranslation fields.
## Installation
Use the following command: pip install twentytab-tab-translation
## Configuration
- Static files
Run collectstatic command or map static directory.
## Usage
- translation.py```py
from modeltranslation.translator import translator, TranslationOptions
from testapp.models import ModelTestclass MyTranslationOptions(TranslationOptions):
fields = ('text',)translator.register(ModelTest, MyTranslationOptions)
```
- admin.py
```py
from django.contrib import admin
from testapp.models import ModelTest
from tab_translation.admin import TransAdminclass ModelTestAdmin(TransAdmin):
...fieldsets = (
('', {'fields': (
('...',),),
}
),
('', {'fields': (
('text',),),
'classes': ('trans-fieldset',)
}
),
)...
admin.site.register(ModelTest, ModelTestAdmin)
```