Matthias Kestenholz
dad7cc7ba6
Slightly reformat code to avoid flake8 errors
...
These changes hopefully fix the Travis CI build.
2016-02-20 11:21:07 +01:00
oliphunt
28eb14e4fa
CS fixes.
2015-05-26 12:18:45 +01:00
oliphunt
9480dba1c5
Add mt-bidi class to input fields for bi-directional languages.
2015-05-21 12:54:38 +01:00
Fabio Caccamo
1fc52f9918
add missed jquery browser plugin
2015-03-12 18:01:52 +01:00
Fabio Caccamo
4d1f5af129
add missed jquery browser plugin
2015-03-12 17:58:56 +01:00
Alex Marandon
352902556e
Update deprecated imports with Django >= 1.7
2014-11-14 15:14:55 +01:00
Dirk Eschler
bd0ea50c50
Set TabbedTranslationAdmin class depending on Django version. Added a new class for Django 1.5 which depends on older jquery/jquery-ui versions. Updated the jquery/jquery-ui versions for the existing admin classes (ref #270 ).
2014-10-29 17:01:33 +01:00
Jacek Tomaszewski
369293b14d
Get language getting from the field attribute rather than name.
...
The method seems to be not used anymore, but fix it nevertheless.
2014-10-24 20:23:10 +02:00
deschler
59317a4c12
Consistent use of django version check.
2014-07-28 00:03:50 +02:00
deschler
bc498f68d6
Removed superfluous do's from private api.
2014-07-27 23:53:30 +02:00
deschler
d488d8c488
Support AppConfig introduced by Django 1.7.
2014-06-09 23:19:35 +02:00
Jacek Tomaszewski
cbca220103
Capitalize group_fieldsets titles ( close #234 ).
2014-03-13 20:02:22 +01:00
Francesc Arpí Roca
ef6a8b2e81
Remove the http protocol. So we don't get warning about not secure elements
2014-01-22 17:23:02 +01:00
Jacek Tomaszewski
76da9bf92e
Some python3 compatibility fixes ( close #220 ).
2013-12-29 11:00:53 +01:00
Jacek Tomaszewski
6b0106f1a5
Fix admin inlines recursion problem in Django 1.6 (ref #214 ).
2013-11-15 21:25:13 +01:00
deschler
23d014e395
Merge branch 'ultimate-null-formfield-solution'
2013-11-07 23:20:55 +01:00
Bas Peschier
e88a8cd08b
Don't get too excited with the flake8-patching
2013-10-29 12:16:53 +01:00
Bas Peschier
d7ef747db4
Fix flake8 error
2013-10-29 12:15:11 +01:00
Bas Peschier
2379458f6d
Fix recursion problem with fieldset handling in Django 1.6
2013-10-29 11:33:37 +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
90baf37129
Don't display ClearableWidgetWrapper for required fields ( close #209 ).
2013-10-18 17:45:43 +02:00
Jacek Tomaszewski
656dca3e40
Show None checkboxes on form fields, especially admin ( close #187 ).
2013-10-10 23:05:26 +02:00
Jacek Tomaszewski
c7f0eee273
Don't import individual settings.
2013-10-10 16:47:56 +02:00
Jacek Tomaszewski
489e2db145
Merge remote branch.
...
Fix _patch_prepopulated_fields (close #190 , #181 ).
2013-10-10 16:45:39 +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
Konrad Wojas
b9d8359306
Added MODELTRANSLATION_PREPOPULATE_LANGUAGE setting to force prepopulated fields (slugs) to use a specific language as their source
2013-07-23 16:07:41 +08:00
Rafleze
23ca52ceef
Update admin.py
...
Improvements on _patch_prepopulated_fields
2013-07-08 21:22:58 +02:00
wrwrwr
027349bd9a
Set self to something in the replace_orig_field doctest, so PyFlakes doesn't complain.
2013-05-15 12:37:14 +02:00
wrwrwr
7cd60aa977
Added a small script unchecking the clear box after a wrapped input is edited.
...
Note: Starting global declaration, and the somewhat ugly jQuery call are for JSLint.
Also written a class comment for the widget wrapper and cleaned up some Flake8 errors.
2013-05-15 12:01:46 +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
e04073a7ec
Preserve default fields order in group_fieldsets.
2013-04-08 11:41:06 +02:00
Jacek Tomaszewski
b7ea1fac4c
Further work towards Python 3 support.
2013-04-08 11:41:06 +02:00
deschler
2d63001edd
Added convenience admin classes for easier inclusion of tabbed translation fields static files ( closes #171 ).
2013-04-05 02:14:59 +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
Dirk Eschler
1dcdc1ebfe
Simplified exclusion of translation fields in grouped_fieldsets (thanks to Wojtek Ruszczewski for poiting this out).
2013-02-26 10:49:33 +01:00
Dirk Eschler
9a6267838e
Added missing hook for get_readonly_fields. Potential fix for issue #140 .
2013-02-13 12:18:10 +01:00
Dirk Eschler
4ca3c103e5
Fixed prepopulated fields only work on the first defined field and made function aware of the current language. Added a unittest to verify. Resolves issue #57 .
2013-02-12 15:53:00 +01:00
Dirk Eschler
2ab73babe0
Small optimization, don't loop twice over trans_fields.
2013-02-12 12:33:33 +01:00
Dirk Eschler
6c66cec35e
Honoured options like exclude for translation fields and assured that we don't end up with empty fields in untranslated fieldsets.
2013-02-12 12:17:27 +01:00
Dirk Eschler
e6b05d1a7f
Sorted translation fields by fieldname.
2013-02-12 10:40:26 +01:00
Dirk Eschler
dbcff0d2df
Moved group_fieldsets to class.
2013-02-12 10:30:00 +01:00
deschler
9996ef39cd
Added a new group_fieldsets option to TranslationAdmin to group fieldsets by translation fields. An approach to issue #38 . Based on initial code by Chris Adams. Adopted and enhanced for the latest admin refactoring. The new option currently defaults to False and has to be activated on demand.
2013-02-11 22:29:58 +01:00
wrwrwr
772d51c1c3
Adapt admin to new translation options, allowing it to manage translation fields inherited from concrete supermodels.
...
``TranslationOptions.localized_fieldnames_rev`` is no longer available, but should be replaceable by field.translated_field (may be readded as a ``TranslationOptions`` method if it's useful for something).
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
Dirk Eschler
f38ab0ce6e
Minor cleanups.
2012-11-20 20:48:26 +01:00
Dirk Eschler
ee380ec7b7
Handled nested lists to display multiple fields on same line by flatting them.
2012-11-20 01:02:12 +01:00
Dirk Eschler
4dbbfee1ce
Validated against flake8.
2012-11-18 21:36:10 +01:00
sbrandtb
afb9f5436d
Fixed #111 : Refactored TranslationBaseModelAdmin._patch_prepopulated_fields(). It now calculates "exclude" the same way ModelAdmin.get_form() does, including get_readonly_fields().
2012-11-18 20:51:22 +01:00
Dirk Eschler
516d004837
Removed save_model override from admin which applied rule3.
2012-11-12 15:34:13 +01:00