Commit Graph

6717 Commits

Author SHA1 Message Date
Jay Cox eef95ea96f Fixed #24696 -- Made CSRF_COOKIE computation lazy.
Only compute the CSRF_COOKIE when it is actually used. This is a
significant speedup for clients not using cookies.

Changed result of the “test_token_node_no_csrf_cookie” test:  It gets
a valid CSRF token now which seems like the correct behavior.

Changed auth_tests.test_views.LoginTest.test_login_csrf_rotate to
use get_token() to trigger CSRF cookie inclusion instead of changing
request.META["CSRF_COOKIE_USED"] directly.
2015-05-02 19:45:14 -04:00
Adam Zapletal 0894643e40 Fixed #23387 -- Kept "Save as new" button after validation errors in admin.
When "Save as new" is chosen and errors occur, only show the "Save as new"
button and not the other save buttons.

Thanks to Tino de Bruijn for doing the real work on this fix.
2015-05-02 19:41:10 -04:00
Luis Del Giudice 69ddc1b3da Fixed #24693 -- Added label and label_lower property to Model._meta 2015-05-02 16:58:18 +02:00
Markus Holtermann 811d7870a5 Moved migration exception classes to shared module
Thanks Aymeric Augustin for the review.
2015-05-02 12:54:44 +02:00
Tim Graham 29e90f3ae0 Fixed model_regress test failure on non-ASCII path; refs #24717. 2015-04-30 07:48:21 -04:00
Markus Holtermann 63f9b633f9 Fixed #24725 -- Allowed renaming of target models in ManyToMany relations
This is a regression caused by introducing rendered migration states in
1aa3e09c20 and the _meta refactoring in fb48eb0581.

Thanks to Danilo Bargen for reporting the issue and Marten Kenbeek and
Tim Graham for triaging the bug and providing the initial test case.
2015-04-30 13:27:29 +02:00
David D. Riddle 31e6c9c8e3 Fixed #24717 -- Fixed model_regress test failure on RHEL6 SCL
The test failed on RHEL6 systems running python 2.7 from a RedHat
Software Collection (SCL) because this test runs an external python
script with a stripped system environment. RedHat SCLs work by setting
a number of system environment variables when these are stripped out by
this test the python 2.7 interpreter is no longer able to function
properly because it can not find the system libraries needed.

Now we use use mock to modify the system environment directly.
2015-04-29 12:28:24 -04:00
Markus Bertheau 4a438e400b Fixed #13008 -- Added more Cache-Control headers to never_cache() decorator. 2015-04-28 12:07:02 -04:00
Aric Coady 9c2d8cde77 Fixed #24719 -- Restored the ability to use interators as queryset related object filters. 2015-04-28 10:51:27 -04:00
Alasdair Nicol eaeea6f947 Fixed #24714 -- Used more specific assertions than assertEqual in tests. 2015-04-28 09:31:04 -04:00
Tim Graham 3b133ffb8b Fixed template_tests failure on Windows. 2015-04-28 07:55:27 -04:00
Alasdair Nicol d91321e8be Used assertIsInstance in tests. 2015-04-27 08:40:36 -04:00
Harry 40768ec29d Fixed #24707 -- Improved error reporting for explicitly imported uncallable views 2015-04-26 19:19:15 +02:00
Artis Avotins 86aaffa5a3 Fixed #24689 -- Fixed DetailView methods with deferred QuerySet. 2015-04-25 19:42:00 -04:00
Tim Graham 2d76b61dc2 Fixed #24649 -- Allowed using Avg aggregate on non-numeric field types. 2015-04-25 13:06:14 -04:00
Tim Graham 26996e2d55 Fixed #24499 -- Dropped support for PostGIS 1.5. 2015-04-25 12:21:16 -04:00
Markus Holtermann faad6070ee Fixed #24701 -- Converted model manager names to unicode in migrations
Thanks to Reto Aebersold for reporting the issue and Tim Graham and
Claude Paroz for the review.
2015-04-25 18:17:06 +02:00
Michal Čihař 76d26d8922 Fixed #24063 -- Allowed locale variants supported by gettext.
The locale code can contain a variant after @, so allowed that.
2015-04-24 20:31:16 -04:00
Andrei Kulakov 8a1824d465 Fixed #24643 -- Added get_context_data() method to FormMixin 2015-04-24 20:17:29 -04:00
Claude Paroz a37dcfd0a3 Delayed GDAL check for OSMGeoAdmin 2015-04-24 20:30:23 +02:00
Claude Paroz d9bcba9b29 Removed many HAS_GEOS conditional imports 2015-04-24 20:30:23 +02:00
Claude Paroz 61d09e61f5 Lazy loading of GEOS functions 2015-04-24 20:30:23 +02:00
Josh Smeaton 143255c8bb Fixed #22598 -- Allowed make_aware() to work with ambiguous datetime 2015-04-24 13:55:40 -04:00
Tim Graham 8efea1b8d5 Fixed #24526 -- Combined django.request/security loggers with the root logger.
Thanks Carl Meyer for review.
2015-04-24 11:07:42 -04:00
Claude Paroz 6d685b1674 Fixed failures with older Spatialite versions 2015-04-23 18:54:07 +02:00
Preston Timmons 65a7a0d9ee Improved display of template loader postmortem on debug page.
This now works for multiple Django engines and recursive loaders.
Support for non-Django engines is still pending.

