KristianOellegaard/django-hvad — pull request #179 by spectras (2014-05-23 23:16:22+00:00)
Title: Make get_available_languages use cached translations if they were prefetched.

Pretty much self explanatory. Fixes issue #97.
The method was always creating a query from scratch. Now it uses the translations accessor, which knows how to use prefetched objects.
```python
obj = Model.objects.language().prefetch_related('translations').get(...)
obj.get_available_languages() # now results in 0 query
```
This was causing a large number of queries when using `all_translations()` in `list_display`, in the admin.