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
Dirk Eschler
775b748114
Merge branch 'master' of github.com:deschler/django-modeltranslation
2013-03-01 10:32:42 +01:00
Dirk Eschler
c76b656ef2
Prepared 0.6 release.
2013-03-01 10:32:37 +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
Dirk Eschler
236f2babfa
Fixed columns in tabular inlines not hidden if extra=0 is declared on inline (Resolves issue #156 ).
2013-02-27 14:28:26 +01:00
Dirk Eschler
23bf2ea1df
Simplified alignment of translation and non-translation fields.
2013-02-27 10:30:16 +01:00
Jacek Tomaszewski
26b904ef7e
Hotfix for #154
2013-02-26 23:17:19 +01:00
Dirk Eschler
c30c6405c0
Added top margin for selects in tabular inlines and excluded date and time fields (this requires more care, added FIXME).
2013-02-26 17:55:17 +01:00
Dirk Eschler
1dcdc1ebfe
Simplified exclusion of translation fields in grouped_fieldsets (thanks to Wojtek Ruszczewski for poiting this out).
2013-02-26 10:49:33 +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
7ff0506f27
Context manager for temporarily switching fallbacks on or off.
2013-02-24 11:01:08 +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
f238d6b00d
Remove old commented code.
2013-02-19 18:18:48 +01:00
Jacek Tomaszewski
9e41538035
Merge branch 'populate-modes-cleaned'
2013-02-19 18:15:47 +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
Dominique Lederer
67f42e4f5e
readded force_jquery.js, implemented backward compatibility changes, updated docs
2013-02-19 12:59:31 +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
Dominique Lederer
123879172e
fixing broken tabindex on Tabbed Translation Fields:
...
- updated to latest jquery UI, which fixes the totaly wrong tabindex when using Tabbed Translation Fields. This also needs a newer jquery, so django shipped jquery can no longer be used.
- udated docs according to changes
2013-02-18 21:54:27 +01:00
deschler
a3ae593aff
Don't limit fields to text type, we support file fields now.
2013-02-17 22:51:24 +01:00
deschler
9e09bdccbc
Moved update tab functionality to MainSwitch.
2013-02-17 19:23:50 +01:00
deschler
28f1a5eff2
Refactored MainSwitch into a singleton.
2013-02-17 16:59:34 +01:00
deschler
f262c5717a
Fixed some visual glitches in tabular inlines.
2013-02-17 14:03:31 +01:00
deschler
8d2a7a7798
Refactored tabular inline treatment. Introduced a new TabularInlineGroup which stores information about its contained table. It handles most the complexity like updating the table or retrieving its translation fields through a TranslationFieldGrouper. It can return either all translation fields for the initial regrouping of columns or translation fields based on a jquery selector to handle the add another links.
2013-02-17 12:50:04 +01:00
deschler
6f60e4110b
Merge branch 'master' into tabbed-tabular-inlines
2013-02-16 13:44:29 +01:00
deschler
7ff2a83240
Handled models that are used as inlines on the same page more than once.
2013-02-16 13:43:33 +01:00
deschler
bfc65c163f
Started work on support for tabular inlines in tabbed translation fields (issue #66 ).
2013-02-16 13:41:43 +01:00
Dirk Eschler
970dc71a5a
Merge branch 'tabbed-add-another'
2013-02-15 16:35:19 +01:00
Dirk Eschler
03d933050a
- Refactored the translation field grouping: Added a new reusable TranslationFieldGrouper which groups TranslationFields based on a fieldSelector parameter.
...
- Used camelCase consistently (this ain't Python).
2013-02-15 16:15:57 +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
deschler
83b133049d
Fixed _join_css_class() doesn't take settings.LANGUAGES into account and fails with 'en-us'. Resolves issue #141 .
2013-02-14 22:15:00 +01:00
Dirk Eschler
3b99305965
Initial work issue #79 , where fields added through a add another link in stacked inlines aren't tabbed.
2013-02-14 17:56:16 +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
Dirk Eschler
9a6267838e
Added missing hook for get_readonly_fields. Potential fix for issue #140 .
2013-02-13 12:18:10 +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
f03d89d98d
Handled generic inlines and fixed the ids used for tabs.
2013-02-13 11:04:54 +01:00
deschler
f470d2399c
Fixed keys used in tabbed translation to group translations are not unique for inlines. A potential fix for issue #121 (work-in-progress).
2013-02-12 23:32:03 +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