Commit graph

127 commits

Author SHA1 Message Date
Jacek Tomaszewski
a15b6f8949 Fixes for flake8. 2014-01-19 22:30:45 +01:00
Jacek Tomaszewski
fb98c370ec Make testrunner compatible with Django 1.6. 2014-01-19 22:27:33 +01:00
Jacek Tomaszewski
9a5fe20140 Fix empty FileField handling (close #215). 2013-11-13 19:04:42 +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
49c406d760 Add caching test for relation fields. 2013-10-12 14:09:39 +02:00
Jacek Tomaszewski
0e76f1ec7d Add OneToOneField support. 2013-10-12 13:58:57 +02:00
Jacek Tomaszewski
2853c47710 Try to fix Postgres transaction errors in Django 1.5. 2013-10-11 21:29:51 +02:00
Jacek Tomaszewski
c0fcb8ceb4 Fix test running under Postgres. 2013-10-11 20:30:58 +02:00
Jacek Tomaszewski
8a2c8b894e Add more prepopulated_fields tests. 2013-10-10 16:54:15 +02:00
Jacek Tomaszewski
73d845921a Make every manager MultiLingual, not only objects (close #198). 2013-10-10 15:27:27 +02:00
Jacek Tomaszewski
74df71bdf2 Merge pull request #163 from wrwrwr/feature/no-empty-string-fallback-for-nullable
Fallback on field default rather than the empty string
2013-09-01 10:52:00 -07:00
Dirk Eschler
cc5687e4d0 Merged test-unique-nullable-fields branch into master. 2013-06-18 11:09:14 +02:00
Dirk Eschler
a51e5d0c39 Merged pull request #186. 2013-05-27 12:18:41 +02:00
deschler
20d7e21809 Added basic ProxyModel test cases (ref #185). 2013-05-26 20:22:39 +02:00
wrwrwr
d95258cd02 Test updating existing translation with an empty value through a form that doesn't include the original, translated field. 2013-05-16 12:29:25 +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
Dirk Eschler
412943ba83 Added basic test class for TranslationModelForm. 2013-04-08 12:24:31 +02:00
Jacek Tomaszewski
11e77b4c31 Remove Python 2.5 compatibility code. 2013-04-08 11:57:46 +02:00
Jacek Tomaszewski
3465486da4 Remove Django 1.3 compatibility code. 2013-04-08 11:55:31 +02:00
Jacek Tomaszewski
e04073a7ec Preserve default fields order in group_fieldsets. 2013-04-08 11:41:06 +02:00
Jacek Tomaszewski
b7ea1fac4c Further work towards Python 3 support. 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
a203a65a3c Use proper assert* methods in test.
This remove PendingDeprecationWarnings.
2013-04-04 14:15:24 +02:00
Jacek Tomaszewski
45943d8ee1 Remove dead code from tests. 2013-04-02 23:30:40 +02:00
Jacek Tomaszewski
32e945e28b Handle non-translation form submision for translated models (close #167). 2013-04-02 09:51:44 +02:00
Jacek Tomaszewski
07f7164289 Handle only/defer manager methods (close #166). 2013-04-02 09:51:44 +02:00
Jacek Tomaszewski
ce167e3256 Fix test for #154. 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
wrwrwr
740cfea50d Test for the nullable CharField case. 2013-03-17 11:25:42 +01:00
Jacek Tomaszewski
89e3f9dc72 Merge branch 'foreign-reverse' 2013-03-14 10:02:05 +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
43a61a0bcc Add tests for foreign key reverse relations, and fix some issues. Still incomplete. ref deschler/django-modeltranslation#161 2013-03-10 16:39:14 -07:00
Braden MacDonald
16de24183a Add a descriptor so that ForeignKey 'field_id' attributes work. 2013-03-06 15:54:56 -08:00
Braden MacDonald
420e3b6c52 Implement ForeignKey support (does not support reverse relations) 2013-03-06 14:20:16 -08:00
Jacek Tomaszewski
134427dfa4 Add auto-population option to loaddata command (close #160). 2013-03-05 21:43:27 +01:00
Jacek Tomaszewski
38ff4a28ea Refactor fix for #154 and add a test. 2013-02-27 20:02:23 +01:00
Jacek Tomaszewski
3f4019cfef Remove MODELTRANSLATION_TRANSLATION_REGISTRY handling. 2013-02-27 18:18:29 +01:00
Jacek Tomaszewski
c17f3a2338 Merge pull request #152 from wrwrwr/feature/fallbacks-toggle
Fallbacks toggle
2013-02-25 10:21:41 -08:00
Jacek Tomaszewski
5da1df3366 Remove TODO test comment. 2013-02-24 12:42:22 +01:00
wrwrwr
3a4ec60713 Test and docs for the new fallbacks toggle. 2013-02-24 11:01:38 +01:00
Dirk Eschler
47c717f576 Added a quick test to check the managers behaviour with unique nullable fields. This passes locally with sqlite, let's see what travis has to say about mysql. 2013-02-21 12:54:05 +01:00
wrwrwr
670f378ae5 Be prepared to test with various storages or just with the usual FileSystemStorage, but with an overridden location (e.g. when the storage is created in another apps test before MEDIA_ROOT defined for tests gets set).
It would be nice to also find a way to ensure files are cleaned up with non-file-system storages in case test_translated_models_instance fails in the middle.
2013-02-20 20:45:49 +01:00
wrwrwr
e13798785e Make a bit of cleanup with language overrides, so the tests work with various project settings.
Reloading mt_settings in TestAutodiscover._post_teardown is a workaround for FALLBACK_LANGUAGES being changed by these tests due to some interplay of reload_override_setting and the custom TestCase-wide setting override.
2013-02-20 13:16:20 +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
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
Jacek Tomaszewski
079f745621 Small refactor in _join_css_class and its test. 2013-02-15 11:08:37 +01:00