Commit graph

409 commits

Author SHA1 Message Date
wrwrwr
7ff0506f27 Context manager for temporarily switching fallbacks on or off. 2013-02-24 11:01:08 +01:00
deschler
e900ccca10 Added a 'How to contribute' section. 2013-02-24 01:28:43 +01:00
Dirk Eschler
d69d315f7e Merge pull request #149 from aitzol/master
Little typo in docs
2013-02-20 05:55:05 -08:00
Aitzol Naberan
b163182c3a Fix typo 2013-02-20 14:44:34 +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
d31c4f833b Update docs. 2013-02-19 18:04:27 +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
Dirk Eschler
92a25ffb91 Updated changelog. 2013-02-19 17:37:52 +01:00
Dirk Eschler
c913b65258 Updated contributors. 2013-02-19 17:36:11 +01:00
Dirk Eschler
cd7b1b4d44 Added missing protocol to google cdn links and some minor changes. 2013-02-19 17:21:05 +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
72bf289479 now the docs are really updated ;) 2013-02-18 21:57:39 +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
e99a7c19dd Fixed typo. 2013-02-17 23:20:09 +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
a436d19fc4 Updated changelog. 2013-02-17 21:09:01 +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
89bfa0bdbe Updated changelog. 2013-02-13 11:34:20 +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
415ccdae9d Updated changelog. 2013-02-12 16:06:51 +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
22cf573724 Used code blocks consistently. 2013-02-12 14:06:39 +01:00
Dirk Eschler
8e8e9a3bbc Fixed missing newline. 2013-02-12 14:05:00 +01:00
Dirk Eschler
66c8153bc8 Added documentation for the TranslationAdmin.group_fieldsets option. 2013-02-12 14:04:43 +01:00
Dirk Eschler
401d66dd41 Updated changelog. 2013-02-12 12:55:58 +01:00
Dirk Eschler
2ab73babe0 Small optimization, don't loop twice over trans_fields. 2013-02-12 12:33:33 +01:00
Dirk Eschler
966d5ee962 Added unittest for group-fieldsets functionality in TranslationAdmin. 2013-02-12 12:20:32 +01:00