Commit Graph

8120 Commits

Author SHA1 Message Date
Claude Paroz 07ffe78143 Used get_current_site in comments feed class 2012-09-28 14:35:26 +02:00
Julien Phalip b8244c654c Fixed #18881 -- Made the context option in {% trans %} and {% blocktrans %} accept literals wrapped in single quotes. Thanks to lanyjie for the report. 2012-09-27 20:34:45 -07:00
Carl Meyer 751a7d0c32 Fixed #18518 -- Add warning re mod_wsgi and wsgi.py environ handling. 2012-09-27 20:35:57 -06:00
Preston Holmes 373932fa6b fixed #10809 -- add a mod_wsgi authentication handler
Thanks to baumer1122 for the suggestion and initial 
patch and David Fischer for the contributions and
long term patch maintenance and docs.
2012-09-27 12:43:37 -07:00
Preston Holmes 01362745ba Fixed a small oversight in auth tests
Thanks to Vinicius Ruan Cainelli for the catch
closes #392
2012-09-27 10:24:34 -07:00
Florian Apolloner b946db5241 Fixed #15695 -- Added `ResolverMatch` to the request object. 2012-09-27 15:06:58 +02:00
Anssi Kääriäinen 50d573d2c0 Fixed #18979 -- Avoid endless loop caused by "val in PermLookupDict"
Fixed by defining __iter__ which raises TypeError. This was done to
PermWrapper earlier.
2012-09-27 15:36:30 +03:00
Claude Paroz 3cbe686af6 Fixed #18675 -- Fixed was_modified_since with floating-point mtime
Thanks Simon Charette for the patch.
2012-09-26 21:12:56 +02:00
Claude Paroz b3ee80a0cf Fixed parse_http_date docstring and moved related tests
Refs #18675.
2012-09-26 21:10:17 +02:00
Claude Paroz bb7da7844f Fixed #18845 -- Do not swallow AttributeErrors when running commands 2012-09-26 15:07:11 +02:00
Adrien Lemaire 2c8267bf3d Fixed #17899 -- Rewrote [Ee]-mail to [Ee]mail 2012-09-26 14:14:51 +02:00
Russell Keith-Magee 70a0de37d1 Fixed #3011 -- Added swappable auth.User models.
Thanks to the many people that contributed to the development and review of
this patch, including (but not limited to) Jacob Kaplan-Moss, Anssi
Kääriäinen, Ramiro Morales, Preston Holmes, Josh Ourisman, Thomas Sutton,
and Roger Barnes, as well as the many, many people who have contributed to
the design discussion around this ticket over many years.

Squashed commit of the following:

commit d84749a0f0
Merge: 531e771 7c11b1a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Wed Sep 26 18:37:04 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit 531e7715da
Merge: 29d1abb 1f84b04
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Wed Sep 26 07:09:23 2012 +0800

    Merged recent trunk changes.

commit 29d1abbe35
Merge: 8a527dd 54c81a1
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Sep 24 07:49:46 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit 8a527dda13
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Sep 24 07:48:05 2012 +0800

    Ensure sequences are reset correctly in the presence of swapped models.

commit e2b6e22f29
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 23 17:53:05 2012 +0800

    Modifications to the handling and docs for auth forms.

commit 98aba856b5
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 23 15:28:57 2012 +0800

    Improved error handling and docs for get_user_model()

commit 0229209c84
Merge: 6494bf9 8599f64
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 23 14:50:11 2012 +0800

    Merged recent Django trunk changes.

commit 6494bf91f2
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Sep 17 21:38:44 2012 +0800

    Improved validation of swappable model settings.

commit 5a04cde342
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Sep 17 07:15:14 2012 +0800

    Removed some unused imports.

commit ffd535e413
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 20:31:28 2012 +0800

    Corrected attribute access on for get_by_natural_key

commit 913e1ac84c
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 20:12:34 2012 +0800

    Added test for proxy model safeguards on swappable models.

commit 280bf19e94
Merge: dbb3900 935a863
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 18:16:49 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit dbb3900775
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 18:09:27 2012 +0800

    Fixes for Python 3 compatibility.

commit dfd72131d8
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 15:54:30 2012 +0800

    Added protection against proxying swapped models.

commit abcb027190
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 15:11:10 2012 +0800

    Cleanup and documentation of AbstractUser base class.

commit a9491a8776
Merge: fd8bb4e 08bcb4a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 14:46:49 2012 +0800

    Merge commit '08bcb4aec1ed154cefc631b8510ee13e9af0c19d' into t3011

commit fd8bb4e3e4
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 14:20:14 2012 +0800

    Documentation improvements coming from community review.

