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
Aymeric Augustin
4c1286cf78
[py3] Added compatibility import of thread/_thread
...
This commit fixes the auto-reload of the development server.
I should have done that change in ca07fda2
.
2012-08-18 10:56:56 +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
Aymeric Augustin
1ad05172cb
[py3] Fixed file_storage tests.
2012-08-18 10:24:23 +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
Claude Paroz
6e4c984098
[py3] Workarounded a Python bug in mail header encoding
2012-08-17 20:19:14 +02:00
Aymeric Augustin
d739d531a1
[py3] Fixed a regression introduced in fcc8de0598
.
...
Thanks George Marshall for the report.
2012-08-16 22:04:50 +02:00
Claude Paroz
5c79dd5865
Fixed #18239 -- Subclassed HTMLParser only for selected Python versions
...
Only Python versions affected by http://bugs.python.org/issue670664
should patch HTMLParser.
Thanks Raphaël Hertzog for the initial patch (for 1.4).
2012-08-16 21:03:11 +02:00
Claude Paroz
d69bd23b55
Fixed Python version check in testcases.py
2012-08-16 15:31:01 +02:00
Aymeric Augustin
fcc8de0598
[py3] Ported django.core.servers.
2012-08-16 13:01:16 +02:00
Aymeric Augustin
688678e7c0
[py3] Avoided relying on 2.x-only internals
...
in LiveServerTestCase.
2012-08-16 09:56:42 +02:00
Dmitry Shevchenko
4412de5d8d
[py3] Fixed installed_models filtering.
2012-08-16 01:08:45 -05:00
Ramiro Morales
62c3f6362a
Fix changes introduced in fd04e7 so they don't break on Python 3.
2012-08-15 23:08:16 -03:00
Adrian Holovaty
fd04e711d2
Added import of force_unicode to utils/text.py
...
For backwards compatibility with stupid people like me. Refs #18772 .
2012-08-15 16:59:31 -05:00
Aymeric Augustin
27d16a3ca4
[py3] Fixed middleware_exceptions tests.
2012-08-15 22:53:52 +02:00
Claude Paroz
24de85c419
[py3] Fixed more encoding issues in cache tests
2012-08-15 22:48:09 +02:00
Claude Paroz
2b157b0adc
[py3] Fixed slug regex
...
In Python 3, \w matches any Unicode character.
2012-08-15 21:07:48 +02:00
Claude Paroz
60f5e10230
[py3] Fixed dispatch tests
2012-08-15 18:19:21 +02:00
Florian Apolloner
518af78e21
Removed unneeded smart_bytes import which was introduced in f2fff84bc
.
2012-08-15 17:33:21 +02:00
Claude Paroz
4e17f4589a
Fixed #18770 -- memcached cache backend expects byte strings as keys
...
Thanks thecore for the report.
2012-08-15 16:57:17 +02:00
Florian Apolloner
f2fff84bc3
[py3] fixed session file backend.
2012-08-15 14:20:44 +02:00
Claude Paroz
4d393e1bd9
[py3] Fixed HTTP header serialization
2012-08-15 13:39:39 +02:00
Claude Paroz
de2cb5fede
[py3] Fixed F-expression right-hand division
...
Complementary to commit 62a9ed0ac
.
2012-08-15 13:28:47 +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
Claude Paroz
187ec5a166
[py3] Pass bytes to md5 in truncate_name
2012-08-15 12:37:08 +02:00