Translating Content

Anton Pirker

Django Meetup Vienna / September 7th 2016

with Django-Parler

We had already a Talk about this, right?

Yes! By Florian:

Check it out, it's great!

The new kid on the block:

Cool in Django-parler

  • Inspired by Django-hvad (Django-CMS)

  • Separate table for translated fields

  • Nice admin integration

  • Easy to integrate  

  • Plays nice with others, compatible with django-polymorphic, django-mptt and such

How to make fields translatable - step 1

manage.py makemigrations myapp

How to make fields translatable - step 2

manage.py makemigrations --empty myapp 

The code does not matter.

Just copy it from the documentation

How to make fields translatable - step 3

manage.py makemigrations myapp

Admin integration

Change This:

to This:

Tadaa!

More Admin Support:

  • TranslatableInlineModelAdmin
  • TranslatableStackedInline
  • TranslatableTabularInline.
  • SortedRelatedFieldListFilter

One remark

There is no translatable version for Djangos GenericInlineModelAdmin or NestedInlines which I desperatly need.

Conclusio

 

I can just highly recommend Django-Parler!

 

(As long as you do not need Admin inlines with generic relations) 

Thank's 
for listening!

Anton Pirker

www.anton-pirker.at

anton@ignaz.at

Translating Content with Django Parler

By antonpirker

Translating Content with Django Parler

Django Meetup Vienna / September 7th 2016

  • 1,226