commit b550a6d06d
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 13:52:47 2012 +0800

    Refactored skipIfCustomUser into the contrib.auth tests.

commit 52a02f1110
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 13:46:10 2012 +0800

    Refactored common 'get' pattern into manager method.

commit b441a6bbc7
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 16 13:41:33 2012 +0800

    Added note about backwards incompatible change to admin login messages.

commit 08bcb4aec1
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Sep 15 18:30:33 2012 +0300

    Splitted User to AbstractUser and User

commit d9f5e5addb
Author: Anssi Kääriäinen <akaariai@gmail.com>
Date:   Sat Sep 15 18:30:02 2012 +0300

    Reworked REQUIRED_FIELDS + create_user() interaction

commit 579f152e4a
Merge: 9184972 93e6733
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 15 20:18:37 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit 918497218c
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 15 20:18:19 2012 +0800

    Deprecate AUTH_PROFILE_MODULE and get_profile().

commit 334cdfc1bb
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 15 20:00:12 2012 +0800

    Added release notes for new swappable User feature.

commit 5d7bb22e8d
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 15 19:59:49 2012 +0800

    Ensure swapped models can't be queried.

commit 57ac6e3d32
Merge: f2ec915 abfba3b
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 15 14:31:54 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit f2ec915b20
Merge: 1952656 5e99a3d
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 9 08:29:51 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit 19526563b5
Merge: 2c5e833 c4aa26a
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 9 08:22:26 2012 +0800

    Merge recent changes from master.

commit 2c5e833a30
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 9 07:53:46 2012 +0800

    Corrected admin_views tests following removal of the email fallback on admin logins.

commit 20d1892491
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sun Sep 9 01:00:37 2012 +0800

    Added conditional skips for all tests dependent on the default User model

commit 40ea8b8882
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 8 23:47:02 2012 +0800

    Added documentation for REQUIRED_FIELDS in custom auth.

commit e6aaf65970
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Sat Sep 8 23:20:02 2012 +0800

    Added first draft of custom User docs.

    Thanks to Greg Turner for the initial text.

commit 75118bd242
Author: Thomas Sutton <me@thomas-sutton.id.au>
Date:   Mon Aug 20 11:17:26 2012 +0800

    Admin app should not allow username discovery

    The admin app login form should not allow users to discover the username
    associated with an email address.

commit d088b3af58
Author: Thomas Sutton <me@thomas-sutton.id.au>
Date:   Mon Aug 20 10:32:13 2012 +0800

    Admin app login form should use swapped user model

commit 7e82e83d67
Merge: e29c010 39aa890
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Fri Sep 7 23:45:03 2012 +0800

    Merged master changes.

commit e29c010beb
Merge: 8e3fd70 30bdf22
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Aug 20 13:12:57 2012 +0800

    Merge remote-tracking branch 'django/master' into t3011

commit 8e3fd703d0
Merge: 507bb50 26e0ba0
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Aug 20 13:09:09 2012 +0800

    Merged recent changes from trunk.

commit 507bb50a92
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Jun 4 20:41:37 2012 +0800

    Modified auth app so that login with alternate auth app is possible.

commit dabe362836
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Jun 4 20:10:51 2012 +0800

    Modified auth management commands to handle custom user definitions.

commit 7cc0baf89d
Author: Russell Keith-Magee <russell@keith-magee.com>
Date:   Mon Jun 4 14:17:28 2012 +0800

    Added model Meta option for swappable models, and made auth.User a swappable model
2012-09-26 18:48:09 +08:00
Claude Paroz 1f84b042f1 Fixed #19020 -- Do not depend on dict order in formtools tests
Thanks metzen for the report and initial patch, and Łukasz Rekucki
for an inspirational patch on his randomhash_fixes branch.
2012-09-25 18:41:57 +02:00
Ramiro Morales f51eab796d Fixed #18072 -- Made more admin links use reverse() instead of hard-coded relative URLs.
Thanks kmike for the report and initial patch for the changelist->edit
object view link URL.

Other affected links include the delete object one and object history
one (in this case the change had been implemented in commit 5a9e127, this
commit adds admin-quoting of the object PK in a way similar to a222d6e.)

