ojii / django-multilingual-ng

THIS PROJECT IS *NOT* SUPPORTED AND SHOULD NOT BE USED UNLESS YOU KNOW EXACTLY WHAT YOU'RE DOING!!!

Home Page:https://github.com/KristianOellegaard/django-hvad

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

all() and GLL

Drachenfels opened this issue · comments

It might be a bug, or maybe it's my mistunderstanding:

GLL.lock('en')
news_entry = NewsEntry.objects.get(id=1)
GLL.release()

GLL is ignored.

in this case:

GLL.lock('en')
news_entry = NewsEntry.objects.all()
GLL.release()

Is also ignored.

But in this case:

GLL.lock('en')
news_entry = NewsEntry.objects.exclude(title__exact='') # you will receive NewsEntry of id = 1 only, if there is translation of it to english
GLL.release()

It excludes object that has title exactly equal = '' for english translation.