Commit graph

75 commits

Author SHA1 Message Date
Jacek Tomaszewski
395771d227 Patch db_column of translation fields in migration files (close #264). 2014-09-07 21:42:05 +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
Dirk Eschler
3281547a9e Respect null option of TranslationField in migrations. 2014-07-14 11:07:17 +02:00
Jacek Tomaszewski
c4d6c82f95 Fix six import (ref #253). 2014-07-11 15:04:03 +02:00
Dirk Eschler
f7acd8a688 Used six compatibility layer (ref #253). 2014-07-11 14:40:38 +02:00
Dirk Eschler
fd911bb37b Fixed unicode call in deconstruct to maintain Python3 compatibility. 2014-07-11 13:31:57 +02:00
Dirk Eschler
e4e325a8e7 Fixed translation fields in migrations don't include language code (close #253). 2014-07-11 12:37:41 +02:00
Jacek Tomaszewski
6b8c429921 Add deconstruct() to field definition. 2014-06-09 23:19:54 +02:00
Dirk Eschler
591e945c33 Add more control over required languages (close #143). 2014-03-15 15:18:52 +01:00
Jacek Tomaszewski
c27a4e4e10 Fix form submission (close #219). 2013-12-26 18:59:24 +01:00
Jacek Tomaszewski
9a5fe20140 Fix empty FileField handling (close #215). 2013-11-13 19:04:42 +01:00
Jacek Tomaszewski
a3a274ae62 Add docs about empty_values (close #211). 2013-11-09 14:28:38 +01:00
Jacek Tomaszewski
71af06c7c9 Add configurable formfields (close #211, ref #163, #187).
This will hopefully at last resolve the problem with nullable CharFields.
2013-10-23 15:40:45 +02:00
Jacek Tomaszewski
b8cf1ef015 Fix db_column (close #210). 2013-10-18 10:46:15 +02:00
Jacek Tomaszewski
0e76f1ec7d Add OneToOneField support. 2013-10-12 13:58:57 +02:00
Jacek Tomaszewski
81638809bc Fix form handling in case of excluded translated field (close #183). 2013-10-11 20:07:37 +02:00
Jacek Tomaszewski
656dca3e40 Show None checkboxes on form fields, especially admin (close #187). 2013-10-10 23:05:26 +02:00
wrwrwr
22faea9646 Reworked the solution by replacing clearable widgets with a widget wrapper. This makes it possible to wrap only widgets of nullable fields, and thus not add the clear checkbox when it's not needed.
The implementation is loosely based on RelatedFieldWidgetWrapper from contrib.admin, but uses a bit more Python magic; tested only with TextInput and Textarea widgets and their admin counterparts, but with a bit of luck should work with other widgets too.
2013-05-14 22:21:03 +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
Jacek Tomaszewski
fef3109e60 Fix test running in Django 1.6: foreignkey support (close #169). 2013-04-02 23:27:21 +02:00
Jacek Tomaszewski
32e945e28b Handle non-translation form submision for translated models (close #167). 2013-04-02 09:51:44 +02:00
Jacek Tomaszewski
07f7164289 Handle only/defer manager methods (close #166). 2013-04-02 09:51:44 +02:00
wrwrwr
97d966244d Implemented a widget that shows a clear checkbox for any non-required form field.
Overriden admin widgets of CharFields and TextFields and patched forms.CharField for nullable fields, so undefined translations don't get filled with empty strings when an admin form is saved (thus becoming defined in the case of a nullable field).
2013-03-24 17:59:21 +01:00
wrwrwr
b00a1044c6 Flake8, overindented continuation line. 2013-03-17 17:43:24 +01:00
wrwrwr
627c2b55e9 Added a fallback_undefined option to allow customizing the value that triggers falling back. 2013-03-17 17:35:22 +01:00
wrwrwr
7d209ae4e3 Only fallback when there is no value for a given translation or the value is the field's default.
For CharField(null=True) the default is None, so empty string becomes a proper value (it's sometimes useful to treat it differently than None).
2013-03-17 11:24:24 +01:00
Jacek Tomaszewski
47cc2cb1b7 Fix flake8 2013-03-13 23:52:44 +01:00
Jacek Tomaszewski
5feff41795 Change the form of `related_query_name` for implicit related_names (ref #161). 2013-03-13 19:24:00 +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
Braden MacDonald
16de24183a Add a descriptor so that ForeignKey 'field_id' attributes work. 2013-03-06 15:54:56 -08:00
Braden MacDonald
420e3b6c52 Implement ForeignKey support (does not support reverse relations) 2013-03-06 14:20:16 -08:00
Jacek Tomaszewski
38ff4a28ea Refactor fix for #154 and add a test. 2013-02-27 20:02:23 +01:00
Jacek Tomaszewski
26b904ef7e Hotfix for #154 2013-02-26 23:17:19 +01:00
wrwrwr
7ff0506f27 Context manager for temporarily switching fallbacks on or off. 2013-02-24 11:01:08 +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
dbc114f228 Allow descriptor introspection.
(See Django #8248 for details,
http://code.djangoproject.com/ticket/8248)
2013-01-29 19:54:23 +01:00
Dirk Eschler
56926d5801 Fixed db_column option not taken into account. Resolves issue #83. 2012-11-18 15:30:34 +01:00
Dirk Eschler
5affe7940c Added basic tests for DateField, DateTimeField and TimeField and added them to the list of supported fields. 2012-11-18 00:08:04 +01:00
Dirk Eschler
4abf2dbb6f Marked FilePathField as an implicitly supported field as it is a subclass of CharField. 2012-11-17 23:00:57 +01:00
Dirk Eschler
0f3a89cf39 Handled GenericIPAddressField which is only present in Django 1.4+. 2012-11-17 17:35:21 +01:00
Dirk Eschler
5088f591fd Disabled the test for GenericIPAddressField for now as it new in Django 1.4 and the tests will fail with 1.3. That said we don't expect any different behaviour from this field compared to IPAddressField. 2012-11-17 17:12:24 +01:00
Dirk Eschler
1163765c3b Increased the list of supported fields. Today featuring: Floatfield, DecimalField, IPAddressField and GenericIPAddressField. 2012-11-17 16:19:15 +01:00
Jacek Tomaszewski
261818de8b Refactor SUPPORTED_FIELDS: delete IntegerField subclasses. 2012-11-15 20:53:24 +01:00
Bruno Tavares
940b8911b1 Clean up the namespace imports 2012-11-15 10:30:03 +00:00
Dirk Eschler
7dd3891821 Added support and basic tests for BooleanField and NullBooleanField. 2012-11-14 23:37:45 +01:00
Dirk Eschler
825cbe38da Refactored TranslationField. Removed method overrides which are obsoleted by the the field_factory. 2012-11-14 22:43:42 +01:00
Dirk Eschler
93db5f109b Reflected baseclass name of returned subclass in field factory. 2012-11-14 14:18:38 +01:00
Jacek Tomaszewski
5b51a7b793 Add fallback language feature and base tests. 2012-11-13 16:28:42 +01:00