Refs #15294.
2012-09-24 22:02:59 -03:00
Claude Paroz fc69fff9ab Fixed #14861 -- Moved logging config outside of Settings.__init__
Thanks donspaulding for the report and simonpercivall for the
initial patch.
2012-09-24 22:12:45 +02:00
Claude Paroz 6eda8d784a Enlarged exception catching when testing for GDAL presence
Other import errors than ImportError can happen during import of
GDAL files (e.g. OGRException). Some further auditing may be needed
if we want to restrict the catched exceptions at a later stage.
Thanks Ramiro Morales for raising the issue.
2012-09-24 16:06:04 +02:00
Claude Paroz 54c81a1c93 [py3] Allowed bytes in get_prep_value for a Geometry 2012-09-23 22:49:22 +02:00
Claude Paroz 43c7f8c3a3 [py3] Fixed unicode string in geoapp test 2012-09-23 22:11:46 +02:00
Claude Paroz 874908e3bb [py3] Updated PostGIS adapter 2012-09-23 20:32:52 +02:00
Claude Paroz 799786a7b6 [py3] Fixed outdated map() call in GIS sql compiler 2012-09-23 20:32:52 +02:00
Claude Paroz 5330cd50cd [py3] Fixed GEOS/GDAL tests 2012-09-23 19:59:27 +02:00
Claude Paroz 8cdc84726e [py3] Added buffer/memoryview compatibility
Even if buffer and memoryview are not strictly identical, it should
be safe to consider them equivalent for GIS support.
Thanks Aymeric Augustin for the review.
2012-09-23 19:55:53 +02:00
Aymeric Augustin 3174b5f2f5 Fixed #18982 - Caught TypeError in DateField.clean
Thanks gwahl at fusionbox com.
2012-09-23 13:27:01 +02:00
Claude Paroz 8599f64e54 Fixed #18861 -- Triggered message validation with locmem email backend
Thanks Bruno Renié for the report and the initial patch.
2012-09-22 15:17:13 +02:00
Brian Galey 0ab8c58ca8 Fixed #18968 -- Only use separate GML regex for SpatiaLite < 3.0 2012-09-22 15:10:42 +02:00
Aymeric Augustin 822cfce3df Fixed #18951 -- Formatting of microseconds.
Thanks olofom at gmail com for the report.
2012-09-22 12:02:21 +02:00
Aymeric Augustin baa33cd8fa Fixed #16218 -- date_list order in generic CBVs.
Thanks nnrcschmdt for the report and bpeschier for the initial
version of the patch.
2012-09-22 11:47:34 +02:00
Claude Paroz 59afc18f37 Made geo3d tests independent from each other 2012-09-22 11:39:53 +02:00
Dan Loewenherz 69ff1b7390 Fixed #16835 -- add groups to auth.user admin list_filter 2012-09-22 00:16:22 -07:00
Claude Paroz 486e67598f Fixed #10853 -- Skipped some sessions tests with dummy cache backend 2012-09-21 13:17:25 +02:00
Claude Paroz 26ff2be787 Imported getLogger directly from logging module
This was a remainder of some 2.4 compatibility code.
2012-09-20 21:03:24 +02:00
Claude Paroz 89136b2725 Fixed #16577 -- Added a map_creation block in openlayers.js template 2012-09-20 10:31:37 +02:00
Claude Paroz 7e32dab3a6 Fixed #17687 -- Made LayerMapping router-aware
Thanks nosamanuel@gmail.com for the report and the initial patch.
2012-09-20 10:12:47 +02:00
Carl Meyer 4e9a74b81d Revert "Fixed #16865 -- Made get_or_create use read database for initial get query."
Thanks to Jeremy Dunck for pointing out the problem with this change. If in a
single transaction, the master deletes a record and then get_or_creates a
similar record, under the new behavior the get_or_create would find the record
in the slave db and fail to re-create it, leaving the record nonexistent, which
violates the contract of get_or_create that the record should always exist
afterwards. We need to do everything against the master here in order to ensure
correctness.

This reverts commit 901af86550.
2012-09-19 11:15:12 -06:00
Carl Meyer 901af86550 Fixed #16865 -- Made get_or_create use read database for initial get query.
Thanks Rick van Hattem for the report and trbs for the patch.
2012-09-19 10:06:53 -06:00
Dave Hall 44767f2caf Use unicode.translate to speed up js escaping. 2012-09-18 21:15:15 +02:00
Jeremy Dunck 40e62a5ccd Fixed #18980 -- Fixed assertContains regression when passed an object 2012-09-18 21:05:41 +02:00
Florian Apolloner 319e135519 Fixed #18800 -- Support numbers bigger than max float in `numberformat`.
Thanks to jbvsmo for the patch and Brad Pitcher for the tests.
2012-09-18 19:43:50 +02:00
Florian Apolloner 23d0136314 Merge branch 'lotheac-fix_uploaded_file_exec' 2012-09-17 22:54:26 +02:00
Florian Apolloner e8c6aff3bf Fixed #18947 -- Don't make uploaded files executeable by default.
Thanks to Lauri Tirkkonen for the patch.
2012-09-17 22:53:10 +02:00
Florian Apolloner 06f79354d0 Added tests for d21f3d9b17. 2012-09-17 21:56:19 +02:00
Florian Apolloner d21f3d9b17 Only update `last_login` instead of the whole user object in `update_last_login`. 2012-09-17 19:52:22 +02:00
Anssi Kääriäinen f399a804c9 Fixed #17485 regression -- only + select_related interaction
When doing deeper than one level select_related() + only queries(), the
code introduced in b6c356b7bb errored
incorrectly.

