Marc Tamlyn
0f3f88ec94
Merge pull request #1270 from tomchristie/remove-incorrect-content-type-test-client
...
Remove incorrect CONTENT_TYPE header from GET and HEAD requests
2013-06-14 01:49:33 -07:00
Tom Christie
1b19f9e9e7
Remove incorrect CONTENT_TYPE header from GET and HEAD requests
2013-06-14 09:17:33 +01:00
Daniel Lindsley
91f317c76d
Added a ``checksetup`` management command for verifying Django compatibility.
2013-06-13 18:39:02 -07:00
Loic Bistuer
9e50833e22
Fixed #20000 -- Allowed ModelForm meta overrides for label, help_text and error_messages
2013-06-13 15:06:25 -04:00
Baptiste Mispelon
dc9c359546
Fixed #20594 -- Add validation to models.SlugField.
...
Thanks carbonXT for the report.
2013-06-13 13:31:57 -04:00
Aymeric Augustin
55cbd65985
Fixed #20579 -- Improved TransactionTestCase.available_apps.
...
Also moved its documentation to the 'advanced' section. It doesn't
belong to the 'overview'. Same for TransactionTestCase.reset_sequences.
When available_apps is set, after a TransactionTestCase, the database
is now totally empty. post_syncdb is fired at the beginning of the next
TransactionTestCase.
Refs #20483 .
2013-06-12 20:01:41 +02:00
Tim Graham
92c49d6f01
Revert "Fixed #20462 - Fixed sqlite regex lookups for null values and non-string fields."
...
This reverts commit 64041f0e6e
.
lookup.tests.LookupTests.test_regex_non_string fails under Postgres.
We should also try to rewrite the test using an existing model.
2013-06-11 17:55:19 -04:00
Axel Haustant
64041f0e6e
Fixed #20462 - Fixed sqlite regex lookups for null values and non-string fields.
2013-06-11 14:13:40 -04:00
Baptiste Darthenay
52f99b78bc
Fixed #20585 : normalize signature of DeletionMixin.post.
2013-06-11 12:40:06 +02:00
Gabe Jackson
584bd14dcf
Fixed #18134 -- BoundField.label_tag now includes the form's label_suffix
...
There was an inconsistency between how the label_tag for forms were
generated depending on which method was used: as_p, as_ul and as_table
contained code to append the label_suffix where as label_tag called on a
form field directly did NOT append the label_suffix. The code for
appending the label_suffix has been moved in to the label_tag code of
the field and the HTML generation code for as_p, as_ul and as_table now
calls this code as well.
This is a backwards incompatible change because users who have added the
label_suffix manually in their templates may now get double label_suffix
characters in their forms.
2013-06-10 14:23:15 -04:00
Aymeric Augustin
c6e6d4eeb7
Defined available_apps in relevant tests.
...
Fixed #20483 .
2013-06-10 11:30:01 +02:00
Aymeric Augustin
4daf570b98
Added TransactionTestCase.available_apps.
...
This can be used to make Django's test suite significantly faster by
reducing the number of models for which content types and permissions
must be created and tables must be flushed in each non-transactional
test.
It's documented for Django contributors and committers but it's branded
as a private API to preserve our freedom to change it in the future.
Most of the credit goes to Anssi. He got the idea and did the research.
Fixed #20483 .
2013-06-10 11:24:10 +02:00
Aymeric Augustin
13b7f299de
Added a stealth option to flush to allow cascades.
...
This allows using flush on a subset of the tables without having to
manually cascade to all tables with foreign keys to the tables being
truncated, when they're known to be empty.
On databases where truncate is implemented with DELETE FROM, this
doesn't make a difference. The cascade is allowed, not mandatory.
2013-06-10 11:21:54 +02:00
Tim Graham
96c71d423d
Added runserver validation to detect if DEBUG=False and ALLOWED_HOSTS is empty.
...
Refs #19875 .
2013-06-09 15:08:29 -04:00
Aymeric Augustin
79ff1aedd5
Replaced a dict emulating a set with a set.
2013-06-09 14:31:04 +02:00
Chris Streeter
69373f3420
Fixed #19925 - Added validation for REQUIRED_FIELDS being a list
...
Thanks Roman Alexander for the suggestion.
2013-06-07 19:58:41 -04:00
Andrew Godwin
315ab41e41
Initial stab at a migrate command, it's probably quite a way off.
2013-06-07 18:47:17 +01:00
Andrew Godwin
91c470def5
Auto-naming for migrations and some writer fixes
2013-06-07 17:56:43 +01:00
Andrew Godwin
cd809619a2
Autodetector tests
2013-06-07 15:49:48 +01:00
Andrew Godwin
c7aa4b5338
Field encoding
2013-06-07 15:36:31 +01:00
Andrew Godwin
4492f06408
A bit of an autodetector and a bit of a writer
2013-06-07 15:28:38 +01:00
Andrew Godwin
3c296382b8
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
django/db/models/fields/related.py
2013-06-07 11:15:34 +01:00
Jacob Kaplan-Moss
80b1511311
Bumped verion numbers for 1.6a1.
2013-06-06 11:05:33 -05:00
Stephen Burrows
e2518fdf46
Fixed #12337 - Honor ModelForm.Meta.exclude when saving ManyToManyFields.
...
Thanks margieroginski for the report.
2013-06-06 10:01:48 -04:00
Claude Paroz
b67f2ac8e6
Fixed #20502 (again) -- More i18n cache flush in tests
...
Thanks Timo Graham for noticing the failures.
2013-06-06 14:28:58 +02:00
Marc Tamlyn
9ed971f4f1
Merge pull request #1245 from oinopion/list_select_related
...
Fixed #19080 -- Fine-grained control over select_related in admin
2013-06-06 01:27:05 -07:00
Anssi Kääriäinen
31fd64ad8a
Fixed #20564 -- Generic relations exclude() regression
...
The patch for #19385 caused a regression in certain generic relations
.exclude() filters if a subquery was needed. The fix contains a
refactoring to how Query.split_exclude() and Query.trim_start()
interact.
Thanks to Trac alias nferrari for the report.
2013-06-06 01:54:46 +03:00
Tomek Paczkowski
0fd9f7c95f
Fixed #19080 -- Fine-grained control over select_related in admin
2013-06-05 23:08:00 +02:00
Bojan Mihelac
b00c6371af
Fixed #17927 -- Added initial values support for BaseGenericInlineFormSet
...
Thanks Fak3 for the suggestion.
2013-06-05 07:59:59 -04:00
Tim Graham
a35ed20241
Fixed #18924 -- Made test.Client.logout send user_logged_out signal.
...
Thanks awsum for the suggestion and Pavel Ponomarev and
Florian Hahn for the patch.
2013-06-04 12:39:09 -04:00
James Aylett
5448555785
Fixed #17601 -- expose underlying db exceptions under py2
...
Use __cause__ to expose the underlying database exceptions even
under python 2.
2013-06-04 12:46:10 +01:00
Gavin Wahl
4f4e9243e4
Fixed #20532 -- Reverse auth views by name, not by path.
...
Auth views should be reversed by name, not their locations in
`django.contrib.auth.views`. This allows substituting your own
implementations of the auth views.
2013-06-03 13:30:40 -04:00
Florian Apolloner
c9d07d251f
Fixed loaddata for Django checkouts with non ASCII chars in the name.
2013-06-03 13:18:16 +02:00
Aymeric Augustin
6900cb79dc
Fixed small regression from 51aa000378
.
...
A test failed if the path to the Django checkout contained a dot.
Refs #20485 .
2013-06-03 11:48:03 +02:00
Aymeric Augustin
51aa000378
Fixed #20485 -- Refactored loaddata for speed.
...
Thanks Anssi for reporting this performance bottleneck.
2013-06-02 20:39:45 +02:00
Aymeric Augustin
b55624a026
Added get_app_paths() to the AppCache.
...
This method is useful to discover files inside apps.
2013-06-02 20:39:45 +02:00
Alex Gaynor
09d0568697
Switched to using some constants the hmac module exposes.
2013-06-02 10:31:38 -07:00
Simon Charette
590a41164e
Fixed admindoc template errors introduced by 02fd87c821
.
...
Also regenerated the affected translation template.
Refs #20540 .
2013-06-02 00:32:29 -04:00
Tim Graham
61524b09cf
Fixed #18388 - Added InlineModelAdmin.get_max_num hook.
...
Thanks d.willy.c.c@ for the suggestion and Melevir and Areski Belaid for work
on the patch.
2013-06-01 18:20:54 -04:00
Dan Loewenherz
07a73a2714
Fixed #20337 -- Clarified error message when database relation is not allowed.
2013-06-01 07:55:49 -04:00
Danilo Bargen
127d9b2792
Added minor splitting optimization in django.utils.ipv6._unpack_ipv4
2013-06-01 07:08:13 -04:00
Claude Paroz
5442fe46da
Updated contrib.admindocs translation template
2013-06-01 12:10:48 +02:00
Claude Paroz
02fd87c821
Fixed #20540 -- Added more translatable strings to contrib.admindocs
...
Thanks lborgav for the initial patch.
2013-06-01 12:06:36 +02:00
Claude Paroz
de66b56790
Fixed #18481 -- Wrapped request.FILES read error in UnreadablePostError
...
Thanks KyleMac for the report, André Cruz for the initial patch and
Hiroki Kiyohara for the tests.
2013-06-01 10:26:46 +02:00
Anssi Kääriäinen
369b6fab25
Fixed #18169 -- NoReverseMatch not silenced if from block.super
2013-06-01 00:59:04 +03:00
Chris Wilson
fa7cb4ef3c
Fixed #20404 -- Added a keys() method to ContextList.
...
It's useful to be able to list all the (flattened) keys of a
ContextList, to help you figure out why the variable that's supposed
to be there is not.
No .values() or .items() added as the definition for those aren't clear.
The patch is Chris Wilson's patch from pull request 1065 with some
modifications by committer.
2013-06-01 00:04:06 +03:00
René Fleschenberg
5090c7b58b
Improved the usage message of the test command.
2013-05-31 13:16:54 -04:00
Loic Bistuer
23e1b59cf2
Fixed #18681 -- BaseModelAdmin.get_form and InlineModelAdmin.get_formset no longer bypass get_fieldsets
...
Thanks msopacua for the report.
2013-05-31 12:48:51 -04:00
Claude Paroz
3d883e8bd9
Merge pull request #1232 from fusionbox/normalize_email
...
Fixed #20531 -- Don't hard-code class names when calling static methods
2013-05-31 00:56:56 -07:00
Claude Paroz
571864c845
Added missing stacklevel arg in forms/models.py
2013-05-30 20:07:53 +02:00
Tim Graham
36aecb12b8
Fixed #19425 - Added InlineModelAdmin.get_extra hook.
...
Thanks dave@ for the suggestion and Rohan Jain for the patch.
2013-05-30 13:48:10 -04:00
Andrew Godwin
7609e0b42e
Remove debug prints
2013-05-30 18:25:57 +01:00
Andrew Godwin
8d81c6bc82
Use correct model versions for field operations
2013-05-30 18:24:20 +01:00
Andrew Godwin
e6ba63def3
Fix error in ModelState.clone() not copying deep enough
2013-05-30 18:24:10 +01:00
Andrew Godwin
e6f7f4533c
Add an Executor for end-to-end running
2013-05-30 18:08:58 +01:00
Andrew Godwin
dfa7c5cade
Allow retrieval of project state at start of migrations
2013-05-30 17:56:26 +01:00
Tim Graham
7902fd74f1
Merge pull request #1027 from intgr/debug_no_exc_message
...
Clearer explanation when exception has no message
2013-05-30 09:53:07 -07:00
Tim Graham
5074c75a37
Fixed #16856 - Added a way to clear select_related.
...
Thanks Carl for the suggestion and David Cramer for the patch.
2013-05-30 11:06:05 -04:00
Tim Graham
616f3c4a79
Fixed #20272 - Moved update_fields existence check into Model._do_update.
...
Thanks Gavin Wahl.
2013-05-30 10:48:30 -04:00
Tim Graham
59235816bd
Fixed #20509 - Proper parsing for dumpdata --pks option.
...
Thanks weipin for the report and Baptiste Mispelon for the patch.
2013-05-30 10:19:13 -04:00
Tai Lee
69f7db153d
Fixed #16436 -- defer + annotate + select_related crash
...
Correctly calculate the ``aggregate_start`` offset from loaded fields,
if any are deferred, instead of ``self.query.select`` which includes all
fields on the model.
Also made some PEP 8 fixes.
2013-05-30 08:46:31 +03:00
Gavin Wahl
01ae881bb4
Don't hard-code class names when calling static methods
...
normalize_email should be called on the instance, not the class. This
has the same effect normally but is more helpful to subclassers. When
methods are called directly on the class, subclasses can't override
them.
2013-05-29 16:11:26 -06:00
Andrew Godwin
d0ecefc2c9
Start adding operations that work and tests for them
2013-05-29 17:47:10 +01:00
Tim Graham
d727518ad6
Fixed #20331 -- Allowed admin actions to serve StreamingHttpResponses
...
Thanks Edwin.
2013-05-29 11:25:42 -04:00
Claude Paroz
8010289ea2
Fixed #15697 -- Made sqlindexes aware of auto-created tables
...
Thanks mbertheau for the report and Ash Christopher for the
initial patch.
2013-05-29 15:50:26 +02:00
Tim Graham
5939864616
Fixed #15653 - Error in admin pagination tag.
...
Thanks jcumbo@ for the report and adamzap
and nott for the patch.
2013-05-29 09:23:08 -04:00
Tim Graham
ded95ccdce
Fixed #20484 -- Added model validation for GenericIPAddressField
...
GenericIPAddressField must not allow blank for NOT NULL fields
Thanks Erik Romijn.
2013-05-28 15:12:47 -04:00
Carl Meyer
cd79f33723
Fixed #20503 - Moved doctest utilities in with the rest of the deprecated test code.
...
The ``DocTestRunner`` and ``OutputChecker`` were formerly in
``django.test.testcases``, now they are in ``django.test.simple``. This avoids
triggering the ``django.test._doctest`` deprecation message with any import
from ``django.test``. Since these utility classes are undocumented internal
API, they can be moved without a separate deprecation process.
Also removed the deprecation warnings specific to these classes, as they are
now covered by the module-level warning in ``django.test.simple``.
Thanks Anssi for the report.
Refs #17365 .
2013-05-27 14:55:08 -06:00
Shai Berger
0027f13904
Fixed #20014 -- implemented get_key_columns() for Oracle
...
Thanks Aymeric Augustin for reporting
2013-05-27 21:12:47 +03:00
Tim Graham
0268aba96b
Fixed #20182 - admin lookup should treat 0 as False for __isnull
...
Thanks Benjie Chen.
2013-05-27 13:29:53 -04:00
Tim Graham
d194714c0a
Fixed #11603 - Added django.test.SimpleTestCase.assertFormsetError
...
Thank-you Martin Green for the patch.
2013-05-27 12:25:35 -04:00
Shai Berger
5e05ec3ea6
Fixed #20501 -- failure of datetime queries with timezones under Oracle
2013-05-27 17:28:57 +03:00
Tim Graham
90af278203
Fixed #16137 - Removed kwargs requirement for QuerySet.get_or_create
...
Thanks wilfred@, poirier, and charettes for work
on the patch.
2013-05-27 10:01:14 -04:00
Tim Graham
6f8627dd7f
Fixed #17582 - Added message to DoesNotExist exceptions.
...
Thanks simon@ for the suggestion and JordanPowell
for the initial patch.
2013-05-27 07:57:06 -04:00
Anssi Kääriäinen
37ea9f9c03
Fixed #20507 -- SubqueryConstraint alias handling
...
MySQL should work now, too.
2013-05-27 15:05:03 +03:00
Ramiro Morales
7a92312827
Fixed #12491 -- Tweak checkbox widget help text alignment on the admin.
...
Thanks master' for the report and Niels van Dijk for the fix
2013-05-27 08:47:18 -03:00
Claude Paroz
b14bd60404
Reimplemented PostGIS spatial_version with cached_property
2013-05-27 12:06:56 +02:00
Anssi Kääriäinen
d467e11785
Fixed #20507 -- SubqueryConstraint alias relabeling
...
The SubqueryConstraint defined relabeled_clone(), but that was never
called. Instead there is now clone() and relabel_aliases() methods for
SubqueryConstraint.
A related problem was that SubqueryConstraint didn't correctly use
quote_name_unless_alias() of the outer query. This resulted in failures
when running under PostgreSQL.
2013-05-27 12:25:29 +03:00
Claude Paroz
1a4b435218
Merge pull request #1217 from erikr/better-settings-errors2
...
Fixed #20443 -- Import errors in settings cause confusing error messages
2013-05-27 01:08:18 -07:00
Ramiro Morales
0fa8d43e74
Replaced `and...or...` constructs with PEP 308 conditional expressions.
2013-05-26 23:47:50 -03:00
Preston Holmes
d228c1192e
Fixed #19866 -- Added security logger and return 400 for SuspiciousOperation.
...
SuspiciousOperations have been differentiated into subclasses, and
are now logged to a 'django.security.*' logger. SuspiciousOperations
that reach django.core.handlers.base.BaseHandler will now return a 400
instead of a 500.
Thanks to tiwoc for the report, and Carl Meyer and Donald Stufft
for review.
2013-05-25 16:27:34 -07:00
Erik Romijn
9a524e3c5b
Fixed #20443 -- Import errors in settings cause confusing error messages
2013-05-25 20:25:29 +02:00
Andrew Jesaitis
31f6421b13
Fixed #19938 -- Consumed iterator only once in paginator's Page
...
Thanks Joshua Fialkoff for the report.
2013-05-25 16:27:26 +02:00
Baptiste Mispelon
2ee447fb5f
Fixed #20296 -- Allowed SafeData and EscapeData to be lazy
2013-05-25 16:06:44 +02:00
Claude Paroz
be0bab1bb8
Fixed #11725 -- Made possible to create widget label tag without "for"
...
Thanks Denis Martinez for the report and initial patch, and
Sergey Kolosov for bringing the patch up to date.
2013-05-25 15:31:07 +02:00
Claude Paroz
ab61dd2829
Updated translation catalogs
...
Updated core/admin/admindocs/comments translation catalogs.
2013-05-25 14:32:44 +02:00
Claude Paroz
b7cf44dde8
Fixed some minor translation-related issues
2013-05-25 14:32:44 +02:00
Marc Egli
b3bccce1a0
Fixed #20455 -- Do not use ngettext for undefined plurals
...
Using two separate translation strings instead of gettext plural when
there is no reference to the number in the translated string. This
prevents some translations like Russian and Latvian to use the singular
form for 11 or 21.
2013-05-25 14:16:46 +02:00
Claude Paroz
c0439b6210
Removed obsolete attribute of DjangoTranslation
2013-05-25 14:01:52 +02:00
Claude Paroz
f940e564e4
Fixed #20099 -- Eased subclassing of BrokenLinkEmailsMiddleware
...
Thanks Ram Rachum for the report and the initial patch, and Simon
Charette for the review.
2013-05-25 12:10:53 +02:00
Vlastimil Zíma
6de81d65f4
Fixed #14825 -- LocaleMiddleware keeps language
...
* LocaleMiddleware stores language into session if it is not present there.
2013-05-25 10:52:54 +02:00
Andrew Godwin
1514f17aa6
Rotate CSRF token on login
2013-05-24 22:15:08 +01:00
Claude Paroz
7e95d7a930
Fixed a regression in router initialization
...
Regression was introduced in 6a6bb168b
. Thanks Bas Peschier for the
report.
2013-05-24 20:48:02 +02:00
Luke Plant
17559e6eb0
Optimisation in prefetch_related_objects
2013-05-24 11:19:44 +01:00
Luke Plant
4fd94969d8
Fixed #19607 - prefetch_related crash
...
Thanks to av@rdf.ru and flarno11@yahoo.de for the report.
2013-05-24 11:10:48 +01:00
Gavin Wahl
48424adaba
Fixed #17648 -- Add `for_concrete_model` to `GenericForeignKey`.
...
Allows a `GenericForeignKey` to reference proxy models. The default
for `for_concrete_model` is `True` to keep backwards compatibility.
Also added the analog `for_concrete_model` kwarg to
`generic_inlineformset_factory` to provide an API at the form level.
2013-05-23 19:03:14 -04:00
Claude Paroz
6a6bb168be
Delayed settings.DATABASE_ROUTERS usage by ConnectionRouter
...
Refs #20474 .
2013-05-23 15:19:12 +02:00
Claude Paroz
2d8c132b18
Delayed settings.DATABASES usage by ConnectionHandler
...
Refs #20474 .
2013-05-23 15:19:12 +02:00
Claude Paroz
499a745ae1
Fixed #20474 -- Proxied and deprecated django.db.backend
2013-05-23 15:19:12 +02:00
Claude Paroz
b664cb818d
Fixed #19237 (again) - Made strip_tags consistent between Python versions
2013-05-23 14:01:27 +02:00
Ramiro Morales
8c2fd050f8
Made fix for #9321 less buggy and more effective.
...
Don't try to be smart about building a good-looking help string
because it evaluates translations too early, simply use the same old
strategy as before. Thanks Donald Stufft for the report.
Also, actually fix the case reported by the OP by special-casing
CheckboxSelectMultiple.
Added tests.
Refs #9321 .
2013-05-23 07:49:29 -03:00
Donald Stufft
3de1288042
Fixed #11398 - Added a pre_syncdb signal
2013-05-23 01:09:22 -04:00
Russell Keith-Magee
11b06532f7
Merge pull request #1198 from KrzysiekJ/http-patch-method
...
Fixed #20478 – Added support for HTTP PATCH method in generic views.
2013-05-22 17:19:43 -07:00
Claude Paroz
51998dffe7
Removed check for 0.15 version of gettext tools
...
gettext 0.15 has been released in July 2006.
2013-05-22 18:21:33 +02:00
Claude Paroz
dc51ec8bc2
Fixed #19237 -- Used HTML parser to strip tags
...
The regex method used until now for the strip_tags utility is fast,
but subject to flaws and security issues. Consensus and good
practice lead use to use a slower but safer method.
2013-05-22 17:34:02 +02:00
Krzysztof Jurewicz
ee8b810b97
Fixed #20478 – Added support for HTTP PATCH method in generic views.
2013-05-22 14:48:11 +02:00
Aymeric Augustin
0e51d8eb66
Fixed #20463 -- Made get_or_create more robust.
...
When an exception other than IntegrityError was raised, get_or_create
could fail and leave the database connection in an unusable state.
Thanks UloPe for the report.
2013-05-22 10:56:06 +02:00
Marc Tamlyn
adeec00979
Merge pull request #246 from dekkers/ticket_18709
...
Fixed #18709 -- Check if initial_value is a callable
2013-05-22 00:45:07 -07:00
Jeroen Dekkers
d0788c2770
Fixed #18709 -- Check if initial_value is a callable
...
In _get_changed_data, check if initial_value is a callable and call it
if it is.
2013-05-22 01:05:22 +02:00
Shai Berger
dfe6ea3b1f
Fixed #20012 -- test_year_lookup_edge_case fails under Oracle
...
Used formatted date instead of datetime object for the end of the
year range, as the datetime object loses fractions-of-seconds when
inserted into the db.
2013-05-22 01:52:15 +03:00
Shai Berger
8fd40b9ae7
Fixed #20015 -- date__startswith('2008') fails under Oracle
...
Removed the explicit casting of strings to dates
2013-05-22 01:52:15 +03:00
Shai Berger
b6ad9998e6
Fixed #20453 -- inspectdb test failure on Oracle
2013-05-22 01:52:15 +03:00
Anssi Kääriäinen
70679243d1
Fixed #18702 -- Removed chunked reads from QuerySet iteration
2013-05-21 19:51:59 +03:00
Selwin Ong
ea9a0857d4
Fixed #19326 -- Added first() and last() methods to QuerySet
2013-05-21 18:52:28 +03:00
Claude Paroz
d595b61aca
(Re-)moved some imports
2013-05-21 17:34:19 +02:00
Mathijs de Bruin
61a8de6f4f
Fixed #6412 -- More details if a template file cannot be loaded
...
Report more details about template files in loader postmortem.
2013-05-21 16:59:40 +02:00
Claude Paroz
fd961941cc
Imported copyreg from six.moves
2013-05-21 14:41:39 +02:00
Wiktor Kolodziej
cec9558fba
Fixed #17308 -- Enabled the use of short_description on properties in the admin.
2013-05-21 13:19:18 +02:00
Aymeric Augustin
18856f866c
Merge pull request #1191 from ambv/content_is_bytes
...
Fixed #20472 : response.content should be bytes on both Python 2 and 3
2013-05-21 01:26:35 -07:00
Daniel Lindsley
e24d486fbc
Fixed #20212 - __reduce__ should only be defined for Py3+.
2013-05-21 00:49:21 -07:00
Łukasz Langa
0594fed9ff
Fixed #20472 : response.content should be bytes on both Python 2 and 3
2013-05-21 01:28:16 +02:00
Ramiro Morales
4ba1c2e785
Fixed #9321 -- Deprecated hard-coding of help text in model ManyToManyField fields.
...
This is backward incompatible for custom form field/widgets that rely
on the hard-coded 'Hold down "Control", or "Command" on a Mac, to select
more than one.' sentence.
Application that use standard model form fields and widgets aren't
affected but need to start handling these help texts by themselves
before Django 1.8.
For more details, see the related release notes and deprecation timeline
sections added with this commit.
2013-05-20 16:29:51 -03:00
Jorge Bastida
888c86dcf3
Fixed #20445 -- Raised original exception after command error
2013-05-20 18:59:37 +02:00
Ryan Kaskel
4280217f31
Fixed #20403 -- Ignore forms marked for deletion when validating max_num.
2013-05-20 12:13:21 -04:00
Anssi Kääriäinen
266c0bb23e
Fixed #20278 -- ensured .get() exceptions do not recurse infinitely
...
A regression caused by d5b93d3281
made .get() error
reporting recurse infinitely on certain rare conditions. Fixed this by
not trying to print the given lookup kwargs.
2013-05-20 18:50:40 +03:00
Anssi Kääriäinen
c9a96075fa
Fixed #20378 -- regression in GenericRelation on abstract model
...
When a GenericRelation was defined on abstract model, queries on childs
of the abstract model didn't work. The problem was in the way fields and
in particular field.rel was copied from models to their children.
The regression was likely caused by #19385 . Thanks to Gavin Wahl for
spotting the regression.
2013-05-20 18:02:10 +03:00
Anssi Kääriäinen
f53059b411
Fixed qs.values() regression when used in subquery
2013-05-20 15:38:47 +03:00
Marc Tamlyn
6d81d5d82e
Merge pull request #1181 from aaugustin/better-api-to-disable-atomic-requests
...
Changed API to disable ATOMIC_REQUESTS per view.
2013-05-20 00:26:06 -07:00
Aymeric Augustin
6633eeb886
Changed API to disable ATOMIC_REQUESTS per view.
...
A decorator is easier to apply to CBVs. Backwards compatibility isn't an
issue here, except for people running on a recent clone of master.
Fixed a few minor problems in the transactions docs while I was there.
2013-05-19 19:53:16 +02:00
Preston Holmes
6786920fd8
Fixed #16330 -- added --pks option in dumpdata command
...
Thanks to guettli for the initial ticket and patch, with additional work
from mehmetakyuz and Kevin Brolly.
2013-05-19 09:10:40 -07:00
Aymeric Augustin
f7d7d2be4b
Made 2d309a70
compatible with Python 3.
2013-05-19 17:58:29 +02:00
Russell Keith-Magee
a4ab0e8b86
Merge pull request #1178 from bmispelon/master
...
Fix for test failure introduced by 980ae2a
.
2013-05-19 08:08:09 -07:00
Baptiste Mispelon
3cb1e9b93c
Fix test failure introduced by 980ae2ab29
.
2013-05-19 16:51:36 +02:00
Bozidar Benko
2d309a7043
Fixed #15961 -- Modified ModelAdmin to allow for custom search methods.
...
This adds a get_search_results method that users can override to
provide custom search strategies.
Thanks to Daniele Procida for help with the docs.
2013-05-19 16:45:00 +02:00
Erik Romijn
f88700d610
Fix #19664 -- Illegal Characters In Session Key Give Fatal Error On File Backend Only
2013-05-19 15:33:05 +02:00
Aymeric Augustin
181f2ec603
Fixed test failures with Oracle when pytz isn't installed.
...
Thanks Shai Berger for the report.
2013-05-19 14:38:48 +02:00
Baptiste Mispelon
980ae2ab29
Fix #20447 : URL names given to contrib.auth.views are now resolved.
...
This commit also adds tests for the redirect feature of most auth views.
It also cleans up the tests, most notably using @override_settings instead
of ad-hoc setUp/tearDown methods.
Thanks to caumons for the report.
Conflicts:
docs/releases/1.6.txt
2013-05-19 14:36:38 +02:00
Andrew Godwin
9b22baddef
Merge pull request #1130 from vdboor/issue_20442_get_for_id
...
Fixed #20442 : NoneType error when fetching a stale ContentType with get_for_id
2013-05-19 05:33:17 -07:00
Aymeric Augustin
f7467181aa
Merge pull request #1160 from erikr/host-inet-postgres2
...
Fixed #11442 -- Postgresql backend casts all inet types to text
2013-05-19 04:57:10 -07:00
Erik Romijn
60d94c2a80
Fixed #11442 -- Postgresql backend casts all inet types to text
2013-05-19 13:28:09 +02:00
Łukasz Langa
660762681c
Fixed #20126 -- XViewMiddleware moved to django.contrib.admindocs.middleware
2013-05-19 13:18:35 +02:00
Aymeric Augustin
a7e2835276
Merge pull request #1028 from manfre/patch-2
...
Fixed #20340 - document required return value for disable_constraint_checking
2013-05-19 04:17:08 -07:00
Aymeric Augustin
cb86f707a0
Fixed #12747 -- Made reason phrases customizable.
2013-05-19 13:14:54 +02:00
Aymeric Augustin
3129d19071
Merge pull request #1152 from ambv/issue11915
...
Fixed #11915 : generic Accept-Language matches country-specific variants
2013-05-19 04:01:20 -07:00
Andrew Godwin
04e0fc029f
Merge pull request #1094 from senko/ticket_11160
...
Fixed #11160 : Formset non_form_errors returns ErrorList() if is_valid is not called
2013-05-19 03:56:14 -07:00
Andrew Godwin
7a99d1e167
Merge pull request #1134 from senko/ticket_18990
...
Fixed #18990 : Loaddata now complains if fixture doesn't exist
2013-05-19 03:54:29 -07:00
Łukasz Langa
26e3e7ecb5
Fixed #11915 : generic Accept-Language matches country-specific variants
2013-05-19 12:50:09 +02:00
Honza Kral
4ad1eb1c14
Fixed #12674 -- provide a way to override admin validation
...
Moved admin validation code to classes and have those be class
attributes to the ModelAdmin classes.
2013-05-19 12:42:52 +02:00
Andrew Godwin
264f8650e3
ModelState now freezes options and bases
2013-05-19 12:35:17 +02:00
Andrew Godwin
d58c98d73c
Fix proxy objects to respect !=
2013-05-19 12:27:17 +02:00
Senko Rasic
c44a2c40fe
Fixed #18990 -- Loaddata now complains if fixture doesn't exist
...
If the fixture doesn't exist, loaddata will output a warning.
The fixture named "initial_data" is exceptional though; if it
doesn't exist, the warning is not emitted. This allows syncdb and
flush management commands to attempt to load it without causing
spurious warnings.
Thanks to Derega, ptone, dirigeant and d1ffuz0r for contributions
to the ticket.
2013-05-19 11:31:27 +02:00
Marc Tamlyn
413735b239
Fix a typo in a comment.
2013-05-19 11:24:36 +02:00
Andrew Godwin
2d0e36ae37
Merge pull request #1142 from Pike/master
...
Fixed #20454 : Make Urdu (ur) recognized as RTL language
2013-05-19 02:23:20 -07:00
Senko Rasic
cc3b3ba93a
Fixed #18990 : Loaddata now complains if fixture doesn't exist
...
The fixture named "initial_data" is exceptional though; if it
doesn't exist, the error is not raised. This allows syncdb and
flush management commands to attempt to load it without causing
an error if it doesn't exist.
2013-05-19 10:56:09 +02:00
Marc Tamlyn
6fef4be632
Merge pull request #1141 from inglesp/typo
...
Typo in comment
2013-05-19 01:39:09 -07:00
Marc Tamlyn
c70ca4879e
Merge pull request #1116 from elektrrrus/ticket_20234_20236
...
Ticket 20234 20236
2013-05-19 01:32:41 -07:00
Axel Hecht
004fde0702
Make Urdu (ur) recognized as RTL language. Refs #20454
2013-05-19 11:29:24 +03:00
Peter Inglesby
cafcc22b01
Typo in comment
2013-05-19 09:28:36 +02:00
Ramiro Morales
0a50311063
Fixed #20004 -- Moved non DB-related assertions to SimpleTestCase.
...
Thanks zalew for the suggestion and work on a patch.
Also updated, tweaked and fixed testing documentation.
2013-05-18 19:04:34 -03:00
Claude Paroz
69523c1ba3
Updated contrib.humanize translation template
2013-05-18 23:11:39 +02:00
Emil Stenström
7d77e9786a
Fixed #20246 -- Added non-breaking spaces between values an units
2013-05-18 23:01:48 +02:00
Tome Cvitan
caf56ad174
Fixed #20440 -- Ensured CharField's max_length/min_length are integers
2013-05-18 22:30:24 +02:00
Karol Sikora
3eba8c7f7f
Fixed #20234 and #20236 -- SingleObjectMixin fixes
...
Added object on SingleObjectMixin returned context,
some code clanup.
2013-05-18 21:13:27 +02:00
Andrew Godwin
38a8cf1cdc
Fix state tests a little
2013-05-18 18:30:34 +02:00
Shai Berger
ff881aef53
Fixed #13958 -- problem reporting exception from \r-line-ended file
...
Thanks petrvanblokland for reporting and saz for the patch
2013-05-18 19:30:03 +03:00
Aymeric Augustin
5915800deb
Merge pull request #1127 from filias/20142
...
Fixed #20142 -- Added error handling for fixture setup
2013-05-18 08:42:36 -07:00
Florian Apolloner
dc8814bf7d
Merge branch 'master' of github.com:django/django
2013-05-18 17:39:14 +02:00
Łukasz Langa
bd97f7d0cb
Fixed #15201 : Marked CACHE_MIDDLEWARE_ANONYMOUS_ONLY as deprecated
2013-05-18 17:38:32 +02:00
Florian Apolloner
acd0bb39df
Fixed #14894 -- Ensure that activating a translation doesn't run into threading issues.
...
Thanks to maxbublis for the report and sergeykolosov for the patch.
2013-05-18 17:36:31 +02:00
Diederik van der Boor
86e761fee8
Fix NoneType error when fetching a stale ContentType with get_for_id
...
When a stale ContentType is fetched, the _add_to_cache() function
didn't detect that `model_class()` returns `None` (which it does by
design). However, the `app_label` + `model` fields can be used instead
to as local cache key. Third party apps can detect stale models by
checking whether `model_class()` returns `None`.
Ticket: https://code.djangoproject.com/ticket/20442
2013-05-18 17:31:28 +02:00
Donald Stufft
398841d6d3
Merge branch 'allow-any-iterable-for-choices'
2013-05-18 11:31:16 -04:00
Donald Stufft
a19e9d80ff
Fixed #20430 - Enable iterable of iterables for model choices
...
Allows for any iterable, not just lists or tuples, to be used as
the inner item for a list of choices in a model.
2013-05-18 11:14:05 -04:00
Aymeric Augustin
e73cb6391d
Merge pull request #1122 from ambv/issue13285
...
Fixed #13285 : populate_xheaders breaks caching
2013-05-18 08:05:48 -07:00
Filipa Andrade
5883ae56b3
Fixed #20142 -- Added error handling for fixture setup
...
TestCase._fixture_setup disables transactions so,
in case of an error, cleanup is needed to re-enable
transactions, otherwise following TransactionTestCase
would fail.
2013-05-18 17:05:45 +02:00
Łukasz Langa
64e11a68f1
Fixed #13285 : populate_xheaders breaks caching
2013-05-18 17:03:43 +02:00
Aymeric Augustin
3634948c88
Moved IgnorePendingDeprecationWarningsMixin in django.test.utils.
...
This mixin is useful whenever deprecating a large part of Django.
2013-05-18 16:49:15 +02:00
Olivier Sels
63a9555d57
Fixed #19436 -- Don't log warnings in ensure_csrf_cookie.
2013-05-18 16:17:46 +02:00
Aymeric Augustin
7d050e8e9c
Merge pull request #1113 from denibertovic/master
...
Fixed #18761 -- Added whitespace stripping to URLField and SlugField.
2013-05-18 07:11:11 -07:00
Deni Bertovic
186ec21a3d
Added stripping of whitespace for SlugField and URLField
2013-05-18 16:06:08 +02:00
Claude Paroz
710c59bf9b
Slightly reworked imports in contrib.auth.__init__
2013-05-18 16:01:47 +02:00
Jorge Bastida
dc43fbc2f2
Fixed #18998 - Prevented session crash when auth backend removed
...
Removing a backend configured in AUTHENTICATION_BACKENDS should not
raise an exception for existing sessions, but should make already
logged-in users disconnect.
Thanks Bradley Ayers for the report.
2013-05-18 15:58:29 +02:00
Jacob Burch
89955cc35f
Fixed #9595 -- Allow non-expiring cache timeouts.
...
Also, streamline the use of 0 and None between cache backends.
2013-05-18 15:39:42 +02:00
Florian Apolloner
e0df647143
Merge pull request #1101 from erikr/master
...
Fixed argument order for localized_fields to ensure backwards compatibility
2013-05-18 05:53:14 -07:00
Erik Romijn
1c1695668f
Fixed argument order for localized_fields to ensure backwards compatibility
2013-05-18 14:38:45 +02:00
Łukasz Langa
92ebb29c53
Fixes #19919 : get_language_from_request() disregards "en-us" and "en" languages
...
when matching Accept-Language
2013-05-18 14:37:04 +02:00
Florian Apolloner
16683f29ea
Merge pull request #1084 from erikr/master
...
Fixed #13546 -- Easier handling of localize field options in ModelForm
2013-05-18 05:15:15 -07:00
Marc Tamlyn
ef73a8eefd
Merge pull request #1083 from Markush2010/ticket20235
...
Fixes #20235 - MultipleObjectMixin requires object_list in kwargs
2013-05-18 05:14:28 -07:00
Erik Romijn
756b81dbd1
Fixed #13546 -- Easier handling of localize field options in ModelForm
2013-05-18 14:13:00 +02:00
Matthew Somerville
1c921cfac3
Fixed #20235 -- Use self.object_list if object_list not present in get_context_data kwargs.
...
This is so MultipleObjectMixin can be used in the same way as
SingleObjectMixin.
2013-05-18 14:10:40 +02:00
Andrew Godwin
7d041b9394
Split up test and make the State classes a bit better.
2013-05-18 13:49:56 +02:00
Andrew Godwin
028bbd15ca
Add a deconstruct() method to Fields.
...
This allows the field's initial argument to be obtained so it can be
serialised to, and re-created from, a textual format.
2013-05-18 13:48:57 +02:00
Senko Rasic
493aca453a
Fixed #11160 - Ensure full_clean is called from non_form_errors
...
Updated FormSet.non_form_errors() to ensure full_clean() has
been called before returning the errors.
2013-05-18 13:44:27 +02:00
Aymeric Augustin
06603d112c
Merge pull request #1090 from zyegfryed/ticket_20433
...
Fixed #20433 : extracted catalog compilation code from view.
2013-05-18 04:30:56 -07:00
zyegfryed
5e208d579d
Fixed #20433 : Extract catalog compilation code from javascript_catalog view.
2013-05-18 13:20:52 +02:00
Shai Berger
215647c0f7
Fixed #20386 - Introspection problem on Oracle
...
Made introspection always return a unicode as column name on Oracle.
Thanks aaugustin for review and suggestion to use force_text().
2013-05-18 14:19:26 +03:00
Jacob Burch
340115200f
Fixed #20432 -- Test failure in admin_views.
...
The failure was triggered by a cache leak.
2013-05-18 13:13:33 +02:00
Claude Paroz
8fd44b2551
Fixed #20356 -- Prevented crash when HTTP_REFERER contains non-ascii
...
Thanks srusskih for the report and Aymeric Augustin for the review.
2013-05-18 12:39:11 +02:00
Florian Apolloner
051cb1f4c6
Fixed #20411 -- Don't let invalid referers blow up CSRF same origin checks.
...
Thanks to edevil for the report and saz for the patch.
2013-05-18 12:32:47 +02:00
Andrew Godwin
331546f6ee
More conversion to a ContextManager schema_editor
2013-05-18 11:48:46 +02:00
Andrew Godwin
ce5bd42259
Turn SchemaEditor into a context manager
2013-05-18 11:06:30 +02:00
Baptiste Mispelon
9012a9e200
Fixed #20422 -- Applied makemessage's --ignore patterns to full path
...
Fix makemessage's --ignore patterns being applied to the full path
instead of the file name. Thanks to nnseva for the report and the
original patch.
2013-05-18 10:40:16 +02:00
Andrew Godwin
b31eea069c
Merge branch 'master' into schema-alteration
2013-05-18 10:21:31 +02:00
Eric Urban
c278e56baf
Corrected documentation on the constructor arguments of MultiPartParser
2013-05-17 19:49:33 -04:00
Claude Paroz
838f28974e
Fixed #20427 -- Moved a variable initialization in storage.py
...
This is fixing commit 4e70ad11d2
. Thanks mattias at elements.nl
for the report and Baptiste Mispelon for identifying the faulty
commit.
2013-05-17 18:31:52 +02:00
Aymeric Augustin
9c487b5974
Replaced an antiquated pattern.
...
Thanks Lennart Regebro for pointing it out.
2013-05-17 18:08:58 +02:00
Preston Holmes
b1bfd9630e
Remove unnecessary and problematic parent class from SuccessMessageMixin
...
refs #16319 , thanks to bmispelon for the catch
2013-05-17 08:59:06 -07:00
Claude Paroz
b16b72d415
Fixed #5472 --Added OpenLayers-based widgets in contrib.gis
...
Largely inspired from django-floppyforms. Designed to not depend
on OpenLayers at code level.
2013-05-17 13:33:40 +02:00
Mark Huang
0732c8e8c6
Fixed #20357 -- Allow empty username field label in `AuthentificationForm`.
2013-05-16 11:41:52 -04:00
Tim Graham
79715f267c
Fixed misleading heading on admindocs models page; refs #19712 .
2013-05-16 08:37:20 -04:00
Claude Paroz
0a29057ebe
Fixed #20415 -- Ensured srid is not localized in openlayers template
...
Thanks pierremarc07 at gmail.com for the report.
2013-05-16 13:48:38 +02:00
Mike Fogel
3188775174
Fix bug introduced in contrib.gis in 74f3884ae0
2013-05-15 14:07:34 -07:00
Mike Fogel
74f3884ae0
Fixed #20413 - Respect Query.get_meta()
2013-05-15 12:55:30 -07:00
Florian Apolloner
ebfb71c64a
Fixed previous commit. (Don't commit from DjangCon!)
2013-05-15 16:50:33 +02:00
Florian Apolloner
f6d1ca56c9
Don't unregister OSMGeoAdmin, other tests rely on it.
2013-05-15 16:47:03 +02:00
Florian Apolloner
4ecc6da20b
Removed unicode literals from PIL compat.
2013-05-15 09:00:09 +02:00
Daniel Lindsley
33793f7c3e
Fixed #19934 - Use of Pillow is now preferred over PIL.
...
This starts the deprecation period for PIL (support to end in 1.8).
2013-05-14 19:32:04 -07:00
Donald Stufft
8f0a4665d6
Recommend using the bcrypt library instead of py-bcrypt
...
* py-bcrypt has not been updated in some time
* py-bcrypt does not support Python3
* py3k-bcrypt, a port of py-bcrypt to python3 is not compatible
with Django
* bcrypt is supported on all versions of Python that Django
supports
2013-05-13 23:49:00 -04:00
Tim Graham
2c62a509de
Fixed #20136 - Fixed and expanded the docs for loaddata and model signals.
...
Thanks brandon@ and Anssi for the report.
2013-05-11 19:34:02 -04:00
Florian Apolloner
a6edde3260
Fixed embarrassing typo.
2013-05-11 22:57:01 +02:00
Florian Apolloner
01820466ca
Don't hardcode primary keys in gis tests.
2013-05-11 22:42:39 +02:00
Donald Stufft
11c7ec7993
Merge pull request #1052 from dstufft/bcrypt-python3
...
BCrypt on Python3
2013-05-11 10:53:18 -07:00
Florian Apolloner
2bf403ecbd
Fixed a regression from e23a5f9a47
.
...
Excluded postgis specific gis tests from other spatial databases.
Refs #17365 , #17366 , #18727 .
2013-05-11 18:29:08 +02:00
Donald Stufft
3070e8f711
Properly force bytes or str for bcrypt on Python3
2013-05-11 11:16:06 -04:00
Carl Meyer
9012833af8
Fixed #17365 , #17366 , #18727 -- Switched to discovery test runner.
...
Thanks to Preston Timmons for the bulk of the work on the patch, especially
updating Django's own test suite to comply with the requirements of the new
runner. Thanks also to Jannis Leidel and Mahdi Yusuf for earlier work on the
patch and the discovery runner.
Refs #11077 , #17032 , and #18670 .
2013-05-10 23:08:45 -04:00
Andrew Godwin
76d93a52cd
Make a start on operations and state (not sure if final layout)
2013-05-10 17:07:13 +01:00
Andrew Godwin
8a1f017777
Add root_node and leaf_node functions to MigrationGraph
2013-05-10 16:09:57 +01:00
Andrew Godwin
9ce8354672
First phase of loading migrations from disk
2013-05-10 16:00:55 +01:00
Andrew Godwin
cb4b0de49e
Merge branch 'master' into schema-alteration
2013-05-10 12:55:30 +01:00
Andrew Godwin
f6801a234f
Adding a dependency graph class and tests
2013-05-10 12:52:04 +01:00
Claude Paroz
7b00d90208
[py3] Made GeoIP tests pass with Python 3
2013-05-10 13:21:07 +02:00
Claude Paroz
465a29abe0
Fixed #20384 -- Forced GeoIP_open path argument to bytestring
...
Thanks Julian Wachholz for the report.
2013-05-10 13:21:07 +02:00
Luke Plant
f026a519ae
Fixed #19733 - deprecated ModelForms without 'fields' or 'exclude', and added '__all__' shortcut
...
This also updates all dependent functionality, including modelform_factory
and modelformset_factory, and the generic views `ModelFormMixin`,
`CreateView` and `UpdateView` which gain a new `fields` attribute.
2013-05-09 16:44:36 +01:00
Luke Plant
1e37cb37ce
Further removal of static admin validation that can fail erroneously
2013-05-09 16:44:36 +01:00
Aymeric Augustin
1906cb9360
Fixed conditional skipping of test for left/right lookup types.
...
connection.ops.spatial_version is None for some backends (eg. MySQL) and
the comparison fails on Python 3 with TypeError.
2013-05-09 17:39:56 +02:00
Alex Gaynor
a53d7a0a50
Made gis_terms be a set, rather than a dict with None for all keys.
2013-05-09 08:13:13 -07:00
Andrew Godwin
75bf394d86
Rest of the _meta.app_cache stuff. Schema tests work now.
2013-05-09 15:59:26 +01:00
Andrew Godwin
104ad0504b
Split out a BaseAppCache, make AppCache borg again, add _meta.app_cache
2013-05-09 15:16:43 +01:00
Aymeric Augustin
3d595c3bc3
Fixed #20215 -- Disabled persistent connections by default.
2013-05-09 15:42:14 +02:00
Andrew Godwin
941d23e548
Whoops. Need to be good and use six.
2013-05-09 14:13:15 +01:00
Andrew Godwin
ade34c44da
Improve error message for bad FK resolution
2013-05-09 14:04:07 +01:00
Alex Gaynor
f25fc5b220
Merge pull request #1049 from mfogel/remove-unescessary-parameter-checks
...
Remove unnecessary check on __set__ parameters.
2013-05-08 21:20:58 -07:00
Luke Plant
1556b1c3b7
Removed fragile admin validation of fields on ModelForm
...
Refs #19445
2013-05-09 00:49:05 +01:00
Alex Gaynor
ea3a378c22
Added an HTTP status code to Django's WSGI application that was missing (reason unknown).
2013-05-08 12:45:31 -07:00
Aymeric Augustin
86b4ac665a
[py3] Stopped iterating on exceptions. Refs #20025 .
2013-05-08 13:05:23 +02:00
Aymeric Augustin
e81e319f15
Fixed #20025 -- Pointed to a MySQLdb fork for Python 3.
...
Made a few minor compatibility adjustments.
2013-05-08 13:05:09 +02:00
Aymeric Augustin
1fff8daf88
Fixed test failures on MySQL.
...
Some tests failed when the time zone definitions were loaded in MySQL
and pytz wasn't installed. This setup isn't supported.
2013-05-08 13:03:36 +02:00
Claude Paroz
de8aa3a9a9
Fixed #20256 -- Corrected startproject --template help text
...
Thanks n0nam3 for the patch.
2013-05-08 09:55:40 +02:00
Mike Fogel
a22e15effc
Remove unnecessary check on __set__ parameters.
2013-05-07 21:50:59 -07:00
Tai Lee
99a6f0e77c
Fixed #20354 -- `makemessages` no longer crashes with `UnicodeDecodeError`
...
Handle the `UnicodeDecodeError` exception, send a warning to `stdout` with the
file name and location, and continue processing other files.
2013-05-07 21:22:05 +02:00
Florian Apolloner
371dbbe6e0
Ensured that the javascript_catalog view doesn't leak translations.
2013-05-05 15:52:07 +02:00
Claude Paroz
f3b3c569e7
One more changed import location of wraps
2013-05-04 13:29:40 +02:00
Claude Paroz
66c83dce07
Fixed #18351 -- Added X-Robots-Tag header to sitemaps
...
Thanks Michael Lissner for the report and initial patch, and
Tom Mortimer-Jones for working on the patch.
2013-05-04 12:08:15 +02:00
Claude Paroz
ac9daa0cbd
Systematically imported wraps from functools
2013-05-04 11:53:12 +02:00
Claude Paroz
f9f0e8da4d
Used ngettext in a formsets error message
...
Several languages will distinctly translate '%d or fewer forms'
depending on the variable.
2013-05-04 10:18:04 +02:00
Claude Paroz
9f7a01ef2b
Updated translation templates and removed en translations
...
"en" translations have been mistakenly committed in 87cc3da81
.
2013-05-02 16:25:23 +02:00
Florian Apolloner
a5becad909
Fixed #19252 -- Added support for wheel packages.
...
Signed-off-by: Jannis Leidel <jannis@leidel.info>
2013-05-01 13:46:06 +02:00
Aymeric Augustin
1267d2d9bc
Fixed #20330 -- Normalized spelling of "web server".
...
Thanks Baptiste Mispelon for the report.
2013-04-29 19:40:43 +02:00
Aymeric Augustin
90fe9141de
Fixed #18986 -- Improved error message for missing files
...
in CachedStaticFilesStorage. Thanks zyegfryed for his work on the patch.
2013-04-28 16:45:05 +02:00
Aymeric Augustin
4ff682c1ba
Fixed #18336 -- Doubled request_queue_size.
...
This reduces random failures to load static files with Google Chrome.
2013-04-28 10:47:07 +02:00
Claude Paroz
4769db6b5f
Fixed #20321 -- Added missing key name in MergeDict KeyError message
...
Thanks mark.harviston et gmail.com for the report.
2013-04-26 08:59:34 +02:00
Adrian Holovaty
6bccbc05a4
Converted a list comprehension into a generator expression in query_utils.py
2013-04-25 12:22:16 -05:00
Adrian Holovaty
5a5e1ac24d
Negligible formatting fixes in query_utils.py
2013-04-25 11:42:08 -05:00
Adrian Holovaty
86243d2e57
Removed an errant ipdb import from commit 9777442
2013-04-25 11:41:57 -05:00
Michael Manfre
f043cfe3e2
Fixed documentation of disable_constraint_checking
...
The docstring and base implementation of disable_constraint_checking do not indicate that a return value is expected for proper behavior.
2013-04-24 14:26:13 -03:00
Marti Raudsepp
172b50b722
Clearer explanation when exception has no message
...
"No exception supplied" is misleading; actually there is an exception,
but there's no message string.
2013-04-23 21:18:17 +03:00
Alex Gaynor
714161c864
Fix != operations on lazy objects.
2013-04-19 10:58:29 -07:00
Anton Baklanov
59d127e45f
Fixed #20276 -- Implemented __bool__ for MergeDict
...
MergeDict evaluates now to False if all contained dicts are empty.
Thanks til for the report and the initial patch.
2013-04-19 10:08:16 +02:00
Andrew Godwin
6e21a59402
Fix schema editor interaction with new transactions
2013-04-19 09:01:45 +01:00
Andrew Godwin
7f3678dc4c
Merge branch 'master' into schema-alteration
...
Conflicts:
django/db/backends/__init__.py
django/db/backends/mysql/base.py
django/db/backends/oracle/base.py
django/db/backends/oracle/creation.py
django/db/backends/postgresql_psycopg2/base.py
django/db/backends/sqlite3/base.py
django/db/models/fields/related.py
2013-04-18 17:16:39 +01:00
Simon Charette
356443fd95
Use `LOOKUP_SEP` in `get_or_create`.
2013-04-18 01:55:12 -04:00
Claude Paroz
53df89c0fe
Updated get_ogr_db_string in inspectapp tests to support MySQL/Spatialite
...
The OGRInspectTest.test_time_field does still not succeed with these
databases (even when removing the postgis guard), but at least it's now
possible to setup a datasource.
2013-04-15 20:27:58 +02:00
Claude Paroz
1628dfd0b9
Properly used test skipping in OGRInspectTest TestCase
2013-04-15 19:38:24 +02:00
Matthew Tretter
a506b6981b
Fixed #18231 -- Made JavaScript i18n not pollute global JS namespace.
...
Also, use Django templating for the dynamic generated JS code and use
more idiomatic coding techniques.
Thanks Matthew Tretter for the report and the patch.
2013-04-14 17:45:01 -03:00
Claude Paroz
be9ae693c4
Fixed #17840 -- Generalized named placeholders in form error messages
...
Also fixed plural messages for DecimalField.
2013-04-13 18:55:50 +02:00
Baptiste Mispelon
9ac4dbd7b5
Fixed #4592 : Made CheckboxSelectMultiple more like RadioSelect
...
I refactored RadioSelect and CheckboxSelectMultiple to
make them inherit from a base class, allowing them to share
the behavior of being able to iterate over their subwidgets.
Thanks to Matt McClanahan for the initial patch and to
Claude Paroz for the review.
2013-04-13 16:37:27 +02:00
Baptiste Mispelon
c4186c2fec
Fixed #4117 : Apply id attribute to the outer <ul> of RadioSelect
2013-04-13 12:23:25 +02:00
Baptiste Mispelon
844fbc85c1
Fixed #19874 : Apply id attribute to the outer <ul> of CheckboxSelectMultiple
2013-04-13 11:09:47 +02:00
Preston Timmons
751b007c98
Modified test_utils to work with unittest2 discovery.
2013-04-12 15:00:48 -06:00
Claude Paroz
b04fd579d5
Fixed #20237 (again) Allowed binary parameter to assertContains
2013-04-12 20:12:42 +02:00
Baptiste Mispelon
ab686022f8
Fixed #20211 : Document backwards-incompatible change in BoundField.label_tag
...
Also cleaned up label escaping and consolidated the test suite regarding
label_tag.
2013-04-12 10:17:17 +02:00
Claude Paroz
ddfc68379f
Changed a deprecated warn() call in libgeos
2013-04-11 11:01:17 +02:00
Claude Paroz
fe01404bb9
Fixed #20237 -- Reenabled assertContains with binary parameter
...
Thanks Baptiste Mispelon for the review.
2013-04-11 10:38:24 +02:00
Baptiste Mispelon
e7b9c11c3f
Fixed #20231 -- Don't use allow_lazy on smart_split
2013-04-10 13:05:29 +02:00
Tobias McNulty
161c4da588
Fixed #14019 -- Initialize `SQLInsertCompiler.return_id` attribute.
2013-04-08 13:41:36 -06:00
Jannis Leidel
ed576b69f9
Merge pull request #938 from darklow/ticket_20111
...
Added more precise message level for succcess and warning messages
2013-04-08 04:56:57 -07:00
Kaspars Sprogis
3be368c73e
Fix #20111 Added more precise message level for succcess and warning messages
2013-04-08 14:54:03 +03:00
Baptiste Mispelon
f9dc1379b8
Fix #15126 : Better error message when passing invalid options to ModelForm.Meta.
2013-04-07 19:08:53 +02:00
Andrew Jesaitis
5ab66dea50
Explicitly removes dismissCalendar
...
Uses the removeEvent function in core.js to remove the dismissCalendar
function from the document click event.
Fixes #4045 .
2013-04-06 13:50:09 +02:00
Andrew Jesaitis
4509a1be1f
Explicitly removes dismissClock
...
Uses the removeEvent function in core.js to remove the function from
the document click event.
Refs #4045 .
2013-04-06 13:50:09 +02:00
Simon Charette
216580e034
Fixed #20207 -- Handle ManyToManyField with a unicode name correctly.
2013-04-05 15:09:53 -04:00
Preston Holmes
a49e7dd2a3
Fixed #20114 -- support custom project login_url in tests
...
Thanks to Matias Bordese for the patch
2013-04-05 09:03:28 -07:00
Aymeric Augustin
23229061fc
Removed LocaleMiddleware from settings template.
...
It was added in 3f1c7b7053
.
Single language sites should always be translated in LANGUAGE_CODE,
regardless of the browser's Accept-Language. Having LocaleMiddleware
enabled can result in having some parts, like the admin, translated
in an unexpected language, typically if someone browses a non-English
website on a system set up in English. Since most websites won't be
translated in multiple languages — especially at the time they're
created — it's better not to enable LocaleMiddleware by default.
Thanks Ramiro for the feedback.
2013-04-05 13:08:50 +02:00
Alex Gaynor
1aca9d93be
Fixed a line that was overindented.
2013-04-04 15:16:16 -07:00
Tim Graham
9191ce6643
Merge pull request #985 from intgr/atomic_typo
...
Fixed typo in transaction.Atomic docstring
2013-04-04 04:05:33 -07:00
Brendon Crawford
cd1ca26702
Adds generators support for email backends that do not support it.
2013-04-03 19:42:31 -07:00
Carl Meyer
7ccbe6a4fa
Fix contrib.messages tests for discovery.
2013-04-03 15:30:34 -06:00
Baptiste Mispelon
c250f9c99b
Fixed #20038 -- Better error message for host validation.
2013-04-03 14:27:20 -06:00
Marti Raudsepp
bd9b324a99
Fix typo in transaction.Atomic docstring
2013-04-03 16:49:48 +03:00
Preston Timmons
fde2e4fd6e
Modified auth to work with unittest2 discovery.
2013-04-02 21:59:45 -06:00
Preston Timmons
e3cfbaaca4
Modified sitemaps to work with unittest2 discovery.
2013-04-02 20:12:35 -06:00
Preston Timmons
629d704d5f
Modified messages to work with unittest2 discovery.
2013-04-02 20:12:30 -06:00
Preston Timmons
756a70b48d
Modified formtools to work with unittest2 discovery.
2013-04-02 20:12:26 -06:00
Preston Timmons
8aedde0385
Updated flatpages tests for unittest2 discovery.
2013-04-02 20:12:24 -06:00
Preston Timmons
7fd1571b2e
Modified admindocs tests to work with unittest2 discovery.
2013-04-02 20:12:15 -06:00
Simon Charette
8d05e6c0c7
Fixed deprecation warnings introduced by 97774429ae
.
2013-04-01 17:32:09 -04:00
Julien Phalip
2f81a0ca65
Fixed #20169 -- Ensured that the WSGI request's path is correctly based on the `SCRIPT_NAME` environment parameter or the `FORCE_SCRIPT_NAME` setting, regardless of whether or not those have a trailing slash. Thanks to bmispelon for the review.
2013-04-01 12:04:44 -07:00
Claude Paroz
8c41bd93c2
Fixed #16737 -- Support non-ascii column names in inspectdb
...
Thanks moof at metamoof.net for the report.
2013-04-01 19:59:57 +02:00
Claude Paroz
dcf563071f
Fixed #5014 -- Guessed max_digits and decimal_places for SQLite
...
Decimal is treated as float on SQLite, hence inspectdb can only
guess max_digits and decimal_places arguments.
2013-04-01 18:32:57 +02:00
Claude Paroz
51028f50b6
Fixed getting max_digits for MySQL decimal fields
...
Refs #5014 .
2013-04-01 18:17:00 +02:00
Claude Paroz
b474ffe63a
Fixed #20172 -- Ensured urlize supports IPv4/IPv6 addresses
...
Thanks Marc Aymerich for the report and the initial patch.
2013-04-01 15:37:37 +02:00
Claude Paroz
2bcbca3451
Updated some 'Dive Into Python' links
2013-04-01 14:04:41 +02:00
Joe Friedl
2d0db67813
Fixed #20167 -- Preserve the traceback of `ImportError`s in `import_by_path`.
...
Thanks @carljm for the review.
2013-03-31 23:00:06 -04:00
Claude Paroz
3ff3212713
Fixed #19220 -- Prevented decimals to be displayed in scientific notation
...
Thanks nebstrebor for the report and antofik for the patch.
2013-03-31 22:39:01 +02:00
Claude Paroz
5c55e0fc98
Removed site cache clearing in TestCase._fixture_setup
...
The test suite doesn't seem to suffer from this removal. Tests
should probably take care themselves to clear caches if they
depend on it.
2013-03-30 20:17:31 +01:00
Alisson
80b658f5aa
Remove unnecessary if conditions
...
if obj it None, it's None, there's no need to check it
2013-03-30 12:22:28 +01:00
matiasb
86aaff75d0
Fixed #20059 -- Updated humanize tests to force 'en' language setting.
2013-03-30 12:19:39 +01:00
Baptiste Mispelon
5080311998
Fixed #20130 -- Regression in {% cache %} template tag.
2013-03-30 12:13:08 +01:00
Christoph Sieghart
465b01f065
Fixed #19998 -- Fixed --ignorenonexistent support for XML based fixtures.
2013-03-30 11:59:50 +01:00
Claude Paroz
83f182da66
Fixed #14540 -- Added Porto-Rico specific formats
...
Thanks rosarior for the report and the file proposal.
2013-03-29 16:55:13 +01:00
Claude Paroz
86b1c31689
Fixed #19954 -- Fixed MySQL _last_executed decoding
...
Queries can contain binary data undecodable with utf-8. In this
case, using the 'replace' errors mode when decoding seems like
an acceptable representation of the query.
Thanks Marcel Ryser for the report.
2013-03-28 20:08:37 +01:00
Gavin Wahl
ec04fd1344
Fixed spelling errors
2013-03-28 11:16:53 -06:00
Rocky Meza
26ad3abadf
Fixed spelling of "consistent" in admin/options.py
2013-03-28 09:10:13 -06:00
Claude Paroz
244e765a94
Updated translation templates
2013-03-28 10:06:11 +01:00
Claude Paroz
0a22f7aad2
Added Burmese language
...
Thanks to Yhal Htet Aung for the translation work.
2013-03-28 10:01:30 +01:00
Claude Paroz
ab76467d54
Added Ossetic language
...
Thanks to Xwybylty Soslan for the translation work.
2013-03-28 09:54:16 +01:00
Claude Paroz
65ad1b1f85
Replaced escaped by real characters in LANG_INFO structure
2013-03-28 09:46:40 +01:00
Claude Paroz
c5084e7557
Updated translations from Transifex
...
Polish, Telugu, Georgian, Azerbaijani, Norwegian Bokmål, Basque,
Dutch, Thai, Spanish (Argentina), Afrikaans.
2013-03-28 09:24:07 +01:00
Andreas
35cab0f8e4
Fixed #20016 : worked around Jython not having a buffer.
2013-03-27 13:39:52 -05:00
Jacob Kaplan-Moss
9e462f8101
Fixed #20078 : don't allow filtering on password in the user admin.
2013-03-27 11:24:36 -05:00
Jacob Kaplan-Moss
f6989e559c
Merge remote-tracking branch 'ptone/18985-fix'
2013-03-27 10:34:28 -05:00
Donald Stufft
25f2acfed0
Fixed #20138 -- Added BCryptSHA256PasswordHasher
...
BCryptSHA256PasswordHasher pre-hashes the users password using
SHA256 to prevent the 72 byte truncation inherient in the BCrypt
algorithm.
2013-03-26 13:26:57 -04:00
Anssi Kääriäinen
e17fa9e877
Fixed #20091 -- Oracle null promotion for empty strings
2013-03-26 14:19:54 +02:00
Adam Wentz
a4b8a4b632
Fixed #20121 -- Removed LogEntry.get_admin_url's hard-coded path.
...
Updated LogEntry.get_admin_url to use 'reverse' instead
of a hard-coded path.
2013-03-25 23:45:27 -04:00
Claude Paroz
066bf42675
Removed forced typecasting of help_text/label Field arguments
...
In any case, setting those variables to non-ascii utf-8 bytestrings
is now considered a programming error.
2013-03-25 21:38:21 +01:00
Andrew Jesaitis
d9b12ecbe6
Moved removeChildren to core.js
...
The function removeChildren is a general utility that other functions
might want to use.
Fixes #4120 . Thanks arvin for the initial patch.
2013-03-25 09:38:34 +01:00
Andrew Jesaitis
0a9ea56056
Moved cancelEventPropagation into core.js
...
The cancelEventPropagation function is a general utility function that
can be reused by other widgets. Refs #4120 .
2013-03-25 09:32:12 +01:00
Andrew Jesaitis
d5824ef69d
Removed quickElement from calendar.js
...
The function quickElement in calendar.js is a duplicate of the
quickElement function in core.js. Refs #4120 .
2013-03-25 09:32:02 +01:00
Preston Holmes
e79b857a07
Fixed #18985 -- ensure module level deprecations are displayed
...
Also don't compete with -W CLI option.
Thanks to Aymeric Augustin for the catch, and Claude Paroz for the patch.
2013-03-24 22:06:02 -07:00
Simon Charette
151938ddb5
Merge pull request #946 from matiasb/minor-flatpage-translation-fix
...
Fixed #20117 -- Added missing translation override to fix flatpages test.
2013-03-24 21:08:16 -07:00
Anssi Kääriäinen
9c4882b391
Fixed Oracle specific failures in multicolumn joins
...
Refs #19385
2013-03-24 22:56:40 +02:00
Jannis Leidel
24234555a0
Merge pull request #885 from loic/ticket19541
...
Fixed #19541 -- Fixed BaseHandler to enable reversing URLs in response middlewares...
2013-03-24 13:27:18 -07:00
Loic Bistuer
521765f63d
Fixed #19541 -- Fixed BaseHandler to enable reversing URLs in response middlewares
...
and streamed responses with respect to per-request urlconf.
2013-03-25 03:19:19 +07:00
Anssi Kääriäinen
0e0eb8a955
Fixed field.rel.field_name handling
...
This is a regression fix to multicolumn joins. Refs #19385 .
2013-03-24 20:59:56 +02:00
Anssi Kääriäinen
9572a3992b
Python 2.6 compatibility for #19385
2013-03-24 19:00:24 +02:00
Anssi Kääriäinen
97774429ae
Fixed #19385 again, now with real code changes
...
The commit of 266de5f9ae
included only
tests, this time also code changes included...
2013-03-24 18:40:40 +02:00
Aymeric Augustin
e16c48e001
Fixed #15124 -- Changed the default for BooleanField.
...
Thanks to the many contributors who updated and improved the patch over
the life of this ticket.
2013-03-24 13:47:01 +01:00
Aymeric Augustin
f5dbb566ee
Fixed #17550 -- Removed a workaround for a bug in flup 1.0.1.
...
This reverts commit 948a833eb7
.
flup appears to be dead, and this fix breaks legitimate uses of Django.
Refs #8490 .
2013-03-24 10:57:38 +01:00
Claude Paroz
76aecfbc4b
Fixed #9055 -- Standardized behaviour of parameter escaping in db cursors
...
Previously, depending on the database backend or the cursor type,
you'd need to double the percent signs in the query before passing
it to cursor.execute. Now cursor.execute consistently need percent
doubling whenever params argument is not None (placeholder substitution
will happen).
Thanks Thomas Güttler for the report and Walter Doekes for his work
on the patch.
2013-03-23 17:11:10 +01:00
matiasb
6985f0c09b
Fixed #20117 -- Added missing translation override to fix flatpages test.
2013-03-23 12:22:44 -03:00
Jannis Leidel
e7514e4978
Merge pull request #942 from stephrdev/trac-18000
...
Fixed #18000 -- Moved the code to handle goto requests to an extra WizardView method.
2013-03-23 05:29:28 -07:00
Stephan Jaekel
b614c47f8c
Added some class attributes to pass initial form lists to the WizardView without the need to add them in the as_view call.
2013-03-23 12:24:34 +01:00
Stephan Jaekel
46246c6624
Moved the code to handle goto requests in a extra WizardView method.
2013-03-23 12:02:23 +01:00
Russell Keith-Magee
930af661ab
Fixed #20048 , #20060 -- Modified tests for contrib apps sensitive to custom User models.
...
Thanks to matiasb for the report of #20060 and the draft patch for #20048 .
2013-03-23 09:57:48 +08:00
Aymeric Augustin
f7d945e325
Fixed #16350 -- Forced capitalization in template.
...
This improves rendering in some foreign languages.
2013-03-22 22:41:13 +01:00
Claude Paroz
164528acc8
Fixed #20108 -- Fixed filepath_to_uri decoding error
...
This was a regression due to unicode_literals usage. Thanks Ivan
Virabyan for the report and the initial patch.
2013-03-22 17:55:12 +01:00
Marc Tamlyn
829dc3c5a6
Fixed #20094 - Be more careful when checking for Iterator
...
Python 2.6 has some different behaviour when checking
isinstance(foo, collections.Iterator).
2013-03-22 17:31:29 +01:00
Andrew Gorcester
f9ab543720
Fixed #20084 -- Provided option to validate formset max_num on server.
...
This is provided as a new "validate_max" formset_factory option defaulting to
False, since the non-validating behavior of max_num is longstanding, and there
is certainly code relying on it. (In fact, even the Django admin relies on it
for the case where there are more existing inlines than the given max_num). It
may be that at some point we want to deprecate validate_max=False and
eventually remove the option, but this commit takes no steps in that direction.
This also fixes the DoS-prevention absolute_max enforcement so that it causes a
form validation error rather than an IndexError, and ensures that absolute_max
is always 1000 more than max_num, to prevent surprising changes in behavior
with max_num close to absolute_max.
Lastly, this commit fixes the previous inconsistency between a regular formset
and a model formset in the precedence of max_num and initial data. Previously
in a regular formset, if the provided initial data was longer than max_num, it
was truncated; in a model formset, all initial forms would be displayed
regardless of max_num. Now regular formsets are the same as model formsets; all
initial forms are displayed, even if more than max_num. (But if validate_max is
True, submitting these forms will result in a "too many forms" validation
error!) This combination of behaviors was chosen to keep the max_num validation
simple and consistent, and avoid silent data loss due to truncation of initial
data.
Thanks to Preston for discussion of the design choices.
2013-03-21 01:27:24 -07:00
Carny Cheng
aaec4f2bd8
Fixed #18839 - Field.__init__() now calls super().
2013-03-20 16:20:57 -07:00
Anssi Kääriäinen
0ff12c28d0
Removed unused import
2013-03-21 00:50:48 +02:00
Matthew Wood
a7960bcb35
Fixed #18972 -- Refactored bundled wsgi server's chunking algorithm.
...
Thanks to amosonn at yahoo.com for the report, @doda for the initial patch and
@datagrok for the revamped logic and test case.
2013-03-20 18:46:26 -04:00
Florian Apolloner
a45d06ca3d
Fixed #19972 -- Fixed overflow issue in admin changelist pages.
...
Thanks to loic84 for the report and patch.
2013-03-20 17:00:25 +01:00
Claude Paroz
23490a2394
Revert "Fixed 19895 -- Made second iteration over invalid queryset raise an exception too"
...
This reverts commit 2cd0edaa47
.
This commit was the cause of a memory leak. See ticket for more details.
Thanks Anssi Kääriäinen for identifying the source of the bug.
2013-03-20 10:41:53 +01:00
Paul Collins
9a85ad89c2
Fixed #16319 -- added SuccessMessageMixin to contrib.messages
...
Thanks martinogden for the initial patch and d1ffuz0r for tests.
2013-03-19 21:02:55 -07:00
Preston Holmes
7a3409fc64
Merge pull request #931 from catalanojuan/fix-admin-log-dependency-on-user-id-field-20088
...
Fixed #20088 -- Changed get_admin_log not to depend on User id field
2013-03-19 15:56:01 -07:00
konarkmodi
bc4111ba68
Fixed #18003 -- Preserved tracebacks when re-raising errors.
...
Thanks jrothenbuhler for draft patch, Konark Modi for updates.
2013-03-19 15:42:39 -07:00
Juan Catalano
054ce2aa02
Fixed #20088 -- Changed get_admin_log not to depend on User id field
...
Before this change, the get_admin_log method would expect User model's
FK to be named `id`. When changing that FK name, admin/index.html
rendering would fail.
This includes:
* Changed the use of id for the use of pk property.
* Added a regression test that fails without the patch.
This commit refs #20088 .
2013-03-19 19:30:43 -03:00
Deric Crago
9d6ecc6bc6
Fixed #19327 -- Added handling of double login attempts in admin.
...
Thanks to Krzysztof Jurewicz for initial patch and
adupin for tests.
2013-03-18 17:11:07 -07:00
Aymeric Augustin
31b5275235
Fixed #13260 -- Quoted arguments interpolated in URLs in reverse.
2013-03-18 23:58:22 +01:00
Aymeric Augustin
6197935152
Fixed #19968 -- Dropped support for PostgreSQL < 8.4.
2013-03-18 21:16:29 +01:00
Aymeric Augustin
9dc5702932
Fixed #19456 -- Avoid infinite recursion when tracing LazyObject.__init__.
...
Thanks blaze33 for the patch.
2013-03-18 11:22:43 +01:00
Aymeric Augustin
0efafa4c54
Fixed #18447 -- Made LazyObject unwrap on dict access.
...
Thanks Roman Gladkov and Zbigniew Siciarz.
2013-03-18 11:10:19 +01:00
Aymeric Augustin
7cf0f04230
Clarified that constant_time_compare doesn't protect string lengths.
2013-03-18 09:45:44 +01:00
Aymeric Augustin
20a91cce04
Fixed #17037 -- Added a --all option to diffsettings.
2013-03-18 00:03:58 +01:00
Aymeric Augustin
68905695b8
Fixed #19510 -- Race condition in template loading.
...
Thanks Kronuz and regebro.
2013-03-17 23:56:07 +01:00
Aymeric Augustin
0df8ff3dbe
Fixed #19550 -- Made the filtered select widget wider in the admin.
...
Thanks Claude and Julien for the review.
2013-03-17 22:48:52 +01:00
Aymeric Augustin
912b5d2a6b
Fixed #19697 -- Added a deployment checklist.
2013-03-17 19:21:36 +01:00
Anssi Kääriäinen
f403653cf1
Fixed #19635 -- Made fields pickleable
2013-03-17 15:32:50 +02:00
Aymeric Augustin
3beabb5afd
Merge pull request #902 from evildmp/BLANK_CHOICE_NONE
...
Fixed #20043 -- Removed unused BLANK_CHOICE_NONE
2013-03-17 03:15:49 -07:00
Aymeric Augustin
9d4a5b00f1
Stopped using non-standard __globals__ and __code__ attributes.
...
Some alternative implementations don't have them.
Closes #19944 .
2013-03-17 10:44:28 +01:00
Aymeric Augustin
e11ccc76d3
Updated bundled version of six.
2013-03-17 10:44:28 +01:00
Anssi Kääriäinen
9bc8d887c7
Fixed memory leak in tests
...
The AssertNumQueriesContext didn't reset connection's use_debug_cursor
in case there was an exception. This resulted in leaking query strings
into connection.queries. Maximum memory use pre-patch was around 700MB,
post-patch it is around 200MB for Django's test suite.
2013-03-17 11:28:52 +02:00
Claude Paroz
74a80a5169
Merge pull request #910 from bmispelon/ticket-20058
...
Fix #20058 : Make compilemessages use stdout instead of stderr.
2013-03-16 14:45:48 -07:00
Baptiste Mispelon
d5683bd06b
Fix #20058 : Make compilemessages use stdout instead of stderr.
2013-03-16 19:48:40 +01:00
Baptiste Mispelon
babd1090ee
Fix 20061: remove out of date comment.
2013-03-16 18:55:24 +01:00
Baptiste Mispelon
0122a98dad
Fixed #20055 -- Add url, email, and number input types to admin CSS.
2013-03-15 18:54:19 -04:00
Claude Paroz
18e990fa96
Fixed #16110 -- Fixed GeometryField odd behaviour regarding null values
...
Thanks slinkp for the report and the initial patch.
2013-03-15 21:45:33 +01:00
Aymeric Augustin
3f2befc931
Deprecated django.views.defaults.shortcut.
2013-03-14 20:30:23 +01:00
Claude Paroz
2f121dfe63
Fixed #17051 -- Removed some 'invalid' field error messages
...
When the 'invalid' error message is set at field level, it masks
the error message raised by the validator, if any.
2013-03-14 17:03:43 +01:00
Claude Paroz
34d098665d
Add a specific error message for URLValidator
2013-03-14 15:26:30 +01:00
Claude Paroz
9883551d50
Fixed #20039 -- Fixed has_changed form detection for required TypedChoiceFields
...
Thanks Florian Apolloner for the report and the review.
Also fixes #19643 .
2013-03-14 14:49:07 +01:00
Anssi Kääriäinen
6b4834952d
Fixed #16649 -- Refactored save_base logic
...
Model.save() will use UPDATE - if not updated - INSERT instead of
SELECT - if found UPDATE else INSERT. This should save a query when
updating, but will cost a little when inserting model with PK set.
Also fixed #17341 -- made sure .save() commits transactions only after
the whole model has been saved. This wasn't the case in model
inheritance situations.
The save_base implementation was refactored into multiple methods.
A typical chain for inherited save is:
save_base()
_save_parents(self)
for each parent:
_save_parents(parent)
_save_table(parent)
_save_table(self)
2013-03-14 11:01:47 +02:00
Daniele Procida
a4c9a4a5fe
removed unused BLANK_CHOICE_NONE
2013-03-13 21:26:15 +00:00
Baptiste Mispelon
4fa7f3cdd9
Fix #20022 : Correctly handle prefixes with url-unsafe characters in reverse().
2013-03-13 18:19:29 +01:00
Aymeric Augustin
93af822c00
Improved recovery when the connection is closed in an atomic block.
2013-03-13 15:17:40 +01:00
Aymeric Augustin
83a416f5e7
Made atomic usable when autocommit is off.
...
Thanks Anssi for haggling until I implemented this.
This change alleviates the need for atomic_if_autocommit. When
autocommit is disabled for a database, atomic will simply create and
release savepoints, and not commit anything. This honors the contract of
not doing any transaction management.
This change also makes the hack to allow using atomic within the legacy
transaction management redundant.
None of the above will work with SQLite, because of a flaw in the design
of the sqlite3 library. This is a known limitation that cannot be lifted
without unacceptable side effects eg. triggering arbitrary commits.
2013-03-13 15:17:40 +01:00
Claude Paroz
747f7d2549
Fixed #20036 -- Improved GEOS version string parsing
...
Thanks chikiro.spam at gmail.com for the report.
2013-03-13 09:52:33 +01:00
Anssi Kääriäinen
d3f00bd570
Refactored qs.add_q() and utils/tree.py
...
The sql/query.py add_q method did a lot of where/having tree hacking to
get complex queries to work correctly. The logic was refactored so that
it should be simpler to understand. The new logic should also produce
leaner WHERE conditions.
The changes cascade somewhat, as some other parts of Django (like
add_filter() and WhereNode) expect boolean trees in certain format or
they fail to work. So to fix the add_q() one must fix utils/tree.py,
some things in add_filter(), WhereNode and so on.
This commit also fixed add_filter to see negate clauses up the path.
A query like .exclude(Q(reversefk__in=a_list)) didn't work similarly to
.filter(~Q(reversefk__in=a_list)). The reason for this is that only
the immediate parent negate clauses were seen by add_filter, and thus a
tree like AND: (NOT AND: (AND: condition)) will not be handled
correctly, as there is one intermediary AND node in the tree. The
example tree is generated by .exclude(~Q(reversefk__in=a_list)).
Still, aggregation lost connectors in OR cases, and F() objects and
aggregates in same filter clause caused GROUP BY problems on some
databases.
Fixed #17600 , fixed #13198 , fixed #17025 , fixed #17000 , fixed #11293 .
2013-03-13 10:44:49 +02:00
Anssi Kääriäinen
d744c550d5
Fixed #19964 -- Removed relabel_aliases from some structs
...
Before there was need to have both .relabel_aliases() and .clone() for
many structs. Now there is only relabeled_clone() for those structs
where alias is the only mutable attribute.
2013-03-12 21:33:47 +02:00
Aymeric Augustin
679af4058d
Restricted a workaround for a bug in Python to the affected versions.
2013-03-12 14:05:10 +01:00
Aymeric Augustin
885d98d24a
Fixed #20028 -- Made atomic usable on callable instances.
...
Thanks Anssi for the report.
2013-03-12 10:52:16 +01:00
Aymeric Augustin
4846e2b744
Removed unused imports.
...
One of these functions didn't exist anymore.
2013-03-12 10:09:04 +01:00
Aymeric Augustin
a50e0c9fdc
Fixed a refactoring error in ba5138b1
.
...
Thanks Florian for tracing the error.
2013-03-11 22:40:13 +01:00
Simon Charette
bc7a10299f
Fixed #20010 -- Make sure `last_executed_query` contains it's associated parameters on Oracle.
...
Also removed some unused imports.
2013-03-11 17:30:23 -04:00
Aymeric Augustin
1b12e248ea
Fixed #11569 -- Wrapped DatabaseCache._base_set in an atomic block.
...
The atomic block provides a clean rollback to a savepoint on failed writes.
The ticket reported a race condition which I don't know how to test.
2013-03-11 22:19:48 +01:00
Jacob Kaplan-Moss
571b2d139b
Deprecated django.contrib.comments.
2013-03-11 15:38:40 -05:00
Aymeric Augustin
f2f98abb95
Avoided closing the database connection within a transaction.
...
Refs #9437 .
2013-03-11 21:08:49 +01:00
Aymeric Augustin
1adb7b3c38
Ported layermapping for autocommit.
2013-03-11 20:03:17 +01:00
Aymeric Augustin
3710a918b2
Switched the admin to use @transaction.atomic.
2013-03-11 19:58:08 +01:00
Aymeric Augustin
3f1efc44f6
Fixed loaddata command, broken in the previous merge.
2013-03-11 15:43:42 +01:00
Aymeric Augustin
e654180ce2
Improved the API of set_autocommit.
2013-03-11 15:10:58 +01:00
Aymeric Augustin
f32100939e
Abused atomic for transaction handling in TestCase.
...
It isn't necessary to disable set_autocommit since its use is prohibited
inside an atomic block. It's still necessary to disable the legacy
transaction management methods for backwards compatibility, until
they're removed.
2013-03-11 15:05:05 +01:00
Aymeric Augustin
d04964e70d
Used commit_on_success_unless_managed in loaddata.
2013-03-11 15:05:05 +01:00
Aymeric Augustin
4dbd1b2dd8
Used commit_on_success_unless_managed to make ORM operations atomic.
2013-03-11 15:05:05 +01:00
Aymeric Augustin
423c0d5e29
Added a safety net for developers messing with autocommit.
2013-03-11 15:05:04 +01:00
Aymeric Augustin
107d9b1d97
Added an option to disable the creation of savepoints in atomic.
2013-03-11 15:05:04 +01:00
Aymeric Augustin
557e404127
Re-ordered functions by deprecation status.
2013-03-11 15:04:10 +01:00
Aymeric Augustin
ac37ed21b3
Deprecated TransactionMiddleware and TRANSACTIONS_MANAGED.
...
Replaced them with per-database options, for proper multi-db support.
Also toned down the recommendation to tie transactions to HTTP requests.
Thanks Jeremy for sharing his experience.
2013-03-11 15:04:05 +01:00
Aymeric Augustin
f7245b83bb
Implemented atomic_if_autocommit.
...
It disables transaction management entirely when AUTOCOMMIT is False.
2013-03-11 14:48:55 +01:00
Aymeric Augustin
09ba70f9f1
Made transaction management work even before the first SQL query.
...
Thanks Florian again.
2013-03-11 14:48:55 +01:00
Aymeric Augustin
7c46c8d5f2
Added some assertions to enforce the atomicity of atomic.
2013-03-11 14:48:55 +01:00
Aymeric Augustin
d7bc4fbc94
Implemented an 'atomic' decorator and context manager.
...
Currently it only works in autocommit mode.
Based on @xact by Christophe Pettus.
2013-03-11 14:48:55 +01:00
Aymeric Augustin
4b31a6a9e6
Added support for savepoints in SQLite.
...
Technically speaking they aren't usable yet.
2013-03-11 14:48:55 +01:00
Aymeric Augustin
e264f67174
Refactored implementation of savepoints.
...
Prepared for using savepoints within transactions in autocommit mode.
2013-03-11 14:48:55 +01:00
Aymeric Augustin
918f44e3ae
Moved standard SQL for savepoints in the base backend.
...
These methods are only called when uses_savepoints = True anyway.
2013-03-11 14:48:54 +01:00
Aymeric Augustin
3bdc7a6a70
Deprecated transaction.is_managed().
...
It's synchronized with the autocommit flag.
2013-03-11 14:48:54 +01:00
Aymeric Augustin
ba5138b1c0
Deprecated transaction.commit/rollback_unless_managed.
...
Since "unless managed" now means "if database-level autocommit",
committing or rolling back doesn't have any effect.
Restored transactional integrity in a few places that relied on
automatically-started transactions with a transitory API.
2013-03-11 14:48:54 +01:00
Aymeric Augustin
14aa563f51
Removed superfluous code now that connections use autocommit by default.
2013-03-11 14:48:54 +01:00
Aymeric Augustin
5e27debc5c
Enabled database-level autocommit for all backends.
...
This is mostly a documentation change.
It has the same backwards-incompatibility consequences as those
described for PostgreSQL in a previous commit.
2013-03-11 14:48:54 +01:00
Aymeric Augustin
cfc114e00e
Removed _enter/_leave_transaction_management.
...
The goal is to make all databases share a common, autocommit-based,
implementation.
2013-03-11 14:48:54 +01:00
Aymeric Augustin
1617557ae3
Added BaseDatabaseWrapper.ensure_connection.
...
This API is useful because autocommit cannot be managed without an open
connection.
2013-03-11 14:48:54 +01:00
Aymeric Augustin
7b4815b455
Expressed the dirty flag handling logic in terms of autocommit.
2013-03-11 14:48:54 +01:00
Aymeric Augustin
cd364efa00
Stopped flipping the uses_savepoints feature at runtime.
2013-03-11 14:48:54 +01:00
Aymeric Augustin
af9e9386eb
Enabled autocommit for PostgreSQL.
...
For users who didn't activate autocommit in their database options, this
is backwards-incompatible in "non-managed" aka "auto" transaction state.
This state now uses database-level autocommit instead of ORM-level
autocommit.
Also removed the uses_autocommit feature which lost its purpose.
2013-03-11 14:48:54 +01:00
Aymeric Augustin
8717b0668c
Separated autocommit and isolation level handling for PostgreSQL.
...
Autocommit cannot be manipulated independently from an open connection.
This commit introduces a minor change in behavior: entering transaction
management forces opening a databasse connection. This shouldn't be
backwards incompatible in any practical use case.
2013-03-11 14:48:54 +01:00
Aymeric Augustin
f515619494
Added an API to control database-level autocommit.
2013-03-11 14:48:53 +01:00
Aymeric Augustin
7aacde84f2
Made transaction.managed a no-op and deprecated it.
...
enter_transaction_management() was nearly always followed by managed().
In three places it wasn't, but they will all be refactored eventually.
The "forced" keyword argument avoids introducing behavior changes until
then.
This is mostly backwards-compatible, except, of course, for managed
itself. There's a minor difference in _enter_transaction_management:
the top self.transaction_state now contains the new 'managed' state
rather than the previous one. Django doesn't access
self.transaction_state in _enter_transaction_management.
2013-03-11 14:48:53 +01:00
Aymeric Augustin
ce76fbfc5a
Fixed #20019 -- Ensured HttpRequest.resolver_match always exists.
...
Obviously it isn't set until the URL is resolved.
2013-03-10 23:28:19 +01:00
Ramiro Morales
7fca4416c7
Made (make|compile)messages check for availability of gettext commands.
...
Refs #19584 .
2013-03-10 17:31:11 -03:00
Florian Apolloner
8aefd30379
Fixed BinaryField support on Oracle.
2013-03-09 23:39:14 +01:00
Claude Paroz
360217fc87
Fixed #19171 -- Allowed coordinate transforms with custom SRIDs
...
Thanks reidpr at lanl.gov for the report.
2013-03-09 17:46:20 +01:00
Claude Paroz
e6f5b7eacd
Fixed #9806 -- Allowed editing GeometryField with OpenLayersWidget
...
Thanks Paul Winkler for the initial patch.
2013-03-09 16:10:28 +01:00
Claude Paroz
f3d1aebed1
Reformatted slightly openlayers.js
2013-03-09 15:08:16 +01:00
Claude Paroz
6a91b63842
Fixed #19923 -- Display tracebacks for non-CommandError exceptions
...
By default, show tracebacks for management command errors when the
exception is not a CommandError.
Thanks Jacob Radford for the report.
2013-03-09 12:38:45 +01:00
Claude Paroz
5e80571bf9
Fixed #16594 -- Added wkt 3D support for GEOS geometries
...
This requires GEOS >= 3.3.0 to function properly. On previous
versions, the Z dimension will simply not appear in the wkt.
Disabled OpenLayers editing for 3D geometries (unsupported).
2013-03-09 12:02:22 +01:00
Claude Paroz
8a92139d8a
Replaced proj4 testing by a regex
2013-03-08 22:52:41 +01:00
Claude Paroz
cbfb8ed53b
Fixed a regression in forms changed_data
...
Thanks Loic Bistuer for spotting the regression and the initial
patch. Refs #16612 .
2013-03-08 18:19:24 +01:00
Loic Bistuer
6983a1a540
Fixed #15363 -- Renamed and normalized to `get_queryset` the methods that return a QuerySet.
2013-03-08 10:11:45 -05:00
Aymeric Augustin
477d737e1e
Merge pull request #850 from bmispelon/ticket-19916
...
Fix 19916. Smarter tokenizing of contrib.comment's templatetags arguments
2013-03-07 12:12:29 -08:00
Alex Gaynor
bbbd698c7a
Added a ManyToManyField(db_constraint=False) option, this allows not creating constraints on the intermediary models.
2013-03-07 11:24:51 -08:00
Baptiste Mispelon
81804ae474
Fix 19916. Smarter tokenizing of contrib.comment's templatetags arguments.
2013-03-07 19:30:38 +01:00