Refs #15053.
2015-04-22 14:49:00 -05:00
Preston Timmons fc21471526 Fixed #15053 -- Enabled recursive template loading. 2015-04-22 14:49:00 -05:00
Claude Paroz ea27e26b09 Deprecated legacy GeoManager/GeoQuerySet methods 2015-04-22 19:54:17 +02:00
Claude Paroz 71e20814fc Added MySQL support to GIS functions 2015-04-22 19:54:17 +02:00
Claude Paroz 44bdbbc316 Added Spatialite support to GIS functions 2015-04-22 19:54:17 +02:00
Claude Paroz d9ff5ef36d Fixed #24214 -- Added GIS functions to replace geoqueryset's methods
Thanks Simon Charette and Tim Graham for the reviews.
2015-04-22 19:54:17 +02:00
Oliver A Bristow 4cd727095d Fixed #24681 -- Removed Unicode bug in BrokenLinkEmailMiddleware 2015-04-21 22:02:04 +02:00
Markus Holtermann b93690c465 Fixed #24573 -- Considered new related models for reloading
Thanks tttomekkk for the report.
2015-04-21 11:35:45 +02:00
Marten Kenbeek 1a1f16d67d Fixed #24591 -- Optimized cloning of ModelState objects.
Changed ModelState.clone() to create a shallow copy of self.fields
and self.managers.
2015-04-20 19:53:21 -04:00
Simon Charette b44ed404c7 Fixed #24654 -- Based ordering circular references detection on columns.
Thanks to Elmar Bucher for the report and Tim for the review.
2015-04-20 15:49:58 -04:00
Jon Dufresne b5e0eede40 Fixed #22394 -- Refactored built-in datetime lookups to transforms. 2015-04-20 15:11:11 -04:00
Marten Kenbeek 039d7881b4 Refs #24397 -- Sped up model reloading in ProjectState.
Created bulk_update() context manager on StateApps. Sped up unregistering
models in reload_models() by using this context mananger.
2015-04-20 14:42:23 -04:00
Preston Timmons fb267a1d85 Updated template tests to create their own engine.
This continues work to treat Django templates as a library.
2015-04-20 09:11:37 -05:00
Yoong Kang Lim 36eab95e7f Fixed #24667 --- Repaired model_fields cardinality test 2015-04-20 09:40:01 -04:00
Claude Paroz f54c0ec06e Fixed #24658 -- Added missing Meta attribute in schema tests
Without that, the Note model would be initially created and then
the tests using that model failed when run in isolation.
2015-04-19 00:05:58 +02:00
Shai Berger d5a0accaa0 Fixed #24595 Oracle test failure
The only problem for Oracle was the test, which tested nullity on
text/char fields -- but Oracle interprets_empty_strings_as_null.
2015-04-18 18:52:30 +03:00
Claude Paroz 36e90d1f45 Stopped special-casing postgres-specific tests
Refs #23879.
2015-04-18 15:17:49 +02:00
Claude Paroz 6b6d13bf6e Stopped conditional discovery of gis_tests apps
Refs #23879.
2015-04-18 15:17:49 +02:00
Anoop Thomas Mathew 2400329508 Fixed #24349 -- Limited domain name labels to 63 characters in EmailValidator 2015-04-17 18:08:33 -04:00
Claude Paroz 02260ea3f6 Fixed #24595 -- Prevented loss of null info in MySQL field alteration
Thanks Simon Percivall for the report, and Simon Charette and Tim
Graham for the reviews.
2015-04-17 10:25:15 +02:00
Tim Graham ed336a1a5d Fixed gis_tests when run without GIS dependencies. 2015-04-16 19:59:53 -04:00
Tim Graham 33b1635a90 Fixed fixtures tests failure on Python 2 with non-ASCII path. 2015-04-16 13:44:07 -04:00
Yitzhak Clark 188a241880 Fixed #21652 -- Added notification when processing objects in loaddata
Added a running count of the objects processed by loaddata when
verbosity >= 3.
2015-04-16 09:42:18 -04:00
Anssi Kääriäinen 355c5edd93 Fixed #24605 -- Fixed incorrect reference to alias in subquery.
Thanks to charettes and priidukull for investigating the issue, and to
kurevin for the report.
2015-04-16 09:22:00 -04:00
Anssi Kääriäinen fb5c7748da Fixed #24615 -- ordering by expression not part of SELECT
Fixed queries where an expression was used in order_by() but the
expression wasn't in the query's select clause (for example the
expression could be masked by .values() call)

Thanks to Trac alias MattBlack85 for the report.
2015-04-16 09:40:47 +02:00