Thanks to mrmachine for report & test case.
2012-09-16 22:58:40 +03:00
Julien Phalip c555741aa7 Fixed #18530 -- Fixed a small regression in the admin filters where wrongly formatted dates passed as url parameters caused an unhandled ValidationError. Thanks to david for the report. 2012-09-15 16:20:56 -07:00
Claude Paroz c7f44ae085 Fixed #17948 -- Isolated auth tests from custom template loaders
Thanks andrey@kostenko.name for the report.
2012-09-15 21:39:08 +02:00
Claude Paroz 65793d714c Used ST_AsText for testing PostGIS raw query
AsText will not be supported in further versions of PostGIS (>=2).
2012-09-15 12:02:28 +02:00
Tim Graham 87c06fa4f4 Merge pull request #364 from martey/ticket_18933
Fixed #18933 - Fixes code example for cycle in docstring.
2012-09-13 12:23:28 -07:00
Claude Paroz 690170a8b9 Removed unused quoting/encoding in gis db backend 2012-09-13 20:17:52 +02:00
Claude Paroz 7e5ebcce53 Fixed #18795 -- Fixed failing GeoDjango tests
Proj.4 and SRS strings may slightly vary depending on the installed
libraries. Made some tests pass again with recent Proj.4/GDAL lib
versions.
2012-09-13 16:20:11 +02:00
Claude Paroz fbd4b3a518 [py3] Fixed GeoDjango mutable list tests 2012-09-12 16:13:58 +02:00
Claude Paroz c2c8d4044e Made minimal changes to make gis test suite start with Python 3 2012-09-12 15:03:46 +02:00
Claude Paroz 1aa218b857 Fixed test output check when password is blank 2012-09-12 11:58:02 +02:00
Claude Paroz 703c266682 Fixed #18182 -- Made is_usable_password check if hashing algorithm is correct
The display of the ReadOnlyPasswordHashWidget has also been improved to
distinguish empty/unusable password from erroneous password.
Fixed #18453 also.
Thanks danielr and Leo for the reports and Moritz Sichert for the
initial patch.
2012-09-12 11:32:50 +02:00
Claude Paroz 859aa2a6c4 Fixed #18790 -- Encoded database password on Python 2
Thanks thcourbon@gmail.com for the report.
2012-09-12 10:16:49 +02:00
Claude Paroz f1bdfbd24b Document and test 'type' usage in Widget attrs
Refs #16630.
2012-09-10 19:31:11 +02:00
Collin Anderson f416ea9c8d fixed rfc comment typo in middleware/csrf.py 2012-09-10 12:11:24 -03:00
Mike Grouchy cb1614f7b3 Fixed #18611 -- Display current date/time when running runserver 2012-09-10 13:35:21 +02:00
Carl Meyer fcec904e4f Fix an HTML-parser test that's failed in Python 2.6.8 since 5c79dd58.
The problem description in #18239 asserted that
http://bugs.python.org/issue670664 was fixed in Python 2.6.8, but based on
http://bugs.python.org/issue670664#msg146770 it appears that's not correct; the
fix was only applied in 2.7, 3.2, and Python trunk. Therefore we must use our
patched HTMLParser subclass in all Python 2.6 versions.
2012-09-09 12:13:42 -06:00
Carl Meyer 75ef980e20 Fix Python 3 test failure introduced in a78dd109. 2012-09-09 11:37:21 -06:00
Florian Apolloner 9ca17f883d Replace nested try/finally try/except with try/except/finally. 2012-09-09 13:00:10 +02:00
Martey Dodoo 3fb2662edc Fixes #18933. Fixes code example in docstring.
Makes code example of silent keyword docstring in cycle templatetag
method the same as in the documentation.
2012-09-09 00:35:40 -04:00
Malcolm Tredinnick 5e99a3d41b Adjust d7853c5 to not show ignorable warnings when running tests. 2012-09-08 20:28:31 -04:00
Malcolm Tredinnick c4aa26a983 Internal refactoring; moving LOOKUP_SEP up one level.
In an ideal world, nothing except django.db.models.query should have to
import stuff from django.models.sql.*. A few things were needing to get
hold of sql.constants.LOOKUP_SEP, so this commit moves it up to
django.db.models.constants.LOOKUP_SEP.

