Commit Graph

2424 Commits

Author SHA1 Message Date
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
Carl Meyer 75ef980e20 Fix Python 3 test failure introduced in a78dd109. 2012-09-09 11:37:21 -06: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
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
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
Aymeric Augustin 4e1fd38bd6 Fixed #18781 -- Reduced max session cookie size. 2012-09-07 19:24: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 292322f977 [py3k] Silence many warnings while running the tests. 2012-09-07 13:17:34 -04:00
Adrian Holovaty 4193a0f3d5 Negligible spacing fix in auth/forms.py 2012-09-04 16:47:45 -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 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
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
Ramiro Morales 5a9e127efc Made model instance history admin view link not hard-coded. Refs #15294. 2012-08-26 17:54:49 -03:00
Claude Paroz 62e1c5a441 Fixed #17448 -- Improved test and documented raw-sql gis query 2012-08-25 14:39:52 +02: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
Aymeric Augustin 5301a9d7b1 [py3] Removed duplicate imports.
Fixed #18837. Refs #18791.
2012-08-23 10:16:16 +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
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
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 527f967ec1 [py3] Fixed formtools tests.
Python 3 adds a new pickle protocol. The tests were updated in a way
that makes it easy to add another pickle protocol, should Python gain
one.

Thanks Thomas Pelletier for providing an initial version of this patch.
2012-08-18 10:39:33 +02:00
Ramiro Morales 4c934f3921 Made createsuperuser more robust when getting current OS username.
Under some versions of OS X, failure in getting the default system
locale during the syncdb operation of the auth app were causing hard to
diagnose problems afterwards.

No solution based on getpreferredencoding() was chosen because it has
its own problems with certain combinations of Python and OS X versions
(e.g. http://bugs.python.org/issue6202).

Thanks prestonsimmons for the report and prestonsimmons and willhardy
for the initial patch.

Fixes #16017.
2012-08-17 23:15:20 -03:00
Florian Apolloner 518af78e21 Removed unneeded smart_bytes import which was introduced in f2fff84bc. 2012-08-15 17:33:21 +02:00
Florian Apolloner f2fff84bc3 [py3] fixed session file backend. 2012-08-15 14:20:44 +02:00
Alex Gaynor 64a3c7f9ae Ensured that about half of the files opened in the formtools tests were explicitly closed. 2012-08-15 03:46:32 -07:00
Anssi Kääriäinen 5d01f3caea [py3] Removed map() calls used for side-effects only 2012-08-15 13:23:41 +03:00
Claude Paroz e0d67f3440 [py3] Fixed test_client_regress tests 2012-08-15 10:58:26 +02:00
Alex Gaynor 31ae103a15 Fixed syndication under python3. 2012-08-15 01:54:18 -07:00
Alex Gaynor d674bd603e Final explicit closing for staticfiles, they now pass on python3 with -Wall and there are no warnings about unclosed files 2012-08-15 01:29:05 -07:00
Aymeric Augustin 212a512984 [py3] Avoided the deprecated base64 interface.
This fixes a deprecation warning under Python 3.
2012-08-14 23:45:12 +02:00
Claude Paroz 34ac145796 [py3] Fixed contrib.auth tests 2012-08-14 23:35:12 +02:00
Aymeric Augustin 37c9318748 [py3] Fixed sitemaps tests. 2012-08-14 20:14:31 +02:00
Claude Paroz 7d48e077b5 [py3] Fixed staticfiles tests 2012-08-14 17:24:31 +02:00
Alex Gaynor a351e383b6 There's no need to do `list(dict.keys())` list(dict)` is enough. 2012-08-14 06:57:16 -07:00
Claude Paroz c2d59e5564 [py3] Fixed admin_views tests
Also changed several occurrences of 'request' to 'response'.
2012-08-14 14:45:28 +02:00
Aymeric Augustin faf570df18 [py3] Compared response.content with bytes. 2012-08-14 12:29:53 +02:00
Claude Paroz 0df0cf70d4 Reverted pickle-json replacement form_hmac calculation
This reverts commit b109ff8062 and
complement test cases. The change was too hasty, as some form
values cannot be json-serialized as is.
2012-08-14 09:51:39 +02:00
Claude Paroz 363dbd920e [py3] Fixed contrib.formtools tests 2012-08-13 21:26:12 +02:00
Claude Paroz b109ff8062 Replaced pickle by json in form_hmac calculation
Refs #18340
2012-08-13 21:02:18 +02:00
Claude Paroz 8a1f439d3a [py3] Fix encoding issues in contrib.sessions 2012-08-12 22:49:10 +02:00
Claude Paroz dce34dc969 [py3] Made __repr__ return str with Python 3 2012-08-12 20:45:39 +02:00
Aymeric Augustin d4a0b27838 [py3] Refactored __unicode__ to __str__.
* Renamed the __unicode__ methods
* Applied the python_2_unicode_compatible decorator
* Removed the StrAndUnicode mix-in that is superseded by
  python_2_unicode_compatible
* Kept the __unicode__ methods in classes that specifically
  test it under Python 2
2012-08-12 14:44:40 +02:00
Aymeric Augustin 2bb2eecb63 [py3] Removed redundant __str__ methods.
These classes already have an identical __unicode__ method, which
will be used after an upcoming refactoring.
2012-08-12 14:44:40 +02:00
Karen Tracey b82eb10b26 Fixed #18754 -- cache keys created by post_process
Corrected to always generate the cache keys from file names with
forward slashes, not backslashes.
2012-08-11 17:05:26 -04:00