Commit graph

27 commits

Author SHA1 Message Date
Jacek Tomaszewski
0ede18c0c5 Fix field aggregation. 2012-11-15 20:34:20 +01:00
Bruno Tavares
2431e2a21a field aggregation when subclassing a TranslationOption 2012-11-15 18:26:56 +00:00
Jacek Tomaszewski
5b51a7b793 Add fallback language feature and base tests. 2012-11-13 16:28:42 +01:00
Jacek Tomaszewski
df02c81207 Disable rule 3
Merge branch 'upstream/no-rule3' into 'master'
2012-11-12 19:32:50 +01:00
Dirk Eschler
9675b2eb84 Satisfied flake8. 2012-11-12 15:32:11 +01:00
Jacek Tomaszewski
71364966a5 Make model constructor rewrite fields in kwargs. 2012-11-12 12:54:10 +01:00
Jacek Tomaszewski
0949e95441 Add MultilingualManager and its tests. 2012-11-11 16:28:29 +01:00
Jacek Tomaszewski
e170a2f733 Fix registration error.
Due to bad intendation the registration for list of models would fail.
2012-11-11 00:54:49 +01:00
Dirk Eschler
3acfa09dbc - Validated codebase against pep8 and pyflakes.
- Fixed an undefined name bug in add_localized_fields error message when a model already has a field by the name that is added.
- Fixed redefined method name in ModeltranslationWithFileFields test class.
2012-10-24 11:06:35 +02:00
Dirk Eschler
10c9a95da6 Fixed dynamic TranslationOptions model name. 2012-07-11 12:28:30 +00:00
Dirk Eschler
4afb04b75a Moved autoregistration code to init and merged related changes from hyperweek's branch at github . This eliminates the need for hooking into urls.py. 2012-07-11 09:52:49 +00:00
Dirk Eschler
de1441414c Restored debug output which formerly lived in models.py and added it to autoregister. 2012-07-10 15:47:57 +00:00
Dirk Eschler
4579d831e5 Use app-level translation files in favour of a single project-level one. Adds an autoregister feature similiar to the one provided by Django's admin. A new setting MODELTRANSLATION_TRANSLATION_FILES keeps backwards compatibility with older versions. This is basically a merge from django-modeltranslation-wrapper with a few changes regarding how registration is triggered. See documentation for details. Resolves issues 58 and 71 (thanks to Jacek Tomaszewski, the author of modeltranslation-wrapper). 2012-07-10 12:58:08 +00:00
Dirk Eschler
6f7704bc57 Some cleanups and validated codebase against PEP8 and coding guidelines. 2012-07-04 10:09:22 +00:00
Dirk Eschler
1c8e82890d Major refactoring of the admin integration. Subclassed BaseModelAdmin and InlineModelAdmin. Patching options in init doesn't seem to be thread safe. Instead used provided hooks like get_form, get_formset and get_fieldsets. This should resolve several problems with the exclude and fieldsets options and properly support options in inlines. Added a new admin option exclude_languages to exclude certain translation fields per admin class. Moved tests to separate folder and added tests for TranslationAdmin. To run the tests the settings provided in model.tests.modeltranslation have to be used (settings.LANGUAGES override doesn't work for TranslationAdmin). 2012-07-04 09:29:05 +00:00
Dirk Eschler
7b79b3c4d9 Added support for multi-table inheritance. Resolves issues 50 and 51 (thanks to Sébastien Fievet). 2011-06-01 15:25:40 +00:00
Dirk Eschler
f525e1e2c0 Removed experimental support for related fields. The code is now available in a separate branch called django-modeltranslation-related-fields. To support related fields properly, deeper changes to the core of modeltranslation are required. These changes are beyond the scope of the next release. 2010-09-06 12:29:23 +00:00
Dirk Eschler
63fd7c0c7c Changed handling of supported fields. By default CharField, TextField and subclasses of these fields are supported. Supported fields can be extended through the setting MODELTRANSLATION_CUSTOM_FIELDS. Support for related fields is experimental and these fields explicitly raise a FutureWarning now. 2010-08-27 08:39:41 +00:00
Dirk Eschler
406abfb89f Refactored creation of translation fields. Added a factory to handle the creation of translation fields. The factory also checks if a field is officially supported by modeltranslation and bails out early in case it doesn't. Resolves issue 37. 2010-06-24 13:24:03 +00:00
Dirk Eschler
5d5bf067ad Handle related fields in field descriptor (work in progress, issue 36). 2010-06-22 22:02:16 +00:00
Dirk Eschler
0ac39fba8c Added configurable default value per field instance. Resolves issue 28 (thanks to bmihelac). 2010-06-21 13:38:34 +00:00
Dirk Eschler
2e4a85e791 Added support for related fields - ForeignKey, ManyToManyField and OneToOneField. Resolves issue 15. 2010-06-15 12:39:04 +00:00
Dirk Eschler
3f4a6eb472 Validated codebase against pep8. 2010-04-19 10:52:57 +00:00
Dirk Eschler
6220314bc1 Code cleanups. 2010-03-02 22:17:39 +00:00
Dirk Eschler
4a5fd40ec2 Resolved #1 (thanks to carl.j.meyer for the patch). 2010-02-15 17:02:40 +00:00
Peter Eschler
e4a882abc8 Mostly cleanup. 2009-02-21 02:18:06 +00:00
Peter Eschler
73ee7db101 Initial source and metadata import. 2009-02-17 21:08:19 +00:00