Commit graph

80 commits

Author SHA1 Message Date
Thomas Jost
22423047e9
Correctly patch all managers in Django 1.10+
Fixes #389 and #413.
2017-09-26 16:29:20 +02:00
Mariusz Felisiak
a7b484d10a
Used Meta.base_manager_name on model instead of Manager.use_for_related_fields. 2017-06-23 21:10:23 +02:00
Mariusz Felisiak
b64ddf2e20
Used model attribute instead of deprecated ForeignObjectRel.to. 2017-06-22 22:15:37 +02:00
Jacek Tomaszewski
a7b5102c43 Fix deferred classes signal connection (close #379). 2016-08-19 21:23:45 +02:00
Jacek Tomaszewski
302c931fe0 Django 1.10 integration (ref #381) 2016-08-19 21:23:45 +02:00
Matthias Kestenholz
dad7cc7ba6 Slightly reformat code to avoid flake8 errors
These changes hopefully fix the Travis CI build.
2016-02-20 11:21:07 +01:00
Jacek Tomaszewski
e50b0ce7a4 Try to fix custom manager in migrations (ref #330, #339, #350). 2015-12-13 15:47:08 +01:00
Jacek Tomaszewski
8320fc8a5a Add Django 1.9 support (ref #349). 2015-12-06 18:48:17 +01:00
Stratos Moros
84ff47d7af fix proxy model inheritance for django >=1.8 2015-10-21 12:22:29 +03:00
zenoamaro
78eaccb927 Satisfying flake8. 2015-05-23 01:19:16 +02:00
zenoamaro
9674667261 Added decorator equivalent for translator.register. 2015-05-22 23:31:40 +02:00
Mathias
f23e2f7ee2 Better support for django 1.8 (Fixes #304) 2015-05-13 14:06:44 +02:00
Jacek Tomaszewski
f6d02c1e5a Fix deferring - enable skipped test (#299). 2015-04-13 22:31:09 +02:00
Jacek Tomaszewski
17f3d96ccc Rewrite spanned queries on all levels for defer/only (close #248).
Also:
- optimize fields to related model access
- more elegant way to access DefferedModel real class
- fix select_related rewriting and add some code to contemplate possible solutions
- update docs about select_related
- add 2 test for implemented features
2014-07-09 23:19:48 +02:00
Jacek Tomaszewski
7a7b3fbc3b Rewrite field names in select_related; fix deffered models registry lookup (close #248). 2014-07-06 19:36:46 +02:00
Jacek Tomaszewski
58e06c464d Fix MultilingualManager MRO (close #204). 2014-07-06 14:39:53 +02:00
Jacek Tomaszewski
41f8c68ed4 Update docs; fix type coercion. 2014-06-21 23:36:01 +02:00
Jacek Tomaszewski
2cd9467716 Fix ProxyModel handling. 2014-06-09 23:32:22 +02:00
Jacek Tomaszewski
f6087cf3fa Detect custom get_queryset on managers (ref #242). 2014-05-12 17:41:07 +02:00
Jacek Tomaszewski
5ed3a2696b Don't set use_for_related_fields unconditionally on all managers (ref #242). 2014-05-06 21:59:21 +02:00
Jacek Tomaszewski
709c993c07 Fix new code to be Python 3 compatible. 2014-03-18 20:31:21 +01:00
Dirk Eschler
591e945c33 Add more control over required languages (close #143). 2014-03-15 15:18:52 +01:00
Jacek Tomaszewski
b313793490 Use _default_manager instead of objects; patch _default_manager as well. 2014-03-13 19:58:03 +01:00
Jacek Tomaszewski
a15b6f8949 Fixes for flake8. 2014-01-19 22:30:45 +01:00
Jacek Tomaszewski
f97695ac5a Connect signal only for registered model, not all. 2014-01-19 22:13:43 +01:00
Jacek Tomaszewski
c27a4e4e10 Fix form submission (close #219). 2013-12-26 18:59:24 +01:00
Jacek Tomaszewski
42128390e6 Fix proxy model handling.
Previously, proxy models would receive transaltion fields twice, as inspeceted by model._meta.get_fields_with_model()
2013-11-09 16:18:47 +01:00
Jacek Tomaszewski
410888517e Fix abstract managers patching (close #212). 2013-11-09 16:03:25 +01:00
Jacek Tomaszewski
71af06c7c9 Add configurable formfields (close #211, ref #163, #187).
This will hopefully at last resolve the problem with nullable CharFields.
2013-10-23 15:40:45 +02:00
Jacek Tomaszewski
7024268836 Handle proxy models (close #206). 2013-10-12 17:31:18 +02:00
Jacek Tomaszewski
0e76f1ec7d Add OneToOneField support. 2013-10-12 13:58:57 +02:00
Jacek Tomaszewski
81638809bc Fix form handling in case of excluded translated field (close #183). 2013-10-11 20:07:37 +02:00
Jacek Tomaszewski
73d845921a Make every manager MultiLingual, not only objects (close #198). 2013-10-10 15:27:27 +02:00
wrwrwr
b9494f7607 Merge branch 'master' into feature/no-empty-string-fallback-for-nullable
Conflicts:
	modeltranslation/admin.py
	modeltranslation/fields.py
	modeltranslation/translator.py
2013-05-13 13:34:37 +02:00
Kudlaty
69f6bfc75f Use six.with_metaclass instead of some hack. 2013-04-08 11:41:06 +02:00
deschler
e4d772940e Fixed flake8 complaints. 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
3bdbe4eb2c Fix _mt_init attribute deletion (close #176). 2013-04-08 11:37:27 +02:00
Jacek Tomaszewski
264b917081 Fix test running in Django 1.6: model opts function caching. 2013-04-02 22:36:37 +02:00
Jacek Tomaszewski
6c07b18152 Fix Django 1.5 metaclass retrieval (ref #166). 2013-04-02 11:42:57 +02:00
Jacek Tomaszewski
07f7164289 Handle only/defer manager methods (close #166). 2013-04-02 09:51:44 +02:00
wrwrwr
627c2b55e9 Added a fallback_undefined option to allow customizing the value that triggers falling back. 2013-03-17 17:35:22 +01:00
Jacek Tomaszewski
5feff41795 Change the form of `related_query_name` for implicit related_names (ref #161). 2013-03-13 19:24:00 +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
Braden MacDonald
16de24183a Add a descriptor so that ForeignKey 'field_id' attributes work. 2013-03-06 15:54:56 -08:00
Jacek Tomaszewski
f238d6b00d Remove old commented code. 2013-02-19 18:18:48 +01:00
Jacek Tomaszewski
176f4aeeb1 Refactor auto-populating: move code to constructor.
Constructor is better place than pre_save signal since it
has access to all passed arguments (field names).
Also reenabled broken test.
2013-02-19 10:48:08 +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
ce59c16e4f Flake8, unused variable and import. 2013-02-10 19:05:59 +01:00
wrwrwr
11045e8ffb Small cleanup in `FieldsAggregationMetaClass`. The manual inheritance syntax is left mostly for backwards compatibility. 2013-02-10 18:32:22 +01:00