Commit graph

370 commits

Author SHA1 Message Date
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
Dirk Eschler
6c66cec35e Honoured options like exclude for translation fields and assured that we don't end up with empty fields in untranslated fieldsets. 2013-02-12 12:17:27 +01:00
Dirk Eschler
70c0d8bc90 Updated contributors. 2013-02-12 10:53:31 +01:00
Dirk Eschler
e6b05d1a7f Sorted translation fields by fieldname. 2013-02-12 10:40:26 +01:00
Dirk Eschler
dbcff0d2df Moved group_fieldsets to class. 2013-02-12 10:30:00 +01:00
deschler
9996ef39cd Added a new group_fieldsets option to TranslationAdmin to group fieldsets by translation fields. An approach to issue #38. Based on initial code by Chris Adams. Adopted and enhanced for the latest admin refactoring. The new option currently defaults to False and has to be activated on demand. 2013-02-11 22:29:58 +01:00
Dirk Eschler
3cca88e336 Updated changelog. 2013-02-11 12:39:15 +01:00
Dirk Eschler
b5d1fdf9c8 Incremented version number. 2013-02-11 12:28:39 +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
d78570930b Merge branch 'master' of github.com:deschler/django-modeltranslation 2013-02-11 11:57:15 +01:00
Dirk Eschler
8ff3b3731a Fixed messed up multitable test model names. 2013-02-11 11:53:01 +01:00
Dirk Eschler
a78639ad63 Merge pull request #137 from wrwrwr/feature/translation-fields-inheritance
Translation fields inheritance
2013-02-11 02:34:57 -08:00
Dirk Eschler
3889755572 Merge branch 'feature/translation-fields-inheritance' of https://github.com/wrwrwr/django-modeltranslation 2013-02-11 11:00:03 +01:00
wrwrwr
ce59c16e4f Flake8, unused variable and import. 2013-02-10 19:05:59 +01:00
deschler
bedd18ea9e Updated changelog. 2013-02-10 18:36:48 +01:00
wrwrwr
11045e8ffb Small cleanup in `FieldsAggregationMetaClass`. The manual inheritance syntax is left mostly for backwards compatibility. 2013-02-10 18:32:22 +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
wrwrwr
772d51c1c3 Adapt admin to new translation options, allowing it to manage translation fields inherited from concrete supermodels.
``TranslationOptions.localized_fieldnames_rev`` is no longer available, but should be replaceable by field.translated_field (may be readded as a ``TranslationOptions`` method if it's useful for something).
2013-02-10 18:28:06 +01:00
wrwrwr
6ba37ec8c2 Adapt management commands and a debug message (by using `get_registered_models rather than directly registry`). 2013-02-10 18:28:06 +01:00
wrwrwr
54699c580b Separate registry for manager shouldn't be needed any longer -- the main registry caches options for all seen models.
Now it might be possible to optimize the manager by precomputing or caching ``fields_to_translatable_models`` on translation options (instances).
2013-02-10 18:28:00 +01:00
deschler
e5a574f26a Prepared 0.5 release. 2013-02-10 18:26:50 +01:00
deschler
a264663430 Added a README link to satisfy sdist. 2013-02-10 18:25:59 +01:00
wrwrwr
30b6768f0f Refactor translation options to be able to keep track of translation fields inherited from concrete supermodels and find fields inherited indirectly (through unregistered parents). Ensure that a base is not registered after or unregistered before submodel (that would necessitate repatching the submodel).
This changes how _registry looks, now info about all seen models is stored (including unregistered ascendants of registered models), to avoid recomputing parents options when determining translation fields of a submodel. ``TranslationOption`` instances have just two dictionaries of fields: ``local_fields`` (similar to the former ``localized_fieldnames``) and ``fields`` to match Django naming and precompute only what's necessary.
2013-02-10 18:23:35 +01:00
Jacek Tomaszewski
8a20600d3a Flake8 fix. 2013-02-09 22:46:11 +01:00
Jacek Tomaszewski
9646b5b613 Use newest versions of Django. 2013-02-09 22:38:52 +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
e94bbcd3d2 Applied styleguide. We allow 100 chars now, let's use the space. 2013-02-06 11:52:46 +01:00
Dirk Eschler
f18e744b13 Merge branch 'fix_get_fields_to_translatable_models' 2013-02-06 10:16:12 +01:00
deschler
d07ad3dba6 Updated contributors. 2013-02-03 18:54:57 +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
Dirk Eschler
3f735b63d5 Merge pull request #135 from wrwrwr/feature/js-compute-grouped-translations-once
Avoid computing "grouped_translations" twice in tabbed admin script
2013-02-03 08:03:01 -08:00
Jacek Tomaszewski
3c9bae241e Fix descending order rewriting in all ordering calls. 2013-02-03 15:08:24 +01:00
Jacek Tomaszewski
5a9622efbf Update AUTHORS file. 2013-02-03 14:41:39 +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
Dirk Eschler
af9895dac4 Iterate over translation fields only in get_fields_to_translatable_models. Potential fix for issue #132. 2013-02-01 10:45:52 +01:00
Dirk Eschler
4ad97b857a Included changelog in documentation. 2013-01-31 17:44:37 +01:00