django-modeltranslation

Django modeltranslation queries fallback

点点圈 提交于 2019-12-01 20:24:29
I'm using django modeltranslation for a multi-language site. Language fallback works good when reading attributes directly. For example, if current language is German and I print object.title, if the German title is not defined I'll see the english title. I would expect fallback to work also on queries, but that's not true. In fact, if i do something like results = MyModel.objects.filter(title = 'hello') this will get no results if the German title is not set, while I would like it to return the object with english title "hello". How can I make this work? Thanks in advance. The thing to do

How to install a specific version of a package with pip? [duplicate]

谁都会走 提交于 2019-11-27 10:26:43
Possible Duplicate: Installing specific package versions with Pip I am a bit new to pip install and virtualenv in general. I have setup an virtualenv on my server as well as on my local dev environment. On the server the package django_modeltranslation-0.4.0_beta2 works perfectly fine. However on my local machine django_modeltranslation-0.5.0-alpha doesn't seem to work well at all. I usually simply install it in virtual-env like this: $ source bin/active (env)$ pip install django_modeltranslation This gets the latest version though, which now for the first time causes issues working with

How to install a specific version of a package with pip? [duplicate]

谁都会走 提交于 2019-11-26 22:20:05
问题 Possible Duplicate: Installing specific package versions with Pip I am a bit new to pip install and virtualenv in general. I have setup an virtualenv on my server as well as on my local dev environment. On the server the package django_modeltranslation-0.4.0_beta2 works perfectly fine. However on my local machine django_modeltranslation-0.5.0-alpha doesn't seem to work well at all. I usually simply install it in virtual-env like this: $ source bin/active (env)$ pip install django