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