Skip to content

jacobsvante/bootstrap-modeltranslation

Repository files navigation

bootstrap-modeltranslation

PyPI version

Author: Jacob Magnusson. Follow me on Twitter

Overview

bootstrap-modeltranslation is a mini-package for adding tabbable django-modeltranslation translation fields to django-admin-bootstrapped. Example image

Tested with

Installation

Install using pip:

pip install bootstrap-modeltranslation

Add package to INSTALLED_APPS (order doesn't matter):

INSTALLED_APPS = (
    'django_admin_bootstrapped',
    'modeltranslation',
    ...
    'bootstrap_modeltranslation',
)

NOTE: bootstrap_modeltranslation must come before modeltranslation for tabbed translation fields to work

Copy the static files to your project:

python manage.py collectstatic

Import admin classes for inheritance and use just like you would the default ones (read the modeltranslation docs for more info).

from bootstrap_modeltranslation.admin import (
    TranslationAdmin,
    TranslationTabularInline,
    TranslationStackedInline,
    TranslationGenericTabularInline,
    TranslationGenericStackedInline)

class SomeModelAdmin(TranslationAdmin):
    pass

class SomeModelInlineAdmin(TranslationStackedInline):
    pass

Documentation

This document

About

Adds translation tabs to django-admin-bootstrapped. For use with django-modeltranslation. NOTE: Not actively maintained. If you feel like taking over the project just give me a shout.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages