Jacek Tomaszewski
fccdf93577
Finish ForeignKey reverse relation handling (ref #161 ).
...
Also enhance tests and refactor MultilingualManager rewriting of
spanned relations lookups.
2013-03-13 15:50:22 +01:00
Jacek Tomaszewski
cbfb1563a2
Remove `_populate` keyword.
...
Other ways of managing population are preferred and more elegant.
2013-02-19 18:03:41 +01:00
wrwrwr
f168b55737
Apply population using a pre_save signal.
...
It can be used with ``get_or_create`` (without resaving) and, more importantly, fixture loading.
Extend population by providing two new modes: ``default`` that sets just the default translation (only if its not given; ensuring a fallback is available; alike ``update_translation_fields``) and ``required`` that further limits population by only filling default translation of non-nullable fields (minimum to keep some level of consistency).
Add a ``populate(mode)`` toggle on multilingual query set / manager and an ``auto_populate`` context manager for fixture loading.
2013-02-19 10:47:25 +01:00
wrwrwr
54699c580b
Separate registry for manager shouldn't be needed any longer -- the main registry caches options for all seen models.
...
Now it might be possible to optimize the manager by precomputing or caching ``fields_to_translatable_models`` on translation options (instances).
2013-02-10 18:28:00 +01:00
Dirk Eschler
e94bbcd3d2
Applied styleguide. We allow 100 chars now, let's use the space.
2013-02-06 11:52:46 +01:00
Dirk Eschler
f18e744b13
Merge branch 'fix_get_fields_to_translatable_models'
2013-02-06 10:16:12 +01:00
Jacek Tomaszewski
3c9bae241e
Fix descending order rewriting in all ordering calls.
2013-02-03 15:08:24 +01:00
Dirk Eschler
af9895dac4
Iterate over translation fields only in get_fields_to_translatable_models. Potential fix for issue #132 .
2013-02-01 10:45:52 +01:00
wrwrwr
3f7eb72d60
Remove / reattach '-' prefix from fields given to `order_by` for rewriting to work.
2013-01-31 16:34:53 +01:00
Dirk Eschler
b09223419a
Merge pull request #126 from zlorf/doc_mm
...
MM docs
2013-01-10 14:49:23 -08:00
Jacek Tomaszewski
c30e7ba811
Fix MultilingualManager: add rewrite method on manager and optimize create.
2013-01-10 23:13:55 +01:00
Jacek Tomaszewski
a7aeb3b689
Fix MultilingualQUerySet custom inheritance - part 2.
2013-01-08 12:17:23 +01:00
Jacek Tomaszewski
865f451953
Fix MultilingualQUerySet custom inheritance.
2013-01-07 18:02:15 +01:00
Jacek Tomaszewski
df351b758b
Add possibility to turn off query rewriting in MultilingualManager.
2012-12-31 13:11:23 +01:00
Dirk Eschler
b2437741aa
Used get_language from modeltranslation.utils. Otherwise the returned language isn't guaranteed to be in the LANGUAGES setting and the manager might rewrite the field name to something like foo_en_us.
2012-11-13 13:31:00 +01:00
Jacek Tomaszewski
cff7382f74
Fix objects.create kwargs priority.
2012-11-12 12:25:02 +01:00
Jacek Tomaszewski
0949e95441
Add MultilingualManager and its tests.
2012-11-11 16:28:29 +01:00