There are still a couple of places (admin) poking into sql.* to get
QUERY_TERMS, which is unfortunate, but a slightly different issue and
harder to adjust.
2012-09-08 19:51:36 -04:00
Carl Meyer a78dd109e6 Fixed #15552 -- LOGIN_URL and LOGIN_REDIRECT_URL can take URLpattern names.
Thanks UloPe and Eric Florenzano for the patch, and Malcolm Tredinnick for
review.
2012-09-08 16:58:35 -06:00
Carl Meyer 67dceeef44 Remove a couple unused imports. 2012-09-08 14:30:11 -06:00
Carl Meyer 307706d082 Fixed #18545 -- Make the 'no DJANGO_SETTINGS_MODULE' error message more useful.Thanks Nick Coghlan for the report, and Malcolm Tredinnick for review. 2012-09-08 14:26:33 -06:00
Claude Paroz d7853c55ed Removed warning check in test_load_overlong_key
Some backends issue a warning here, others not. This is not the primary
goal of the test, so the assertion about the warning has been removed.
Thanks Carl Meyer for noticing the issue and suggesting the fix.
2012-09-08 21:31:46 +02:00
Travis Swicegood 4754f122dd Moved the admin inline JS to new JS files for cleanliness. 2012-09-08 15:09:37 -04:00
Aymeric Augustin 7207327dd3 Updated docs for dates generic views.
Fixes #18245. Refs #3542.
2012-09-08 12:22:39 -04:00
Preston Holmes 3da43c1111 Fixed #18054 -- Deprecated contrib.markup. Thanks to simukis for the initial patch. 2012-09-08 12:13:46 -04:00
Travis Swicegood ccd1bb0d81 Remove Admin's swallowing of AttributeError (#16655, #18593, #18747)
During the new-admin changes, catching of AttributeError was added to
the admin.  This patch removes that as it's no longer possible to add a
value to a ModelAdmin that is not available.  Adding an attribute that
can not be called causes an ImproperlyConfigured exception to be raised.
2012-09-08 11:20:05 -04:00
Claude Paroz 09a99714c0 Moved get_primary_key_column implementation to base
Refs #17574.
2012-09-08 10:24:13 +02:00
Aymeric Augustin 4e1fd38bd6 Fixed #18781 -- Reduced max session cookie size. 2012-09-07 19:24:02 -04:00
Aymeric Augustin 9b07b5edeb Fixed #18916 -- Allowed non-ASCII headers.
Thanks Malcolm Tredinnick for the review.
2012-09-07 19:08:57 -04:00
Alex Gaynor b865009d41 Fixed #12397 -- allow safe_join to work with the root file system path, which means you can have your root template or file upload path at this location. You almost certainly don't want to do this, except in *very* limited sandboxed situations. 2012-09-07 16:49:22 -04:00
Alex Gaynor ad50243cd1 [py3k] Fixed the index creation code that I committed a few minutes ago for py3k. 2012-09-07 15:33:02 -04:00
Alex Gaynor 335a9f9cf1 Removed many uses of bare "except:", which were either going to a) silence real issues, or b) were impossible to hit. 2012-09-07 15:08:07 -04:00
Alex Gaynor 6a5a12ea3e Fixed #17888 -- no longer silence exceptions inside of check_test. Thanks to brutasse for the patch. 2012-09-07 14:37:21 -04:00
Alex Gaynor e4ea536774 Ensued that SQL indexes are alwasy created in the same name.
Previous this used Python's builtin hash() function, which has never been guarnteed to be stable across implementations (CPython/Jython/etc.) or 32/64 bitness. However, this in practice it was stable. However, with the impending release of Python 3.3 hash randomizations is enabled by default, which would mean the index name changed between program invocations.
2012-09-07 14:14:06 -04:00
Alex Gaynor 292322f977 [py3k] Silence many warnings while running the tests. 2012-09-07 13:17:34 -04:00
Alex Gaynor 0e296131bb Cleaned up some small bits of the ORM, including removing an import *. 2012-09-07 10:58:17 -04:00
Claude Paroz 39aa8901e1 Made use of property decorator in formsets.py 2012-09-06 23:08:15 +02:00
Adrian Holovaty 4193a0f3d5 Negligible spacing fix in auth/forms.py 2012-09-04 16:47:45 -04:00
Claude Paroz 22f85b9057 Fixed #18824 -- Allow deleting a setting from overriden settings 2012-09-04 09:41:12 +02:00
Claude Paroz cc9b767fc6 Fixed #18902 -- Made force_bytes properly handle exception input
Thanks Aymeric Augustin for the report and the initial patch.
2012-09-04 09:27:28 +02:00
Claude Paroz 28fd876bae Fixed #17892 -- Do not include whole RegexURLPattern lists in RegexURLResolver repr
Thanks milosu for the report and the initial patch.
2012-09-01 22:20:46 +02:00
Claude Paroz 306d34873c Fixed #18212 -- Standardized arguments of GenericIPAddressField
Unlike other model fields, the newly introduced (1.4)
GenericIPAddressField did not accept verbose_name and name as the
first positional arguments. This commit fixes it.
Thanks Dan McGee for the report and the patch.
2012-09-01 18:38:55 +02:00
Tim Graham f7142b6111 Fixed #9920 - Clarfied empty string vs. localhost in settings database host.
Thanks chromano for the draft patch.
2012-09-01 09:03:05 -04:00
Florian Apolloner d05eee0119 Merge pull request #313 from davidfischer/master
Fix comment typo
2012-08-31 03:03:43 -07:00
Claude Paroz a9a773ff38 Made get_table_description also return the size of char fields on SQLite 2012-08-30 19:36:05 +02:00
Claude Paroz 879b245baa Fixed #5725 -- Fixed varchar column size introspection for MySQL
Thanks ferdonline for the initial patch and Karen Tracey for the
related post on django-users.
2012-08-30 19:28:13 +02:00
Claude Paroz fb3d916c20 Fixed #18751 -- Cleaned up BaseFormSet._should_delete_form
We can do that now that cleaned_data is guaranteed to be
present. Related to [121fd109].
Thanks Simon Charette for his work on the ticket.
2012-08-30 15:51:13 +02:00
Claude Paroz ae88e73fa6 Replaced some smart_xxx by force_xxx equivalent
smart_str/smart_text should only be used when a potential lazy
string should be preserved in the result of the function call.
2012-08-30 15:46:16 +02:00
David Fischer 06b1dedae5 Fixed comment typo 2012-08-29 17:09:47 -07:00
Aymeric Augustin 723c9a8c6d [py3] Ported the 'shell' management command.
The user module and the execfile function were removed in Python 3.

