Commit graph

27 commits

Author SHA1 Message Date
Jacek Tomaszewski
88a89b3a5e Fix values_list without fields; refactor tests (ref #263). 2014-03-22 10:25:41 +01:00
Jacek Tomaszewski
ae8a331893 Fix .values() with no fields specified (close #236). 2014-03-22 00:12:34 +01:00
Jacek Tomaszewski
fb8155a4a5 Fix exclude for nullable field Manager Rewriting (#231). 2014-02-25 22:06:55 +01:00
Jacek Tomaszewski
1a5cd23cdf Make values, values_list and dates language-aware (close #173). 2013-10-12 16:58:36 +02:00
Jacek Tomaszewski
fb7af32757 Ensure that cloned MultiLingualQuerySet stay MultiLingual (close #189). 2013-10-12 16:57:44 +02:00
Jacek Tomaszewski
11e77b4c31 Remove Python 2.5 compatibility code. 2013-04-08 11:57:46 +02:00
Jacek Tomaszewski
b7ea1fac4c Further work towards Python 3 support. 2013-04-08 11:41:06 +02:00
Kudlaty
966c0f38ad Initial work towards python 3 support 2013-04-08 11:41:06 +02:00
Jacek Tomaszewski
07f7164289 Handle only/defer manager methods (close #166). 2013-04-02 09:51:44 +02:00
Jacek Tomaszewski
c326bcd996 Reverse af9895dac4 (close #162, ref #132). 2013-03-16 23:07:48 +01:00
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