Simple Django model translation
Questions tagged [django-parler]
40 questions
0
votes
1 answer
Django-parler unique_together constraint between translated and normal field
I want to make unique_together constraint with django-parler between translated field and normal field.
I'd like to do this:
class Part(TranslatableModel):
code = CharField('code')
translations = TranslatedFields(
name =…
0
votes
1 answer
Django Parler "The 'language_code' attribute cannot be changed directly
I am currently extending a plugin to play well with Django translations and languages. Here is the method in question. Prior to getting translations involved, it worked as needed.
I extended the query to pull data from a couple of translation…

MadPhysicist
- 5,401
- 11
- 42
- 107
0
votes
1 answer
In django-parler what is the equivalent of "from hvad.forms import translatable_modelform_factory"
I am moving a Django project from django-hvad to django-parler during a Django upgrade process.
In django-parler the API is almost the same as django-hvad and when I just replace the from hvad.something import Something it just works fine but I…

moddayjob
- 606
- 5
- 17
0
votes
1 answer
Am having troubles with django-parler 2.0.1 after i had applied migration to translations, it won't show Products fields in admin site
this is my setting for translations in the models.py file, django-parler 2.0.1 won't show fields for Products in the admin site after I had synch migrations. I am currently using Django 3.0.3.
from django.db import models
from django.urls import…

Godda
- 951
- 1
- 10
- 26
0
votes
1 answer
How to: Django Parler CRUD Forms
I am using Parler for localizing my models.
Django Admin works fine, but now I want to recreate the admin forms in the frontend.
So far, I can create a new model but it is always created in the default language.
The question now is, how can I set…

René M.
- 394
- 4
- 14
0
votes
1 answer
In Django saving a (translated) slug and making it unique doesn't work
I use Django 1.11 and the parler plugin for translation. Every time I save a slug, I wish to
test if it already exists
truncate the slug
add number
test again, if the new slug exists and so on
This way, I wish to create a unique slug on…

mogoh
- 992
- 2
- 7
- 27
0
votes
1 answer
Django Admin with Parler translations generates IntegrityError
I'm using Django Parler 1.9.2 and Django 2.1.
I have a Business Admin Class with inlines to edit the related models (Service and Resource)
class ServiceInline(TranslatableTabularInline):
model = Service
class…

Renato Portela
- 9
- 3
0
votes
1 answer
Make django-admin-sortable and django-parler work together
I have two models with many-to-many relation using through table
# models.py
class Item(TranslatableModel):
name = models.CharField(max_length=100) # this one is translatable
class Person(TranslatableModel):
name =…

Most Wanted
- 6,254
- 5
- 53
- 70
0
votes
0 answers
Django: Internationalization of urls and models
I'm working on a little website that should be in Spanish and English.
I've spent hours reading the documentation and well, I'm ok with it. Also, I think I'm gonna be using Django-parler to do the model internationalization but I've never use…

gglasses
- 826
- 11
- 30
-1
votes
1 answer
Django/Parler: unable to access the translated fields of a model in the update_or_create function
I have a model such as below:
class MyModel(TranslatableModel):
date_created = models.DateField(
verbose_name=_('Date Created'), default=timezone.now)
source = models.CharField(max_length=100, verbose_name=('Type'))
translations…

user_5
- 498
- 1
- 5
- 22