Thanks Linovia for the report.
2012-08-29 23:44:12 +02:00
Claude Paroz 4e70ad11d2 Made FileSystemStorage accept both text and byte streams
Thanks Alexey Boriskin for his help on the patch.
2012-08-29 16:37:37 +02:00
Claude Paroz 361d6738f8 Fixed #11739 -- Made ContentFile support Unicode input 2012-08-29 11:21:33 +02:00
Claude Paroz ebc773ada3 Replaced many smart_bytes by force_bytes
In all those occurrences, we didn't care about preserving the
lazy status of the strings, but we really wanted to obtain a
real bytestring.
2012-08-29 11:20:32 +02:00
Florian Apolloner 3afb5916b2 Fixed #18091 -- Non-ASCII templates break `django-admin.py startproject --template=TEMPLATE`.
Thanks to Claude Huchet and Tomáš Ehrlich for the patch.
2012-08-28 23:23:07 +02:00
Aymeric Augustin 20012b961e [py3] Updated bundled version of six 2012-08-28 23:20:55 +02:00
Mitar b2ffa2ea90 Code comment fix. 2012-08-26 14:28:44 -07:00
Ramiro Morales 5a9e127efc Made model instance history admin view link not hard-coded. Refs #15294. 2012-08-26 17:54:49 -03:00
Aymeric Augustin 28ea4d4b07 Fixed #18852 -- Restored backwards compatibility
in django.core.signing. Specifically, kept the same return types
(str/unicode) under Python 2. Related to [92b2dec918].
2012-08-25 22:22:32 +02:00
Claude Paroz 62e1c5a441 Fixed #17448 -- Improved test and documented raw-sql gis query 2012-08-25 14:39:52 +02:00
Anssi Kääriäinen 01b9c3d519 Fixed #16715 -- Fixed join promotion logic for nested nullable FKs
The joins for nested nullable foreign keys were often created as INNER
when they should have been OUTER joins. The reason was that only the
first join in the chain was promoted correctly. There were also issues
with select_related etc.

The basic structure for this problem was:
  A -[nullable]-> B -[nonnull]-> C

And the basic problem was that the A->B join was correctly LOUTER,
the B->C join not.

The major change taken in this patch is that now if we promote a join
A->B, we will automatically promote joins B->X for all X in the query.
Also, we now make sure there aren't ever join chains like:
   a LOUTER b INNER c
If the a -> b needs to be LOUTER, then the INNER at the end of the
chain will cancel the LOUTER join and we have a broken query.

