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
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
54a2ad043f
Fix test running in Django 1.6: boolean field default.
2013-04-02 11:46:05 +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
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
Jacek Tomaszewski
fc798eaeb4
Attempt to rewrite related_names (ref #161 ).
2013-03-08 21:13:37 +01: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
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
46afcd0e5e
Disable timezone support for tests, as the date / time fields' tests use naive datatime objects and fail if it's enabled.
2013-02-20 17:48:35 +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
deschler
057a34e2a0
Removed accidentally committed decorator leftover.
2013-02-15 01:00:09 +01:00
deschler
f8c5d46b7a
Simplified checks in _join_css_class and updated test to reflect the change (issue #141 ).
2013-02-15 00:57:55 +01:00
Jacek Tomaszewski
de205918ca
Fix descriptor test for mysql.
2013-02-13 15:59:32 +01:00
Dirk Eschler
c06134bff4
Merge branch 'master' of github.com:deschler/django-modeltranslation
2013-02-13 12:21:27 +01:00
Dirk Eschler
83a6333cd2
Added admin test for readonly fields only.
2013-02-13 12:21:21 +01:00
Jacek Tomaszewski
f7759ba75a
Extract number of registered test models as constant.
2013-02-13 12:01:54 +01:00
Jacek Tomaszewski
14fdaa59fa
Add descriptor test.
2013-02-13 11:59:11 +01:00
Dirk Eschler
4ca3c103e5
Fixed prepopulated fields only work on the first defined field and made function aware of the current language. Added a unittest to verify. Resolves issue #57 .
2013-02-12 15:53:00 +01:00
Dirk Eschler
966d5ee962
Added unittest for group-fieldsets functionality in TranslationAdmin.
2013-02-12 12:20:32 +01:00
Dirk Eschler
48ceae54b7
Added admin test for multitable inheritance to verify that issue #50 was resolved by pull request #137 .
2013-02-11 12:16:03 +01:00
Dirk Eschler
8ff3b3731a
Fixed messed up multitable test model names.
2013-02-11 11:53:01 +01:00
wrwrwr
ce59c16e4f
Flake8, unused variable and import.
2013-02-10 19:05:59 +01:00
wrwrwr
36c5d0b81a
Test registration and translation fields inheritance with a more complex model hierarchy (inspired by Mezzanine).
2013-02-10 18:32:17 +01:00
Jacek Tomaszewski
8a20600d3a
Flake8 fix.
2013-02-09 22:46:11 +01:00
Jacek Tomaszewski
3fa3d653d0
Remove unnecessary test methods.
2013-02-09 22:34:36 +01:00