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
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
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
Andrews Medina
87e0a75c03
[py3] Decoded base64-encoded hash in contrib.auth.hashers
2012-08-11 00:20:59 +02:00
Alex Gaynor
5f8da527ab
[py3k] use the base64 module, instead of bytes.encode('base64')
2012-08-09 07:26:11 -07:00
Claude Paroz
180b672a65
[py3] Fixed Python 3 compatibility in localflavor forms
2012-08-08 23:22:27 +02:00
Claude Paroz
b8e49d70f2
[py3] Replaced raw_input by input
...
The six addition has been borrowed from:
https://bitbucket.org/gutworth/six/changeset/733ef740
2012-08-08 19:53:11 +02:00
Claude Paroz
db729266d6
[py3] Fixed 'iterable but non string' detection
...
In Python 3, the str type has an __iter__ attribute. Therefore, the
presence of an __iter__ attribute is not sufficient to distinguish
'standard' iterables (list, tuple) from strings.
2012-08-08 18:02:25 +02:00
Alex Gaynor
4c97101b1f
remove a bunch of unnescesarry iterkeys() calls
2012-08-08 07:33:15 -07:00
Claude Paroz
576ec12f8e
[py3] Replaced __nonzero__ by __bool__
...
Of course, __nonzero__ alias has been kept for Python 2 compatibility.
2012-08-08 15:02:31 +02:00
Claude Paroz
2da3af23aa
[py3] Made gis.measure Python 3-compatible
2012-08-08 14:43:16 +02:00
Aymeric Augustin
9e0a10ba77
[py3] Minor fix in django.contrib.gis.
2012-08-07 12:00:24 +02:00
Aymeric Augustin
c5ef65bcf3
[py3] Ported django.utils.encoding.
...
* Renamed smart_unicode to smart_text (but kept the old name under
Python 2 for backwards compatibility).
* Renamed smart_str to smart_bytes.
* Re-introduced smart_str as an alias for smart_text under Python 3
and smart_bytes under Python 2 (which is backwards compatible).
Thus smart_str always returns a str objects.
* Used the new smart_str in a few places where both Python 2 and 3
want a str.
2012-08-07 12:00:22 +02:00
Aymeric Augustin
ee191715ea
[py3] Fixed access to dict keys/values/items.
2012-08-07 12:00:22 +02:00
Justin Bronn
1c3464e809
Fixed testing on SpatiaLite 2.4, which has support for `InitSpatialMetaData`.
2012-08-04 18:10:34 -07:00
Claude Paroz
09a719a4e6
Fixed #7833 -- Improved UserCreationForm password validation
...
Make UserCreationForm password validation similar to
SetPasswordForm and AdminPasswordChangeForm, so as the match
check is only done when both passwords are supplied.
Thanks Mitar for the suggestion.
2012-08-04 14:55:13 +02:00
Claude Paroz
121fd109de
Fixed #5524 -- Do not remove cleaned_data when a form fails validation
...
cleaned_data is no longer deleted when form validation fails but only
contains the data that did validate.
Thanks to the various contributors to this patch (see ticket).
2012-08-04 14:22:23 +02:00
Claude Paroz
2407c45c18
Removed some pre-1.3.0 postgis compatibility code
2012-08-03 11:27:31 +02:00
Claude Paroz
c5d6f6d682
Reorganized geoapp gis tests
...
Removed the numbering of tests and moved lookup/geoqueryset tests
in their own test class.
2012-08-03 10:53:30 +02:00
Alex Gaynor
ace9ccfe9f
Fixed #18666 -- when upgrading a user's password to a new algorithm only save the password field to the databaes.
2012-07-24 19:03:26 -07:00
Aymeric Augustin
a84d79f572
[py3] Added Python 3 compatibility for xrange.
2012-07-22 09:29:56 +02:00
Aymeric Augustin
ca07fda2ef
[py3] Switched to Python 3-compatible imports.
...
xrange/range will be dealt with in a separate commit due to the huge
number of changes.
2012-07-22 09:29:56 +02:00
Aymeric Augustin
0d914d08a0
[py3] Updated urllib/urllib2/urlparse imports.
...
Lots of functions were moved. Use explicit imports in all cases
to keey it easy to identify where the functions come from.
2012-07-22 09:29:55 +02:00
Aymeric Augustin
bdca5ea345
[py3] Replaced unicode/str by six.text_type/bytes.
2012-07-22 09:29:54 +02:00
Aymeric Augustin
3cb2457f46
[py3] Replaced basestring by six.string_types.
2012-07-22 09:29:54 +02:00
Aymeric Augustin
56dbe924a6
[py3] Removed longs.
2012-07-22 09:29:53 +02:00
Aymeric Augustin
f1d5dc81ac
[py3] Switched to Python 3-compatible introspection.
2012-07-22 09:29:53 +02:00
Aymeric Augustin
d11d45aad9
[py3] Used six.with_metaclass wherever necessary.
2012-07-22 09:29:52 +02:00
Julien Phalip
01c392623d
Fixed #10057 -- Ensured that the 'show_delete' context variable in the admin's change view actually controls the display of the delete button. Thanks to rajeesh for the report, to patcoll for the patch, and to David Gouldin for the test.
2012-07-21 18:10:24 -07:00
Aymeric Augustin
5d560dcb98
Fixed #18504 -- Computed |naturalday in local time.
2012-07-19 23:02:22 +02:00
Aymeric Augustin
123362dd37
Fixed #18608 -- Reduced monkey-patching in tests.
...
Thanks Claude Paroz for the patch.
2012-07-19 20:02:20 +02:00
Anssi Kääriäinen
aeda55e6bf
Fixed #3881 -- skip saving session when response status is 500
...
Saving session data is somewhat likely to lead into error when the
status code is 500. It is guaranteed to lead into error if the reason
for the 500 code is query error on PostgreSQL.
2012-07-16 20:57:55 +03:00
Claude Paroz
35ddeee455
Removed debugging line left in previous commit
2012-07-15 21:19:23 +02:00
Claude Paroz
cdcdd131da
Dropped support for GDAL < 1.5
...
GDAL 1.5 has been released in December 2007.
2012-07-15 21:10:32 +02:00
Alex Gaynor
3e8d8bb094
Fixed auth to not use an internal implementation detail of SortedDict
2012-07-14 14:33:13 -07:00
Claude Paroz
d9db1d3373
Added supplementary check for CUIT number of ar localflavor
...
Thanks Kevin Schaul for the initial patch.
2012-07-09 14:10:54 +02:00
Claude Paroz
1d2982362d
Fixed #18537 -- Fixed CUIT calculation in ar localflavor
...
Thanks mmoya at 8ksoft.com.ar for the report and Kevin Shaul for the
initial patch.
2012-07-09 14:10:54 +02:00
Jannis Leidel
1aa0d8ac4d
Fixed #18487 -- Made sure that protocol-relative URLs aren't processed by the cached staticfiles storage. Thanks to LukaszBalcerzak for the patch.
2012-07-08 18:25:12 +02:00
Jannis Leidel
3047981517
Fixed #18050 -- Fixed a rather glaring bug in the handling of @import statements when using the cached staticfiles storage.
2012-07-08 18:17:53 +02:00
Jannis Leidel
effc2cad95
Merge branch 'master' of github.com:django/django
2012-07-08 12:57:04 +02:00
Jannis Leidel
3727f6d096
Fixed #18430 -- Use the FILE_CHARSET setting when reading from a file during post processing with the cached staticfiles storage. Thanks to Brant Young for initial debugging.
2012-07-08 12:56:49 +02:00
Julien Phalip
8015593bc1
Fixed #17978 -- Fixed a minor layout issue when an inline contains a filter horizontal widget. Thanks to Aymeric Augustin for the report.
2012-07-07 15:41:04 -07:00
Florian Apolloner
a4bb7dd552
Merge branch 'master' of github.com:django/django
2012-07-07 15:49:00 +02:00
Jannis Leidel
0a68a2994b
Fixed #18254 -- Added ability to the static template tags to store the result in a contextt variable. Many thanks to Andrei Antoukh for the initial patch.
2012-07-07 15:30:25 +02:00
Florian Apolloner
52a9e15794
Fixed a regression in the user admin page introduced in a92e7f37c4
.
...
a92e7f37c4
switched most of the internal stuff
to format_html. Using format_html in the `render` method of
`ReadOnlyPasswordHashWidget` caused it to generate `SafeString` instances.
Later these safe strings where returned from `BoundField.__unicode__` which
caused force_unicode to loose the "safe" information. This commit fixes that by
ensuring that the render method returns `SafeUnicode` instead of `SafeString`.
2012-07-07 15:29:20 +02:00
Claude Paroz
8dafd04c45
Fixed #17257 - Removed outdated comment in syndication view
...
Thanks krzysiumed for the patch.
2012-07-07 11:34:04 +02:00