Commit graph

56 commits

Author SHA1 Message Date
Benedikt Willi
66387f433a Add support for JSONField in modeltranslation/fields.py and update_translation_fields command and add tests for JSONField support. 2023-06-01 22:08:16 +02:00
Gabriele Baldi
f69e3172bc
feat: Add support for ManyToManyFields 🧑‍🤝‍🧑 (#668) 2023-01-27 15:05:18 +02:00
Tim Gates
ab79ec8512
docs: Fix a few typos (#651)
There are small typos in:
- docs/modeltranslation/admin.rst
- docs/modeltranslation/installation.rst
- docs/modeltranslation/related_projects.rst
- modeltranslation/admin.py
- modeltranslation/management/commands/sync_translation_fields.py
- modeltranslation/tests/models.py

Fixes:
- Should read `similar` rather than `similiar`.
- Should read `whose` rather than `whos`.
- Should read `original` rather than `orginal`.
- Should read `missing` rather than `missings`.
- Should read `consistent` rather than `consistant`.
- Should read `compatibility` rather than `compatibiliy`.

Signed-off-by: Tim Gates <tim.gates@iress.com>
2022-09-03 21:56:06 +03:00
Serg Tereshchenko
86b67c271e fix: Remove six (old compat layer for python2) 2022-07-13 23:14:28 +03:00
Serg Tereshchenko
a8e5d24b11 cleanup: Remove obsolete code for old django in loaddata command 2022-07-13 20:04:39 +03:00
Serg Tereshchenko
25b6011a1f style: Apply black 2021-09-18 10:55:39 +03:00
Pieter Goetschalckx
fd137d8ae9
Fix Django 3.2 compatibility (#590)
feat: Add Django 3.2 compatibility

order_by in update_translation_fields.py:84 can be removed after next django 3.2.x is released (https://code.djangoproject.com/ticket/32645).
2021-04-15 08:51:08 +03:00
Fernando
ac91740a5c
feat: Adds a language option to the update_translation_fields commands
Refs #563
Co-authored-by Fernando Cordeiro <fernando.cordeiro@jeronimo-martins.com>
2020-08-18 10:33:41 +03:00
partizan
7bb8194ac9
Merge pull request #485 from fdemmer/update_translation_fields
Add app_label and model_name arguments to update_translation_fields command
2019-11-08 10:25:52 +02:00
Misha Kalyna
5505208003 explicitly install and import six (which was removed from Django 3.0) 2019-10-05 21:07:08 +02:00
Sergey Tereschenko
0ea5be2ed1 fix error in handling proxy model 2019-04-17 00:27:02 +03:00
Sergey Tereschenko
065e23e89c cleanup: remove code for old django versions 2019-02-12 23:43:52 +02:00
Florian Demmer
1fc13c9c59 Exclude proxy and not managed models 2018-11-09 20:06:28 +01:00
Florian Demmer
1674f247c7 Add app_label & model_name arguments to only update specific apps/models 2018-11-09 20:06:28 +01:00
Florian Demmer
1d23de4b18 Improve formatting 2018-11-07 10:37:35 +01:00
Florian Demmer
e24dd4bd72 Remove redundant type conversion 2018-11-07 10:37:01 +01:00
Florian Demmer
17f66030a6 Remove redundant linebreak 2018-11-07 10:36:42 +01:00
Dirk Eschler
85e26e3842 Removed superfluous can_import_settings check. The option has been removed in Django 1.11. 2017-02-22 14:17:27 +01:00
Matthias Kestenholz
b6cc6888af Remove the unsupported use-mirrors pip option
Remove the duplicated make_option import

Pin flake8's version to <3 as long as we are still supporting Python 2.6

Stop complaining (F999) about the assert

Fix travis.py for now

This will fail again as soon as Django 2.0 is released.
2016-09-14 12:35:58 +02:00
Primož Kerin
5c93fd6b7f Make sync_translation_fields command Django 1.10 compatible 2016-09-14 12:35:58 +02:00
Jacek Tomaszewski
8320fc8a5a Add Django 1.9 support (ref #349). 2015-12-06 18:48:17 +01:00
Dirk Eschler
15c7d9d6f6 Omitted transaction.commit_unless_managed() call for newer Django versions. This is handled by the transaction system in Django 1.6 and above (close #310). 2015-05-06 14:18:32 +02:00
Dirk Eschler
1f7ce84bf2 Fixed deprecated meta api usage for Django 1.8, module_name was renamed to model_name (ref #310). 2015-05-06 12:35:57 +02:00
Jacek Tomaszewski
d8e6f32cbd Django 1.8 compatibility changes (ref #299).
Thanks to Luca Corti for initial commit.
2015-04-13 00:43:09 +02:00
Jacek Tomaszewski
c89aac29fa Remove unused import. 2014-06-09 00:00:50 +02:00
Jacek Tomaszewski
0dd826547b Fixed sync_translation_fields to be compatible with Postgresql (close #247). 2014-06-05 22:53:35 +02:00
Dirk Eschler
813b5b2e0c Merge pull request #225 from leplatrem/db_column_with_sync
Take db_column into account while syncing fields
2014-04-16 01:02:09 +02:00
Jacek Tomaszewski
b313793490 Use _default_manager instead of objects; patch _default_manager as well. 2014-03-13 19:58:03 +01:00
Mathieu Leplatre
bb29a72b45 Use AVAILABLE_LANGUAGES do detect missing fields 2014-02-05 17:44:16 +01:00
Mathieu Leplatre
a2c6f75efe Take db_column into account while syncing fields 2014-02-04 16:57:45 +01:00
Jacek Tomaszewski
76da9bf92e Some python3 compatibility fixes (close #220). 2013-12-29 11:00:53 +01:00
Jacek Tomaszewski
e78ef34808 Make loaddata command retain locale (close #151). 2013-10-12 15:14:10 +02:00
deschler
a26bdd8041 Fixed flake8 errors. 2013-05-23 23:11:54 +02:00
cuchac
dfc49971dc Fix #179: --noinput option for the sync_translation_fields command 2013-05-23 13:43:31 +02:00
Jacek Tomaszewski
b7ea1fac4c Further work towards Python 3 support. 2013-04-08 11:41:06 +02:00
Kudlaty
966c0f38ad Initial work towards python 3 support 2013-04-08 11:41:06 +02:00
Jacek Tomaszewski
134427dfa4 Add auto-population option to loaddata command (close #160). 2013-03-05 21:43:27 +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
Dirk Eschler
e94bbcd3d2 Applied styleguide. We allow 100 chars now, let's use the space. 2013-02-06 11:52:46 +01:00
Jacek Tomaszewski
facfa3bcd7 Revert "Added a workaround for abstract models not being handled correctly."
This reverts commit a3e44c187b.
2013-01-08 12:17:44 +01:00
Dirk Eschler
a3e44c187b Added a workaround for abstract models not being handled correctly. See issue #123 for details. 2013-01-07 14:46:35 +01:00
Dirk Eschler
ab48b5a975 Fixed verbosity switch, which is used as an int but was not coerced. 2013-01-07 14:40:03 +01:00
Jacek Tomaszewski
e48a35d35e Fix update_translation_fields command. 2012-12-31 13:12:34 +01:00
Mihai Sucan
2ffe539727 Update modeltranslation/management/commands/sync_translation_fields.py
Fix exception:

TypeError: db_type() got multiple values for keyword argument 'connection'

Explanation: http://stackoverflow.com/questions/7068057/explicit-argument-in-signature-does-not-work-very-odd
2012-11-15 14:47:19 +02: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
e2bc3f2d4d Added a new management command sync_database_fields to sync the database after a new model has been registered or a new language has been added. Resolves issue 62 (thanks to Sébastien Fievet and the authors of django-transmeta). 2012-07-11 12:57: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
80d97888b0 Improved performance of update_translation_fields command. Resolves issue 43 (thanks to adamsc). 2010-09-06 08:58:52 +00:00
Dirk Eschler
974503ca0a Moved determination of default language into settings. 2010-07-06 09:52: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