Commit graph

29 commits

Author SHA1 Message Date
Jacek Tomaszewski
079f745621 Small refactor in _join_css_class and its test. 2013-02-15 11:08:37 +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
e94bbcd3d2 Applied styleguide. We allow 100 chars now, let's use the space. 2013-02-06 11:52:46 +01:00
wrwrwr
715b13a1e9 Do generate CSS class name for fields starting with an underscore (still seems to work with two-part codes). 2013-01-24 13:05:44 +01:00
Jacek Tomaszewski
5b51a7b793 Add fallback language feature and base tests. 2012-11-13 16:28:42 +01:00
Jacek Tomaszewski
86cb1e0de2 Use namespaced settings values in utils. 2012-11-13 16:03:09 +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
9d58478b2e Fixed tabs don't properly support two-part language codes. Resolves issue 63. 2012-10-19 13:32:33 +02:00
Dirk Eschler
5d0afa21bd Fixed non-unicode verbose field names (with actual unicode characters) showing up empty in forms. Resolves issue 35. 2012-07-11 20:24:37 +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
39262a8a02 Fixed a bug in the admin integration where an emptied default language field (which has been defined with "blank=True") hasn't cleared the default field. Resolves issue 47. 2011-04-10 20:27:24 +00:00
Dirk Eschler
974503ca0a Moved determination of default language into settings. 2010-07-06 09:52:41 +00:00
Dirk Eschler
adc7af11d3 Fixed fieldname isn't ensured to be string. Resolves issue 41 (thanks martyn.clement). 2010-06-30 19:37:37 +00:00
Dirk Eschler
77350b1e89 Factored out settings into a separate settings.py and consistently used an app specific settings prefix, TRANSLATION_REGISTRY now deprecated in favour of MODELTRANSLATION_TRANSLATION_REGISTRY. 2010-06-26 08:54:08 +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
006239a68e Restored handling of KeyError raised by ForeignKeyTanslationField. 2010-06-21 20:26:52 +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
9b68efda05 Added setting to override the default language. Resolves issue 2. 2010-06-21 09:43:41 +00:00
Dirk Eschler
b8fab905dc Fixed TranslationField pre_save does not get the default language correctly. Factored out determination of default language. Resolves issue 31 (thanks to jaap). 2010-06-17 14:33:39 +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
76e04858cd Fixed verbose names of translated fields are not translated. Resolves issue 24 (thanks to carl.j.meyer). 2010-05-26 09:14:00 +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
68215e5cbb Fixed broken admin fields and fieldsets. Resolves issue 9 (thanks to simoncelen). 2010-02-23 14:20:42 +00:00
Dirk Eschler
325837b742 Fixed creation of db fields with invalid python language code, resolving #4 (thanks to carl.j.meyer). 2010-02-16 10:47:57 +00:00
Peter Eschler
73ee7db101 Initial source and metadata import. 2009-02-17 21:08:19 +00:00