Commit graph

444 commits

Author SHA1 Message Date
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
Jacek Tomaszewski
af672f3160 Merge pull request #275 from wrwrwr/fix/indonesian
Fix support for Indonesian language ('_id' language suffix).
2014-10-24 20:21:29 +02:00
Jacek Tomaszewski
04b67f66d7 Add __reduce__ to MultilingualQuerySet (ref #273). 2014-10-24 19:54:10 +02:00
wrwrwr
902a7c9a72 Fixed Indonesian translation field and ForeignKey field name clash.
The official ISO-639-1 code for Indonesia is "id"; replaced this
problematic suffix with the ISO-639-2 3-letter code in the translation
field names (http://en.wikipedia.org/wiki/Indonesian_language).
2014-10-24 13:05:10 +02:00
Jacek Tomaszewski
ef8e0b323f Ensure AVAILABLE_LANGUAGES is a list (close #272). 2014-10-24 09:24:35 +02:00
Dirk Eschler
553bfbefeb Prepared 0.8 release (ref #268). 2014-10-06 15:08:22 +02:00
wrwrwr
6026a91741 A more elegant solution suggested by zlorf. 2014-10-04 19:16:18 +02:00
wrwrwr
b06e49921b Fixed shadowing of jQuery referenced by a global `jQuery variable by django.jQuery`
in the tabbed admin script.

Javascript has a nasty semantic of moving initializers to the beginning of a block, thus
rewritting ``var a = a || b`` as ``var a; a = a || b``. With such a code, if ``a`` starts
as a global variable with some value, you could think that it would end up having the same
value, but it is actually first set to ``undefined`` at the beginning of the block and
then always set to ``b`` in the statement [1][2].

This is mostly of importance if you actually have more than one jQuery loaded.
For instance, this happens with Mezzanine -- first Grappelli-safe loads a copy, and calls
``$.noConflict`` thus storing its version as ``jQuery``, second is Django, loading another
copy and calling ``django.jQuery = jQuery.noConflict(true)``. So far so good, we have one
copy on ``jQuery`` and another on ``django.jQuery``; jQuery UI chooses to load itself onto
the ``jQuery`` (Grappelli) copy. But now runs the tabbed_translation_fields script, hiding
the jQuery with UI loaded at the very beggining of the first block, and a moment later
complaining that ``.tabs()`` or something else is not defined.

[1]: http://www.ecma-international.org/ecma-262/5.1/#sec-12.2 (note the first paragraph after the grammar)
[2]: http://stackoverflow.com/questions/500431/what-is-the-scope-of-variables-in-javascript (point 8)
2014-10-04 17:52:21 +02:00
Jacek Tomaszewski
8047a4dcda Add empty MIDDLEWARE_CLASSES to test settings in order to disable system check warning. 2014-09-07 21:43:58 +02:00
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
Jacek Tomaszewski
19c2a90e9f Add fallback to values and values_list (close #258). 2014-07-29 17:42:17 +03: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
89e372a743 Added list_editable test. 2014-07-27 22:28:45 +02:00
Dirk Eschler
ca453533e4 Prepared 0.8b2 release. 2014-07-18 10:57:55 +02:00
Jacek Tomaszewski
1f419ee5f4 Fix dict iteration Exception under Python3 (close #256). 2014-07-16 09:47:17 +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
5b2492cdc0 Fix reduce usage under Python3. 2014-07-10 09:43:49 +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
7a7b3fbc3b Rewrite field names in select_related; fix deffered models registry lookup (close #248). 2014-07-06 19:36:46 +02:00
Jacek Tomaszewski
58e06c464d Fix MultilingualManager MRO (close #204). 2014-07-06 14:39:53 +02:00
Jacek Tomaszewski
8e10664745 Support AppConfigs in INSTALLED_APPS (close #252).
Thanks Warnar Boekkooi for initial commit.
2014-06-24 20:10:47 +02:00
deschler
c607ed3862 Prepared 0.8b1 release. 2014-06-22 13:43:07 +02:00
Jacek Tomaszewski
41f8c68ed4 Update docs; fix type coercion. 2014-06-21 23:36:01 +02:00
Jacek Tomaszewski
ad2985b0bf Update docs about 1.7 compatibility and bumb the version to 0.8a (close #237). 2014-06-09 23:40:25 +02:00
Jacek Tomaszewski
973bb78bda Fix Django 1.7 DeprecationWarnings. 2014-06-09 23:32:22 +02:00
Jacek Tomaszewski
7b5e0938a7 Adapt MultilingualManager to use new Lookups from Django 1.7. 2014-06-09 23:32:22 +02:00
Jacek Tomaszewski
2cd9467716 Fix ProxyModel handling. 2014-06-09 23:32:22 +02:00
Jacek Tomaszewski
ad48582270 Fix tests to work with Django 1.7. 2014-06-09 23:32:21 +02:00
Jacek Tomaszewski
6b8c429921 Add deconstruct() to field definition. 2014-06-09 23:19:54 +02:00
deschler
d488d8c488 Support AppConfig introduced by Django 1.7. 2014-06-09 23:19:35 +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
Thom Wiggers
f161a335e9 Fixed get_query_set in super() call
Use `getattr` to check if `get_queryset` is supported
2014-05-18 23:22:53 +02:00
Thom Wiggers
f34b26684c Move to get_queryset
get_query_set is deprecated and raises a RemovedInDjango18 warning
2014-05-18 21:37:22 +02:00
Jacek Tomaszewski
f6087cf3fa Detect custom get_queryset on managers (ref #242). 2014-05-12 17:41:07 +02:00
Jacek Tomaszewski
5ed3a2696b Don't set use_for_related_fields unconditionally on all managers (ref #242). 2014-05-06 21:59:21 +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
Dirk Eschler
f0bded8e4c Merge pull request #235 from yalovek/patch-1
remove bad style
2014-04-14 23:45:20 +02:00
Jacek Tomaszewski
1d7e0876ec Satisfy new flake8 version. 2014-03-27 00:39:41 +01:00
Jacek Tomaszewski
52f94cc588 Repair tests: don't use absolute pk values. 2014-03-22 10:32:07 +01:00
Jacek Tomaszewski
88a89b3a5e Fix values_list without fields; refactor tests (ref #263). 2014-03-22 10:25:41 +01:00
Jacek Tomaszewski
cc6a13ddee Fix test: there already was a method called test_values.... (ref #263). 2014-03-22 00:27:08 +01:00
Jacek Tomaszewski
ae8a331893 Fix .values() with no fields specified (close #236). 2014-03-22 00:12:34 +01:00
Jacek Tomaszewski
709c993c07 Fix new code to be Python 3 compatible. 2014-03-18 20:31:21 +01:00