Sebastian reported this problem and did also major portions of the
patch.
2012-08-25 14:14:45 +03:00
Claude Paroz d7a2e816a1 Added a GeoDjango test with a raw query (Refs #17448)
Thanks David Eklund for the initial patch.
2012-08-25 11:12:43 +02:00
Alex Gaynor b7c3b044fc Cleaned up the implementation of in_bulk 2012-08-24 16:08:16 -07:00
Claude Paroz f5ea730dac Fixed #18843 -- Replaced more special chars in column names (inspectdb)
Thanks airstrike for the report.
2012-08-23 22:59:45 +02:00
Claude Paroz 395c6083af Fixed #12460 -- Improved inspectdb handling of special field names
Thanks mihail lukin for the report and elijahr and kgibula for their
work on the patch.
2012-08-23 21:46:57 +02:00
Claude Paroz 44c09de555 Fixed #18678 -- HttpResponse init arguments allowed for subclasses
Thanks hp1337@gmail.com for the report.
2012-08-23 10:59:22 +02:00
Aymeric Augustin 03671ad7e3 Reordered imports
to avoid an error introduced in 5301a9d7b1.
2012-08-23 10:24:50 +02:00
Aymeric Augustin 5301a9d7b1 [py3] Removed duplicate imports.
Fixed #18837. Refs #18791.
2012-08-23 10:16:16 +02:00
Claude Paroz 7cfe8e8fce Fixed #11340 -- Prevented HttpResponseNotModified to have content/content-type
The HTTP 1.1 spec tells that the 304 response MUST NOT contain a
message body.
Thanks aparajita for the report.
2012-08-22 20:55:24 +02:00
Claude Paroz e2b4eddc11 Used the decorator syntax for properties in django.http 2012-08-22 20:55:24 +02:00
Simon Meers dfe63a52ef Revert "Fixed #18063 -- Avoid unicode in Model.__repr__ in python 2"
This reverts commit 3fce0d2a91.
2012-08-22 11:48:47 +10:00
Claude Paroz 4353a6163c Fixed #18196 -- Improved loaddata error messages. 2012-08-21 21:52:25 +02:00
Anssi Kääriäinen a193372753 Fixed #17886 -- Fixed join promotion in ORed nullable queries
The ORM generated a query with INNER JOIN instead of LEFT OUTER JOIN
in a somewhat complicated case. The main issue was that there was a
chain of nullable FK -> non-nullble FK, and the join promotion logic
didn't see the need to promote the non-nullable FK even if the
previous nullable FK was already promoted to LOUTER JOIN. This resulted
in a query like a LOUTER b INNER c, which incorrectly prunes results.
2012-08-21 21:23:57 +03:00
Claude Paroz fd58d6c258 Merge walk and find_files in makemessages command 2012-08-21 14:43:37 +02:00
Claude Paroz ab2f65bb7f Removed obsolete __members__ definitions
This was useful for pre-Python 2.6 support. See commit c6e8e5d9.
2012-08-21 11:20:22 +02:00
Aymeric Augustin e89bc39935 Reverted type check added in 62954ba04c.
Refs #17040.
2012-08-21 09:00:55 +02:00
Aymeric Augustin 62954ba04c [py3] Fixed #17040 -- ported django.utils.crypto.constant_time_compare.
This is a private API; adding a type check is acceptable.
2012-08-20 22:50:49 +02:00
Aymeric Augustin 54899d810d [py3] Fixed #18805 -- ported createsuperuser.
Thanks sunsesh at gmail.com for the report.
2012-08-20 22:25:41 +02:00
Claude Paroz bfc380baea [py3] Prepared MySQL backend for Python 3 compatibility 2012-08-20 10:46:21 +02:00
Simon Meers 3fce0d2a91 Fixed #18063 -- Avoid unicode in Model.__repr__ in python 2
Thanks guettli and mrmachine.
2012-08-20 16:47:30 +10:00
Anssi Kääriäinen 4db38cbfe1 [py3] Fixed Oracle specific failures 2012-08-19 23:45:26 +03:00
Aymeric Augustin 2f59e94a41 Fixed #18728 -- Made colon optional in tzinfo
Made two-digit hours and minutes mandatory in tzinfo (the code used
to crash if a one-digit representation was provided).

Added standalone tests for django.utils.dateparse.
2012-08-19 21:47:41 +02:00
Aymeric Augustin a43ecc0444 Removed an inaccurate statement
in docstrings of dateparse functions.
2012-08-19 21:25:41 +02:00
Aymeric Augustin 5f2d9cdbb1 [py3] Fixed another regression from 2892cb0ec4. 2012-08-19 18:24:50 +02:00
Aymeric Augustin 2892cb0ec4 [py3] Fixed regression introduced in 536b030363.
Refs #18764.

Reverted 536b030363 and switched to a more explicit way of avoiding
calling bytes(<int>).

This definitely deserves a refactoring. Specifically, _get_content
should just return b''.join(self). Unfortunately that's impossible
with the current tests.
2012-08-19 17:56:46 +02:00
Aymeric Augustin 536b030363 [py3] Supported integers in HttpResponse
Fixed #18764.
2012-08-19 16:38:21 +02:00
Julien Phalip 675431dfaa Fixed #17278 -- Enabled the spatialite GIS tests to run without having to specify a database name in the settings. Thanks to Aymeric for the report and to Ramiro for the initial patch. 2012-08-19 02:17:45 -07:00
Karen Tracey e99293250e [py3] Fixed slow path through file_move_safe
This path is taken on Windows.
2012-08-18 15:44:09 -04:00
Andrew Godwin 1758bf76e4 Merge pull request #287 from uruz/ticket18791
Fixed #18791: [py3] Double import of six in django.forms.widgets
2012-08-18 09:45:16 -07:00
Andrew Godwin bf12c663d9 Merge pull request #289 from mjtamlyn/slugify-real-function
Fixed bug in 212b982 -- Removed duplicate code in removetags
2012-08-18 09:41:06 -07:00
Andrew Godwin 5b09fc8ad2 Merge pull request #288 from mjtamlyn/date-list-period
Fixed #3542 -- Add support for changing granularity on ArchiveView.
2012-08-18 09:10:52 -07:00
Marc Tamlyn e4984812cd Fixed bug in 212b982 -- Removed duplicate code in removetags 2012-08-18 17:09:37 +01:00
Marc Tamlyn 8d5c11caad Fixed #3542 -- Add support for changing granularity on ArchiveView.
Resolving the concept from a very old ticket in a more class-based-view
manner.
2012-08-18 17:03:57 +01:00
Aymeric Augustin afc1bd7ab8 [py3] Made 212b9826bd Python 3-friendly 2012-08-18 17:51:16 +02:00
Alexey Boriskin abc4038b0b Fixed #18791: [py3] Double import of six in django.forms.widgets 2012-08-18 19:17:42 +04:00
Aymeric Augustin de3ad8bb2d [py3] Avoided passing a lazy string to urlparse.
This causes an exception under Python 3.

Fixed #18776.
2012-08-18 16:38:49 +02:00
Aymeric Augustin a120fac65a Introduced force_bytes and force_str.
This is consistent with the smart_* series of functions and it's going
to be used by the next commit.
2012-08-18 16:38:49 +02:00
Marc Tamlyn f04bb6d798 Fixed #17228 -- params context variable is inconsistent
Remove the params variable from the context and just put the variables
in directly.

This had not been committed previously as the original pattern was used
in the functional generic views and we wanted consistency between them,
but django.views.generic.simple.direct_to_template is now gone so we can
do it 'right'.
2012-08-18 15:07:21 +01:00
Marc Tamlyn 212b9826bd Fixed #14516 -- Extract methods from removetags and slugify template filters
Patch by @jphalip updated to apply, documentation and release notes
added.

I've documented strip_tags as well as remove_tags as the difference
between the two wouldn't be immediately obvious.
2012-08-18 15:07:21 +01:00
Marc Tamlyn 58683e9c82 Fixed #16744 -- Class based view should have the view object in the context
Updated the most recent patch from @claudep to apply again and updated
the documentation location.
2012-08-18 15:07:21 +01:00
Aymeric Augustin 547b181046 [py3] Ported django.utils.safestring.
Backwards compatibility aliases were created under Python 2.
2012-08-18 16:04:06 +02:00
Marc Tamlyn bfa9fc69bf Fixed #18779 -- URLValidator can't validate url with ipv6.
Validation is reasonably 'soft', as for the ipv4. False positives don't
matter too much here.
2012-08-18 12:08:44 +01:00
Aymeric Augustin 16ab519f62 [py3] Removed gratuitous use of map/lambda
that causes a test failure on Python 3 because map returns an iterator.
2012-08-18 11:55:36 +02:00
Aymeric Augustin 85e7a5e140 [py3] Stopped attempting to translate bytes.
That goes actively against the goal of cleaning string handling.
2012-08-18 11:36:09 +02:00
Aymeric Augustin 2284419a2c [py3] Fixed cache tests. 2012-08-18 11:15:05 +02:00
Aymeric Augustin f34de7dd6e [py3] Fixed backends tests. 2012-08-18 11:02:38 +02:00