Commit graph

73 commits

Author SHA1 Message Date
Serhii Tereshchenko
8742ad3554 style: Reformat files (use double quotes) 2023-11-25 13:48:57 +02:00
Sergei Maertens
2657de7c2e
feat: Support language-specific field defaults
Refs #700, #698
2023-09-08 08:59:58 +03:00
Benedikt Willi
b3debe82d4 Add support for JSONField in modeltranslation/fields.py and update_translation_fields command and add tests for JSONField support. 2023-06-01 22:33:45 +02:00
Serhii Tereshchenko
dc58cb8106 chore: Apply black 2023-05-30 17:42:28 +03:00
Serhii Tereshchenko
3c6cbd59a7 chore: Update old syntax
pyupgrade --keep-percent-format --py38-plus modeltranslation/**/*.py
2023-05-30 17:38:48 +03: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
89abad769c cleanup: Remove six from tests; Remove get_query_set; Remove unused has_custom_queryset 2022-07-13 19:49:54 +03:00
Serg Tereshchenko
d3e2396be6 feat(dev): Migrate to pytest 2022-07-13 19:02:47 +03:00
Serg Tereshchenko
25b6011a1f style: Apply black 2021-09-18 10:55:39 +03:00
Thijs Boehme
6f28721fb7 Change ugettext_lazy to gettext_lazy
Other instances which were skipped in the first commit
2020-03-06 16:37:55 +01:00
Sergey Tereschenko
ce9b5e3c84 Cleanup 2020-02-14 17:22:27 +02:00
Hans de Jong
0df9e5129d updated test and also vlaidate that the correct manager is used 2020-02-13 09:14:48 +01:00
Sergey Tereschenko
74d2b0688a Merge branch 'master' of https://github.com/mvbrn/django-modeltranslation into django-3 2019-10-27 18:57:00 +02:00
Dirk Groten
f42d3404e2 Added test to make sure inherited models with no custom manager still have the correct default manager 2019-10-20 20:06:44 +02:00
Dirk Groten
b6d4cf81d3 Test to check the default manager after registering model for translation 2019-10-20 19:18:27 +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
bffe85d965 Merge branch 'master' into 467-rev-lookup-error
# Conflicts:
#	modeltranslation/tests/tests.py
#	modeltranslation/translator.py
2019-02-17 22:41:04 +02:00
Sergey Tereschenko
68ea5a870d tests update
- use decorators by default
 - remove extra decorator registration test
 - use models as module instead of importing every model
2019-02-16 16:53:21 +02:00
Sergey Tereschenko
1b8fd66f04 Failing test case for #467 2019-02-13 17:29:41 +02:00
Petr Dlouhý
0f67f39e34 fix testing in Django 2.0 2018-01-31 12:11:19 +01:00
Thomas Jost
019d116434
Add (failing) tests for inherited managers and M2M relationships
With several level of inheritance, custom managers with custom
querysets, and a ManyToMany field with an explicit intermediary table.

This reproduces bugs #389 and #413.
2017-09-26 16:27:22 +02:00
Mariusz Felisiak
7a823ea474
Added required on_delete attribute to OneToOneField and ForeignKey fields. 2017-06-22 22:03:07 +02:00
Jacek Tomaszewski
302c931fe0 Django 1.10 integration (ref #381) 2016-08-19 21:23:45 +02:00
zenoamaro
80d804b03e Testing registration with decorator. 2015-05-22 23:49:11 +02:00
Jacek Tomaszewski
e59cf5a4cd Readd GenericIp field support and tests as we now require Django >= 1.4. 2014-08-02 16:42:14 +02:00
Jacek Tomaszewski
17f3d96ccc Rewrite spanned queries on all levels for defer/only (close #248).
Also:
- optimize fields to related model access
- more elegant way to access DefferedModel real class
- fix select_related rewriting and add some code to contemplate possible solutions
- update docs about select_related
- add 2 test for implemented features
2014-07-09 23:19:48 +02:00
Jacek Tomaszewski
58e06c464d Fix MultilingualManager MRO (close #204). 2014-07-06 14:39:53 +02:00
Jacek Tomaszewski
973bb78bda Fix Django 1.7 DeprecationWarnings. 2014-06-09 23:32:22 +02:00
Jacek Tomaszewski
1d7e0876ec Satisfy new flake8 version. 2014-03-27 00:39:41 +01:00
Dirk Eschler
591e945c33 Add more control over required languages (close #143). 2014-03-15 15:18:52 +01:00
Jacek Tomaszewski
85ddf84b8f PEP8 fix. 2014-03-13 19:58:03 +01:00
Jacek Tomaszewski
fb8155a4a5 Fix exclude for nullable field Manager Rewriting (#231). 2014-02-25 22:06:55 +01:00
Jacek Tomaszewski
76da9bf92e Some python3 compatibility fixes (close #220). 2013-12-29 11:00:53 +01:00
Jacek Tomaszewski
9a5fe20140 Fix empty FileField handling (close #215). 2013-11-13 19:04:42 +01:00
Jacek Tomaszewski
0e76f1ec7d Add OneToOneField support. 2013-10-12 13:58:57 +02:00
Jacek Tomaszewski
8a2c8b894e Add more prepopulated_fields tests. 2013-10-10 16:54:15 +02:00
Jacek Tomaszewski
73d845921a Make every manager MultiLingual, not only objects (close #198). 2013-10-10 15:27:27 +02:00
Jacek Tomaszewski
74df71bdf2 Merge pull request #163 from wrwrwr/feature/no-empty-string-fallback-for-nullable
Fallback on field default rather than the empty string
2013-09-01 10:52:00 -07:00
Dirk Eschler
cc5687e4d0 Merged test-unique-nullable-fields branch into master. 2013-06-18 11:09:14 +02:00
deschler
20d7e21809 Added basic ProxyModel test cases (ref #185). 2013-05-26 20:22:39 +02:00
wrwrwr
b9494f7607 Merge branch 'master' into feature/no-empty-string-fallback-for-nullable
Conflicts:
	modeltranslation/admin.py
	modeltranslation/fields.py
	modeltranslation/translator.py
2013-05-13 13:34:37 +02:00
Kudlaty
966c0f38ad Initial work towards python 3 support 2013-04-08 11:41:06 +02:00
Jacek Tomaszewski
3bdbe4eb2c Fix _mt_init attribute deletion (close #176). 2013-04-08 11:37:27 +02:00
Jacek Tomaszewski
54a2ad043f Fix test running in Django 1.6: boolean field default. 2013-04-02 11:46:05 +02:00
Jacek Tomaszewski
32e945e28b Handle non-translation form submision for translated models (close #167). 2013-04-02 09:51:44 +02:00
wrwrwr
740cfea50d Test for the nullable CharField case. 2013-03-17 11:25:42 +01:00
Jacek Tomaszewski
fccdf93577 Finish ForeignKey reverse relation handling (ref #161).
Also enhance tests and refactor MultilingualManager rewriting of
spanned relations lookups.
2013-03-13 15:50:22 +01:00
Braden MacDonald
43a61a0bcc Add tests for foreign key reverse relations, and fix some issues. Still incomplete. ref deschler/django-modeltranslation#161 2013-03-10 16:39:14 -07:00
Jacek Tomaszewski
fc798eaeb4 Attempt to rewrite related_names (ref #161). 2013-03-08 21:13:37 +01:00