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
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
Jacek Tomaszewski
09036c0946
Fix autodiscover tests.
2013-02-09 22:33:49 +01:00
Jacek Tomaszewski
458f3e2f8e
Damned Python 2.5 decorators.
2013-02-09 20:49:54 +01:00
Jacek Tomaszewski
9871e64ea6
Add autodiscover tests.
2013-02-09 20:35:34 +01:00
Dirk Eschler
f0602b9dcc
Merge pull request #134 from wrwrwr/feature/starting-underscore-tabbed-admin-fix
...
Fix CSS class generation for fields starting with an underscore
2013-02-03 08:17:54 -08:00
Jacek Tomaszewski
3c9bae241e
Fix descending order rewriting in all ordering calls.
2013-02-03 15:08:24 +01:00
Jacek Tomaszewski
18e70bb4e1
Merge pull request #133 from wrwrwr/feature/descending-order-with-translation-fix
...
Fix ``order_by`` on descending translation field
2013-02-03 05:36:02 -08:00
wrwrwr
c6c866ba70
Flake8, remove unused variables.
2013-02-03 14:24:02 +01:00
wrwrwr
b42a9142ac
Added a simple test that catches the descending order problem.
2013-01-31 17:42:20 +01:00
Jacek Tomaszewski
dbc114f228
Allow descriptor introspection.
...
(See Django #8248 for details,
http://code.djangoproject.com/ticket/8248 )
2013-01-29 19:54:23 +01:00
wrwrwr
8ebc7a828e
Test that CSS classes names are built properly.
2013-01-24 13:05:51 +01:00
Jacek Tomaszewski
865f451953
Fix MultilingualQUerySet custom inheritance.
2013-01-07 18:02:15 +01:00
Jacek Tomaszewski
00210c14ba
Fix for mysql.
2012-12-31 13:47:57 +01:00
Jacek Tomaszewski
f13bcdbebc
Add test concerning update_translation_fields command.
2012-12-31 13:12:03 +01:00
Jacek Tomaszewski
91db5d2ff7
Fix translation registry in tests.
2012-12-31 13:08:50 +01:00
Jacek Tomaszewski
0c0edb4aaf
New rule3 test.
2012-12-07 13:14:05 +01:00
Jacek Tomaszewski
85164b2ff2
Fix ContentFile usage to be Django 1.3 compatible.
2012-12-06 18:38:51 +01:00
Jacek Tomaszewski
0bdd01b0c8
Refactor tests: add section labels in models and translation.
2012-12-06 18:13:59 +01:00
Jacek Tomaszewski
5085f7e111
Refactor tests: create default_fallback context manager.
2012-12-06 18:09:03 +01:00
Jacek Tomaszewski
6947814e2a
Refactor tests: refactor ModelValidationTest.
2012-12-06 17:59:28 +01:00
Jacek Tomaszewski
c065485d53
Refactor tests: refactor all RulesTests.
2012-12-06 17:08:17 +01:00