Commit Graph

11465 Commits

Author SHA1 Message Date
Peter Harley 2724cdbff6 Fixed #18355 -- Added ordering options to list based generic views.
Added MultipleObjectMixin.ordering and get_ordering().

Refs #21450.
2014-08-15 11:09:47 -04:00
Tim Graham 64bb122c3d Fixed #23287 -- Updated error message for classonlymethod decorator. 2014-08-15 09:03:43 -04:00
Tim Graham e122facbd8 Fixed #23269 -- Deprecated django.utils.remove_tags() and removetags filter.
Also the unused, undocumented django.utils.html.strip_entities() function.
2014-08-15 08:20:02 -04:00
Gabriel Muñumel deed00c0d8 Fixed #23162 -- Renamed forms.Field._has_changed() to has_changed(). 2014-08-15 08:14:45 -04:00
Claude Paroz 12adcd505e Complemented 1.6 release notes for 457c16d0d6
And accessorily added missing bits fixing #23293.
Forward port of 2cbafd814 from stable/1.7.x
2014-08-15 10:14:55 +02:00
Andrew Godwin 4d2f9c38e8 Fixed #23288: deconstruct() ignoring related_name 2014-08-14 19:47:22 -07:00
areski 3021453285 Fixed #20133 -- Added summary to admin deletion confirmation pages.
Thanks jonash for the suggestion and initial patch.
2014-08-14 13:56:23 -04:00
Ramiro Morales 0bfb538661 Fixed #23291 -- Don't add Unicode varname/value to environment.
Windows doesn't like that and it causes 114 failures in the
admin_scripts tests with Python 2.x.
2014-08-14 12:22:21 -03:00
Jaap Roes b3660d28f3 Fixed #23260: Added generator support to defaultfilters.unordered_list. 2014-08-14 10:43:44 -04:00
Tim Graham fe38be96c1 Fixed #21579 -- Made LocaleMiddleware respect script prefix.
Thanks buettgenbach at datacollect.com for the report and patch.
2014-08-14 09:36:41 -04:00
Tim Graham cf79b57ad0 Fixed #21132 -- Removed the useless app_name argument to AdminSite.
Thanks MarkusH for the report and Florian for review.
2014-08-14 09:05:51 -04:00
Claude Paroz 055d95fce0 Fixed #23265 -- Used system-specific encoding in runserver
Thanks SpaceFox for the report.
2014-08-14 12:08:06 +02:00
Claude Paroz b42e5ca058 Fixed #22971 -- Properly parsed RFC 2388 encoded headers
Thanks homm for the report, Cea Stapleton for patch improvements
and Ian Cordasco, Christian Schmitt and Tim Graham for the review.
2014-08-14 11:45:43 +02:00
Maxime Turcotte 25e06bca57 Fixed #18767 -- Fixed admin calendar for other locales than English.
Refactored openCalendar function from DateTimeShortcuts.js. Now, when
entered manually in the input field, the date will show up correctly on
the calendar for locales that don't use "-" for separator.

Thanks charettes for revivew and Alexey Boriskin for some of the patch.
2014-08-13 20:36:26 -04:00
zsoldosp 01801edd37 Fixed #22646: Added support for the MySQL ssl-ca option to dbshell. 2014-08-13 18:29:42 -04:00
Trey Hunner 468236889f Removed tabs from an admin CSS file. 2014-08-13 13:02:26 -04:00
Walter Doekes e0e28bfe71 Fixed #20368 -- Made TECHNICAL_500 more robust against bad input.
This limits large variables and avoids non-utf-8 in the TECHNICAL_500 output.
2014-08-13 12:56:26 -04:00
Tim Graham 7f4be9cbc2 Fixed flake8 warning. 2014-08-13 12:33:18 -04:00
areski 3687aa0093 Simplified admin delete confirmation templates using {% elif %}.
Thanks jonash for the initial patch; refs #20133.
2014-08-13 10:27:17 -04:00
Trey Hunner 6868643063 Added newlines to the ends of CSS, HTML, and JavaScript files missing them. 2014-08-12 19:22:09 -04:00
Collin Anderson 85c22dd4c4 Fixed #23262 -- Made SelectFilter2.js move items on enter Key press. 2014-08-12 16:17:00 -04:00
Claude Paroz 2cc8ffe258 Fixed #22985 -- Made call_command accept option name parameter
Thanks giulettamasina for the report and Tim Graham for the review.
2014-08-12 21:53:29 +02:00
Andrew Godwin 8f9862cd4d Fixed #23275: Unmanaged models kept by autodetector, ignored by ops 2014-08-12 12:49:20 -07:00
Tim Graham a9fd740d22 Fixed #23276 -- Deprecated passing views as strings to url(). 2014-08-12 13:15:40 -04:00
Anssi Kääriäinen f7dba61881 Avoided creation of deferred model from another deferred model
Also never create deferred model when no attrs are deferred.
2014-08-12 14:58:10 +03:00
Josh Smeaton 5b0375ec3e Fixed #23001 -- Fixed mixing defer and annotations 2014-08-12 14:58:10 +03:00
Jaap Roes e92b057e06 Fixed #23261 -- Deprecated old style list support for unordered_list filter. 2014-08-11 07:04:33 -04:00
Anssi Kääriäinen dfadbdac6a Fixed #16426 -- deletion of 1000+ objects with relations on SQLite
SQLite doesn't work with more than 1000 parameters in a single query.
The deletion code could generate queries that try to get related
objects for more than 1000 objects thus breaking the limit. Django now
splits the related object fetching into batches with at most 1000
parameters.

The tests and patch include some work done by Trac alias NiGhTTraX in
ticket #21205.
2014-08-11 12:47:37 +03:00
Anubhav Joshi cdfdcf4b70 Fixed #23266 -- Prevented queries caused by type checking lookup values
Small modifications done by committer.
2014-08-11 09:51:57 +03:00
Rajiv Makhijani f0b358880a Fixed #23259 -- Corrected insertion order of extra() select_params
A regression caused queries to produce incorrect results for cases where
extra(select) is excluded by values() but included by extra(order_by)

The regression was caused by 2f35c6f10f.
2014-08-11 09:33:18 +03:00
Florian Apolloner f915d39afe Fixed remove_field for spatialite schema changes. 2014-08-10 16:24:19 +02:00
Florian Apolloner 61d783f3d7 Made sqlite's remove_field behave like the base backend. 2014-08-10 13:31:06 +02:00
Claude Paroz dc462a8ed5 Removed unused migrate option 2014-08-09 17:13:00 +02:00
Andrew Godwin 27b6f28435 Fixed #23264: Schema backends honour db_constraint 2014-08-09 17:50:00 +10:00
Justin Hamade 8fe406864c Fixed #22336 -- Added path matching for makemessages ignore option
This fixes a regression introduced by 9012a9e200.
2014-08-08 22:54:30 +02:00
Tim Graham 09c0fa2c53 Fixed a non-deterministic test; refs #23099. 2014-08-08 15:42:48 -04:00
Tim Graham f53b1c779b Fixed #23099 -- Removed usage of deprecated initial data in Django's test suite.
Thanks Claude Paroz for assistance with debugging the tests.
2014-08-08 14:01:59 -04:00
Andrew Godwin 51673c146e Don't treat .pyc/pyo files as migrations. Refs #23237 among others. 2014-08-08 09:57:31 +10:00
Jacob Haslehurst f676305ece Fixed #22982 -- Added GenericRelatedObjectManager.__str__. to prevent crash.
Thanks bendavis78 for the report.

Forwardport of 29585e9b6a from stable/1.7.x
2014-08-07 14:44:20 -04:00
Tim Graham f9f9f3ad60 Fixed flake8 warning. 2014-08-07 10:11:15 -04:00
Andrew Godwin 157c42a976 Use smart_text rather than naive forcing-to-unicode for state reading 2014-08-07 22:34:07 +10:00
Andrew Godwin 5257b85ab8 Fixed #23226: Model options appearing as bytes type in migrations 2014-08-07 12:13:37 +10:00
Andrew Godwin 8d93b21ec9 Moved index dropping after FK dropping to please MySQL and fix test 2014-08-07 11:59:11 +10:00
Andrew Godwin dfe86449c9 Fixed #23244: Error altering FK to non-FK in migrations 2014-08-07 11:52:31 +10:00
Alex Hill 938da36cb1 Fixed #21603 -- Fixed complex RawQuerySets queries on some versions of SQLite. 2014-08-06 08:41:34 -04:00
Tim Graham fcd42a4819 Removed code that assumed BooleanField could be null.
Such a field will no longer pass model validation.
2014-08-05 07:49:53 -04:00
Andrew Godwin 5f6558f82f Stop errors on older Spatialite versions that miss some tables 2014-08-05 21:09:37 +10:00
Shai Berger 746f2a4bed Fixed #23061: Avoided setting a limit on a query for get with select_for_update on Oracle
Thanks Michael Miller for reporting the issue.
2014-08-05 03:12:08 +03:00
Sitesh Shrivastava 8193a46c6e Fixed a typo in comment in django/utils/version.py 2014-08-04 10:23:37 -04:00
Stanislas Guerra 98e8da3709 Fixed #16311 -- Added a RelatedOnlyFieldListFilter class in admin.filters. 2014-08-04 09:39:02 -04:00
Mihail Milushev bf5382c6e5 Fixed #22234 -- Replaced OS-specific code with subprocess.call() in dbshell.
This fixes escaping of special characters on Windows.
2014-08-04 09:21:03 -04:00
Vincent-Vega 5e06fa1469 Fixed #22745 -- Prevented reevaluation of ModelChoiceField's queryset when accesssing BoundField's attrs.
Thanks Christian Schmitt for review.
2014-08-04 07:47:37 -04:00
Tim Graham 399cf303cb Corrected a comment in forms/forms.py; refs #16612. 2014-08-04 06:57:09 -04:00
Andrew Godwin d4f62a7ae7 Fixed #23161: Drop PostGIS geography fields correctly 2014-08-04 14:06:33 +10:00
Andrew Godwin 059f5d17c5 Fixed #23163: Align user help text with migrations 2014-08-04 13:57:02 +10:00
Andrew Godwin b508c1c317 Fixed #23153: Properly recreate spatialite triggers on alter table 2014-08-04 13:15:32 +10:00
Andrew Godwin c06e124b5e Fixed #23091: CreateModel and AddField were clashing with deferred SQL 2014-08-04 11:59:29 +10:00
Simon Charette cbb29af1aa Fixed #23160 -- Correctly rename models with self referential fields.
Thanks to whitews AT gmail for the report.
2014-08-03 15:27:01 -04:00
Florian Apolloner 2d542bf60c Ensured that Paginator.page_range works the same on Python 2 and 3.
This somewhat fixes #23088, refs 23140.
2014-08-03 21:10:00 +02:00
Florian Apolloner 40fb6a5601 Revert "Fixed #23088 -- Used `six` `range` type in `Paginator.page_range`."
This reverts commit 6508db2ff9.

Refs #23088.
2014-08-03 21:08:24 +02:00
qingfeng 0d23450e81 Fixed #19802 -- Fixed HttpResponse.set_cookie() with unicode data on Python 2.
Thanks django at patrickbregman.eu for the report.
2014-08-03 12:50:25 -04:00
Tim Graham 0f2ceee025 Fixed #23151 -- Deprecated RegexField.error_message.
Thanks Baptiste Mispelon for the suggestion.
2014-08-03 11:21:01 -04:00
Baptiste Mispelon 44169a00c1 Removed unnecessary code in ManyToManyField.deconstruct() 2014-08-03 15:15:24 +02:00
Baptiste Mispelon 7432533932 Added missing logic to TimeField.deconstruct().
If auto_now or auto_now_add was used then the serialized
field in the migration contained unnecessary `editable` and
`blank` arguments.
2014-08-03 14:02:21 +02:00
Baptiste Mispelon 72f1eb48df Fixed #23156 -- Added missing BinaryField.deconstruct() method. 2014-08-03 13:02:31 +02:00
Tim Graham d28396f526 Fixed #23144 -- Dropped support for MySQL 5.0, 5.1. 2014-08-02 10:28:40 -04:00
Baptiste Mispelon de0a22be35 Fixed two typos in docstrings. 2014-08-02 15:14:13 +02:00
Tim Graham 8f9d6e83a0 Fixed #23145 -- Dropped support for Oracle < 11.1 2014-08-01 19:32:00 -04:00
Tim Graham a2479f46f3 Fixed #7220 -- Allowed AbstractBaseUser.last_login to be null.
Thanks veena for the suggestion and Simon Charette and Kévin Etienne for reviews.
2014-08-01 17:51:49 -04:00
Tim Graham a9bdce7e55 Fixed #23108 -- Dropped support for PostgreSQL 8.4 & PostGIS 1.3, 1.4.
Thanks Claude Paroz for the review.
2014-08-01 10:26:00 -04:00
Petras Zdanavičius 8b7347220f Fixed #23103 -- Annotated ImageField file with image and content_type attributes.
Thanks Jeremy Dunck for the suggestion and Nick Sanford for review.
2014-08-01 09:30:58 -04:00
Mitar 1ed6fbcf44 Fixed #21940 -- Added kwargs to contribute_to_class() of model fields..
Thanks Kronuz for the suggestion.
2014-08-01 07:41:28 -04:00
Niclas Olofsson cdc25ac474 Fixed #22808 -- Made ModelMultipleChoiceField validation more robust to invalid data types..
Thanks Mattias Lindvall for the report and inital patch.
2014-07-31 15:29:46 -04:00
Jürno Ader 76f2f58a18 Fixed #22956 -- Made PermissionManager.get_by_natural_key() use the correct database for content type lookup. 2014-07-31 13:35:27 -04:00
Anubhav Joshi 0dd05c9e66 Fixed #16383 -- Raised the AttributeError raised in property of an object when used in a template.
Thanks maraujop for the report and Hiroki and Tim Graham for review.
2014-07-31 09:13:55 -04:00
Nick Sandford 9d9f0acd7e Fixed #13163 -- Added ability to show change links on inline objects in admin.
Thanks DrMeers for the suggestion.
2014-07-31 08:07:28 -04:00
Tim Graham 9a922dcad1 Fixed flake8 warnings. 2014-07-31 08:06:46 -04:00
areski 97a38de230 Fixed #23112 -- Field.get_choices tries to index an iterable 2014-07-30 21:35:02 +02:00
Christoph Heer d47409831f Fixed #23067 -- Updated docs to use django-admin 2014-07-30 14:14:03 -04:00
areski 67d7da5fb9 Fixed #23107 -- Made runserver output respect --no-color. 2014-07-30 12:58:53 -04:00
Kit La Touche 17e75d03f9 Fixed #23129 -- Added 'true' and 'false' to `NullBooleanField`.
JavaScript serializations of forms will sometimes render the boolean
values as the strings 'true' and 'false', in lower case. Rather than
repeat boilerplate in the JavaScript to circumvent this, it seems
reasonable to allow Django to understand the lower-case versions of the
booleans.
2014-07-29 19:55:55 -04:00
Andrew Godwin 096a5de5d2 Fixed #23092: Squashing handles external dependencies 2014-07-29 10:22:00 -07:00
Andrew Godwin 8ebd6d35d7 Fixed #23090: Document and enforce not double-squashing migrations 2014-07-29 10:02:59 -07:00
Andrew Godwin a338e07735 Fixed #23101: Prefer doing deletes before creates in autodetector.
Makes declined or missed renames still work (but drop data).
2014-07-29 09:38:51 -07:00
Andrew Godwin 4418559138 Fix soft_applied in a way that doesn't break tests 2014-07-29 09:24:07 -07:00
Andrew Godwin 5ed3834cbe Make detect_soft_applied exit correctly on non-create migrations 2014-07-29 09:20:03 -07:00
Marc Tamlyn ef9f109013 Fixed #22962 -- Default values for ArrayField with migrations.
Fields normally try to force the default value to a string. As
translatable strings are not valid default values for ArrayField, we can
remove this behaviour which was causing issues with some migrations.

Thanks to @schinckel for the report.
2014-07-29 10:37:11 +01:00
Andrew Godwin d6e73a876d Fixed #23121: AlterModelOptions operation not changing state right 2014-07-28 10:47:28 -07:00
Andrew Godwin cb60d22bd9 Fixed #23100: Individual FK creation missing dependencies 2014-07-28 10:32:43 -07:00
Simon Charette 80708ac772 Fixed #23113 -- ChoiceInput.render should take specified attrs into account.
Thanks to Tim Graham for the review.
2014-07-28 10:01:07 -04:00
Aymeric Augustin 729e4ae4f0 Fixed #23074 -- Avoided leaking savepoints in atomic.
Thanks Chow Loong Jin for the report and the initial patch.
2014-07-28 14:30:41 +02:00
Florian Apolloner 2f73b527dd Fixed #23098 -- Checked that lazy choices are not evaluated too soon
Thanks Matthieu Agopian for the report.
2014-07-27 13:31:25 +02:00
Florian Apolloner 2ab0ed7b28 Only warn about initial data if fixtures have been found. 2014-07-27 13:23:16 +02:00
Abraham Martin e1347e9253 Fixed #23101 db_table wasn't copied in deconstruct
Forward port of 999758fc7a from
stable/1.7.x
2014-07-26 10:00:02 -07:00
Andrew Godwin 805774df1f Fixed #22944: Bad dependency on FK alteration in autodetector 2014-07-26 09:22:19 -07:00
qingfeng 08451f17d0 Fixed #23060 -- Prevented UnicodeDecodeError in debug templatetag 2014-07-26 18:03:19 +02:00
areski 90faa196f6 Fixed #22873 -- Renamed use_debug_cursor to force_debug_cursor to clarify the behavior. 2014-07-26 10:38:46 -04:00
Anubhav Joshi 5cdb8f8c1e Fixed #16617 -- Added 'value' to BaseValidator params.
Also allowed overriding the default messages in subclasses of BaseValidator.

Thanks sperrygrove for initial patch.
2014-07-26 10:03:00 -04:00
James Bennett 6305878688 Merge pull request #2967 from hirokiky/fix23070
Fixed #23070 -- not to break the debug page by callable setting with __slots__
2014-07-26 14:39:14 +02:00
Federico Frenguelli 6eed751162 Fixed #22887 -- Added comment for translators on unique_for_date error message 2014-07-26 13:55:20 +02:00
Hiroki KIYOHARA d0889863de Fixed code to solve #23070 problem
Added a class to wrap callable in settings:
* Not to call in the debug page (#21345).
* Not to break the debug page if the callable forbidding to set attributes (#23070).

Thanks @bmispelon for giving me some advice.
2014-07-26 12:35:51 +02:00
Tim Graham b8cb5ba708 Fixed #23083 -- Fixed runserver reloading when deleting a file.
Thanks Collin Anderson for the report and hirokiky for the fix.
2014-07-25 13:23:52 -04:00
Andrew Godwin 08681d7757 Fixed #23085: Better error message for PostGIS 1.5/bad custom fields 2014-07-25 09:49:51 -07:00
Andrew Godwin 6f386b0acb Restore support for reading __latest__ for compatability 2014-07-25 09:43:54 -07:00
Andrew Godwin a64bc3df77 Fixed #23093: soft application detection for swapped models 2014-07-25 09:35:38 -07:00
Andrew Godwin f44dbf74a4 Mark initial_data as deprecated separately from syncdb. Refs #23077. 2014-07-25 09:09:15 -07:00
Andrew Godwin ed4812692e Merge pull request #2938 from dekkers/ticket_23071
Fixed #23071 -- Use last migration's name in dependency to other app
2014-07-25 08:53:57 -07:00
Moayad Mardini 6508db2ff9 Fixed #23088 -- Used `six` `range` type in `Paginator.page_range`. 2014-07-25 11:04:58 +03:00
Nick Sandford b157ffdbb9 Fixed #22849 -- Added Session.__str__() 2014-07-24 21:33:51 +01:00
Tim Graham 64e75c47ef Fixed #23014 -- Infinite migration regression with unique/index_together. 2014-07-24 14:27:10 -04:00
Anubhav Joshi b1abfb3c59 Fixed #21707 -- Added helpful error message when using {{ block.super }} in base template.
Thanks mitar for the suggestion.
2014-07-24 14:22:19 -04:00
Tim Graham faacc54ac8 Fixed #22891 -- Clarified that collecstatic --clear with delete all files in the storage location. 2014-07-23 10:16:51 -04:00
Nick Sandford fa3cf006b2 Fixed #23078 -- Regression in update_contenttypes() interactivity.
Thanks raymond at adaptiv.nl for the report.
2014-07-23 08:45:09 -04:00
Claude Paroz 8c30df15f1 Fixed #23030 -- Properly handled geometry columns metadata during migrations
Thanks kunitoki for the report and initial patches.
2014-07-23 12:10:23 +02:00
Claude Paroz 19d8f2ebf4 Adapted SpatialiteGeometryColumns model to spatialite >= 4
See also:
https://www.gaia-gis.it/fossil/libspatialite/wiki?name=switching-to-4.0
2014-07-23 12:10:23 +02:00
Jeroen Dekkers 3582698c13 Fixed #23071 -- Use last migration's name in dependency to other app
Changed the autodetector to lookup the name of the other app's last
migration in the graph and use that as dependency instead of using
__latest__.
2014-07-22 01:03:02 +02:00
Iain Dawson b4cf7e3d1d Fixed typo in PermissionsMixin.groups.help_text. 2014-07-21 20:03:45 +00:00
Iain Dawson 8fbf13a6c8 Replaced instances of 'his/her' with 'their'. 2014-07-21 19:49:12 +00:00
Claude Paroz 3f1412ff7b Fixed #23064 -- Added lib detection support for GDAL 1.10/1.11
Note that GDAL 1.11 is not yet officially supported, until someone
has tested it and can confirm it has no issues with Django.
2014-07-21 19:05:19 +02:00
Andrew Godwin e24e9e0438 Fixed #23014: Renaming not atomic with unique together 2014-07-21 11:36:34 +01:00
Andrew Godwin 7dacc6ae46 Fixed #23009: Shorten FK identifiers in add_field and make consistent 2014-07-21 10:50:21 +01:00
Andrew Godwin dcb4ed5170 Fixed #22975: Don't call rename SQL if not needed 2014-07-21 10:14:00 +01:00
Andrew Godwin 2984b30ce8 Fixed #23039: Don't try to serialize unmanaged models in tests 2014-07-21 10:09:31 +01:00
Andrew Godwin 5875b8d133 Fixed #23043: alter_field drops defaults too 2014-07-21 10:04:36 +01:00
Damien Nozay 70c54a3694 Fixed #23028: Added unique_togther support to inspectdb. 2014-07-18 16:10:59 +00:00
Andrew Godwin 145d231782 Fixed #23041: Bad base dependencies for proxy models 2014-07-16 09:59:08 -07:00
Gavin Wahl 6e2b82fdf6 Fixed #22998 -- Updated the fast_delete logic for GFKs 2014-07-16 12:28:00 +03:00
Claude Paroz 28efafa24c Ignored STATIC_ROOT and MEDIA_ROOT in makemessages
Also alleviate issues with weird file names typically found in
MEDIA_ROOT directories (#23010).
Thanks Tim Graham for the review.
2014-07-16 09:38:57 +02:00
Tim Graham 0154965392 Fixed #23013 -- Fixed removing unique_together/index_together constraints in migrations.
Thanks melinath for the report.
2014-07-15 15:20:59 -04:00
Marc Tamlyn b65a2001e7 Fixed #22907 -- Array contains must have same type. 2014-07-15 19:41:26 +01:00
Tim Graham 9a2ab62977 Fixed #23008 -- Fixed typo causing bad migration dependencies.
Thanks semenov for the report and Florian for investigation.
2014-07-15 08:48:29 -04:00
Claude Paroz 4e424084e6 Fixed #22991 -- Prevented *.pyc files in autoreload monitoring
This fixes a regression introduced in 6d302f639.
Thanks lorinkoz at gmail.com for the report, Collin Anderson
for the initial patch and Simon Charette for the review.
2014-07-15 09:57:54 +02:00
Claude Paroz 5dcdbe95c7 Fixed #23005 -- Allowed specifying special fallback languages
This fixes the Chinese language issues described in #23005 but
also provides for other fallback exceptions by updating the
LANG_INFO structure.
Thanks caxekis at gmail.com for the report and Tim Graham for the
review.
2014-07-14 20:50:03 +02:00
Shai Berger dd9b3312d0 Fixed name of database connection feature 2014-07-14 19:23:57 +03:00
Huu Nguyen f7a78f9bba Fixed #22791 -- Invoke interactive questioner only for conflicts in specified apps.
Thanks bendavis78 for the report and Tim Graham for the review.
2014-07-14 11:00:49 -04:00
Anssi Kääriäinen 9cd5201abd Fixed #22994 -- regression with generic FK + admin list_view
The reason for the regression was that the GenericForeignKey field isn't
something meta.get_field_by_name() should return. The reason is that a
couple of places in Django expects get_field_by_name() to work this way.
It could make sense to return GFKs from get_field_by_name(), but that
should likely be done as part of meta refactoring or virtual fields
refactoring patches.

Thanks to glicerinu@gmail.com for the report and to Tim for working on
the issue.
2014-07-14 10:50:41 -04:00
Tim Graham 38e001ab6c Fixed #22789 -- Deprecated django.contrib.webdesign.
Moved the {% lorem %} tag to built-in tags.
2014-07-14 08:45:19 -04:00
Alex Gaynor 037f81fedc Added a newline to appease flake8 2014-07-13 08:35:25 -07:00
Claude Paroz 22b2fb0ba1 Fixed #22939 -- Delayed admin_static backend detection
Thanks generalov for the report.
2014-07-12 18:49:43 +02:00
Aymeric Augustin a764a9ccff Checked more precisely whether the app registry is ready.
Accounted for the three stages of population: app configs, models,
ready() methods of app configs.
2014-07-12 18:49:37 +02:00
Tim Graham b48c2c5925 Removed extra newline. 2014-07-12 10:16:53 -04:00
Alex Gaynor 6732566967 Bump the default iterations for PBKDF2.
The rate at which we've increased this has not been keeping up with hardware (and software) improvements, and we're now considerably behind where we should be. The delta between our performance and an optimized implementation's performance prevents us from improving that further, but hopefully once Python 2.7.8 and 3.4+ get into more hands we can more aggressively increase this number.
2014-07-11 22:43:26 -07:00
Andrew Godwin ebb13bbd88 Fixed #22983: Alert when squashing RunPython operations with referred functions. 2014-07-11 19:00:39 -07:00
Tim Graham d5e1a2d5eb Added contrib.auth migration for refs #13147. 2014-07-10 13:06:42 -04:00
Yin Jifeng 849538d03d Fixed #13147 -- Moved User validation logic from form to model. 2014-07-10 09:36:43 -04:00
Andrew Godwin b02abd688a Fixed #22922: Better error message for InvalidBasesError. 2014-07-09 23:57:35 -07:00
Andrew Godwin 008bff92b7 Fixed #22970: Incorrect dependencies for existing migrated apps 2014-07-09 23:53:43 -07:00
Anubhav Joshi 011abb7d96 Fixed #19671 -- Added warnings that null and validators are ignored for ManyToManyField.
Thanks Loic Bistuer and Tim Graham for help and review.
2014-07-09 16:01:09 -04:00
Tim Graham 5e2c4a4bd1 Fixed #13794 -- Fixed to_field usage in BaseInlineFormSet.
Thanks sebastien at clarisys.fr for the report and gautier
for the patch.
2014-07-09 07:59:20 -04:00
Claude Paroz e167e96cfe Fixed #22223 -- Prevented over-escaping URLs in reverse()
And follow more closely the class of characters defined in the
RFC 3986.
Thanks Erik van Zijst for the report and the initial patch, and
Tim Graham for the review.
2014-07-09 09:54:34 +02:00
Anubhav Joshi 75ff7b8fb8 Fixed #21832 -- Updated prompt, tests, and docs to show that USERNAME_FIELD supports FK after 9bc2d76.
Also added get_input_data() hook in createsuperuser.

Thanks Chris Jerdonek and Tim Graham for review.
2014-07-08 08:21:41 -04:00
Tim Graham fddd95254e Fixed flake8 errors. 2014-07-07 19:12:39 -04:00
Claude Paroz 6d302f6396 Fixed pyinotify performance regression in 15f82c7011
Refs #9722. Thanks Tim Graham for the review.
2014-07-06 21:41:02 +02:00
Claude Paroz b144bfb5ce Fixed #21079 -- Further normalized table names in inspectdb
Thanks Michael Manfre for the report and Tim Graham for the review.
2014-07-06 21:19:27 +02:00
Loic Bistuer 2572c07cc6 Fixed #22906 -- Added a more helpful repr to migrations' ModelState.
Thanks Collin Anderson for the report and original patch.
2014-07-06 14:56:18 +07:00
Daniel Hahler 67f9f385aa Fixed various minor doc typos / references. 2014-07-05 20:26:26 -04:00
Tim Graham ab431fbd4f Fixed flake8 indentation. 2014-07-05 20:24:00 -04:00
Daniel Hahler fff7b507ef Added a space before explanation of "Invalid HTTP_HOST header: ..." 2014-07-05 20:18:52 -04:00
Andrew Godwin f751109cb2 Merge pull request #2881 from charettes/ticket-22943-compiled-regex-deconstruction
Fixed #22943 -- Correctly serialize compiled regexes.
2014-07-05 16:37:10 -07:00
Andrew Godwin 80a12f21e3 Fixed #22960: Bad handling of relations as PKs in autodetector 2014-07-05 16:33:03 -07:00
Claude Paroz dd9a23d5cf Fixed #22950 -- Eased markup customization for choice field rendering
Thanks Patrick Robertson for the report.
2014-07-05 13:36:49 +02:00
Claude Paroz 9209049211 Ensured bound field renders as unicode safe data
Refs #22950.
2014-07-05 11:42:27 +02:00
Tim Graham 1f8bb95cc2 Corrected domain max length for EmailValidator; refs #20631.
Thanks MarkusH for the report.
2014-07-04 20:50:28 -04:00
Tim Graham 7fd55c3481 Fixed #20631 -- Increased the default EmailField max_length to 254.
Thanks pmartin for the report.
2014-07-04 14:15:00 -04:00
Simon Charette 35c2c37041 Fixed #22943 -- Correctly serialize compiled regexes.
Thanks to antialiasis at gmail dot com for the patch.
2014-07-04 13:34:20 -04:00
Loic Bistuer 1966054feb Fixed #22915 -- Document backward incompatible changes in the ValidationError constructor.
This patch also fixes update_error_dict to better handle the use case described
in this ticket, previously the type of the provided container could be lost in
some conditions.

Thanks Russell Keith-Magee for the report and Tim Graham for review.
2014-07-04 17:05:31 +07:00
LarryBrid 1bb1d3168b Updated urlize regex following a93ee5112d
Prevent urlize from turning some.organization, an.intern etc.
into urls. Refs #22941.
2014-07-04 09:00:16 +02:00
Anubhav Joshi 9bc2d766a0 Fixed #21755 -- Added ForeignKey support to REQUIRED_FIELDS.
This allows specifying ForeignKeys in REQUIRED_FIELDS when using a
custom User model.

Thanks cjerdonek and bmispelon for suggestion and timgraham for review.
2014-07-03 07:42:52 -04:00
LarryBrid a93ee5112d Fixed #22941 - Added support for domain-only links with chars after the TLD to urlize.
It now works with something like google.com/foo/bar
2014-07-02 20:36:53 -04:00
Anubhav Joshi 10e83d48a3 Fixed #22935 -- Changed ForeignKey.default_error_messages['invalid'] to refer to correct field.
Thanks Tim Graham for suggestion and review.
2014-07-02 13:01:36 -04:00
Colin Wood 27ee608b55 Fixed #22940 -- Added missing string iterpolation parameters in migrations.writer error.
Forwardport of f5740af868 from stable/1.7.x
2014-07-02 12:45:02 -04:00
Tim Graham 7c3d6149a7 Removed ADMIN_FOR from global_settings.py.
The functionality it was used for was removed in Django 1.7.
2014-07-02 10:19:15 -04:00
Tim Graham 20ec9daf7c Fixed #22933 -- Deprecated django.template.resolve_variable(). 2014-07-01 17:29:41 -04:00
Anssi Kääriäinen 0b6f05ede6 Fixed #19501 -- added Model.from_db() method
The Model.from_db() is intended to be used in cases where customization
of model loading is needed. Reasons can be performance, or adding custom
behavior to the model (for example "dirty field tracking" to issue
automatic update_fields when saving models).

A big thank you to Tim Graham for the review!
2014-07-01 16:31:01 +03:00
Tim Graham c26579eaa7 Removed django/contrib/auth/create_superuser.py
It's a shim that calls the actual createsuperuser management command and
it's been marked as deprecated since Django 1.0.
2014-07-01 08:51:06 -04:00
Curtis 71461b14ab Fixed #22691 -- Added aliasing to cached_property. 2014-07-01 06:32:53 -04:00
Anubhav Joshi 34ba86706f Fixed #14334 -- Query relation lookups now check object types.
Thanks rpbarlow for the suggestion; and loic, akaariai, and jorgecarleitao
for reviews.
2014-07-01 06:12:58 -04:00
Julia Matsieva 29c1151a55 Fixed #22756 -- Added view name to technical 404 template if Http404 is raised.
Thanks Keryn Knight for the suggestion.
2014-06-30 15:34:35 -04:00
Tim Graham cf252dbea6 Fixed #8162 -- Increased Permission.name max_length to 255 characters. 2014-06-30 14:20:51 -04:00
Anubhav Joshi fd5897193f Fixed problem with refs #10811.
When 'to_field' is specified with a FK, then we need to check the pk value
the object.
2014-06-30 10:25:57 -04:00
Ian Foote 4c39c270af Add missing spaces to implicitly joined strings 2014-06-29 22:56:21 +01:00
Alex Gaynor 985ad99a71 Fixed a flake8 warning 2014-06-29 11:15:50 -07:00
Claude Paroz f12b68af71 Fixed #16184 -- Fixed multiple PostGIS types introspection
Thanks radim.blazek@gmail.com for the report and initial patch.
Testing is tricky, as the failure condition is a bit of an edge
case. inspectapp.InspectDbTests should at least guarantee non
regression.
2014-06-28 16:18:24 +02:00
Tim Graham 70576740b0 Fixed #22917 -- Fixed typo in AlterIndexTogether.describe(). 2014-06-27 10:34:48 -04:00
Tim Graham 5e9773269a Added newline to fix flake8 error. 2014-06-26 15:16:23 -04:00
Riccardo Magliocchetti 68c9a72e29 Fixed #22894 -- Made admin add related/raw ID fields widgets customizable.
Decoupled behavior and style from the RelatedFieldWidgetWrapper and
ForeignKeyRawIdWidget.
2014-06-26 15:02:42 -04:00
Claude Paroz 0d363b25b8 Fixed #22857 -- Reset translations when only .mo file changed
No need to restart the server when a translation file changes.
Refs #9523. Thanks artscoop for the report and Tim Graham for
the review.
2014-06-26 10:01:52 +02:00
Tim Graham e0cd07ec2f Fixed #22903 -- Fixed migration generation if index_together or unique_together is removed from a model. 2014-06-25 10:02:12 -04:00
Lovas Bence 9385aa3198 Fixed #22050 -- Fixed defer fields on proxy related models. 2014-06-25 07:20:18 -04:00
Tim Graham 815e7a5721 Fixed #20128 -- Made CsrfViewMiddleware ignore IOError when reading POST data.
Thanks Walter Doekes.
2014-06-25 07:08:16 -04:00
Duncan Parkes fd4ccd045c Fixed #22799 -- Made GET and POST on HttpRequest QueryDicts, and FILES a MultiValueDict.
Previously, GET, POST, and FILES on an HttpRequest were created in
the __init__ method as dictionaries. This was not something you would
usually notice causing trouble in production as you'd only see a
WSGIRequest, but in testing using the test client, calling .getlist
on GET, POST, or FILES for a request with no get/post data resulted in
an AttributeError.

Changed GET and POST on an HttpRequest object to be mutable
QueryDicts (mutable because the Django tests, and probably many
third party tests, were expecting it).
2014-06-24 22:03:22 -04:00
Duncan Parkes d68987ae25 Fixed #22897 -- Made QueryDict query_string argument optional.
Now QueryDict() is equivalent to QueryDict('') or QueryDict(None).
2014-06-24 22:02:03 -04:00
Duncan Parkes 7f4e2ef1e9 Improved documentation for QueryDict. 2014-06-24 21:40:21 -04:00
Anubhav Joshi dbbcfca476 Fixed #21668 -- Return detailed error page when SuspiciousOperation is raised and DEBUG=True
Thanks GDorn and gox21 for report.

Thanks Tim Graham for idea and review.
2014-06-24 08:55:36 -04:00
Tim Graham 150d88cc2c Restored is_anonymous() check in ModelBackend permission checking removed in refs #17903.
Thanks Florian Apolloner for raising the issue.
2014-06-24 07:09:38 -04:00
Andrew Godwin fe262c0b84 Fixed #22708: Typo in autodetector base dependency gen 2014-06-23 20:48:33 -07:00
Andrew Godwin 0b571753a8 Fixed #22889: Unneeded to_field in fk.deconstruct causing swap issues 2014-06-23 20:39:17 -07:00
Andrew Godwin 0fba4c0ed7 Fixed #22487: Don't flush out data from before normal TestCases 2014-06-23 20:25:09 -07:00
Jorge C. Leitão c33447a50c Fixed #17903 -- Modified ModelBackend to eliminate permissions on inactive users.
Thanks to @SmileyChris for the report and @timgraham for review.
2014-06-23 19:57:20 -04:00
Jorge C. Leitão 0a8c0eda2a Simplified test of contrib.auth.tests. 2014-06-23 19:30:06 -04:00
Anubhav Joshi 7f76251fb7 Refactored common code in handlers/base.py and urlresolvers.py 2014-06-23 15:27:25 -04:00
Uriel Corfa bcd2e6c697 Removed 'to_field' from ForeignKey(settings.AUTH_USER_MODEL) in admin's initial migration.
This enables using a custom user model with a primary key with a name
different than 'id'; refs #22889.
2014-06-23 13:13:45 -04:00
Anubhav Joshi 1c50d6ae2b Fixed problem introduced with #refs 13711. 2014-06-23 19:36:40 +03:00
Claude Paroz 18b3788401 Cleaned temp dir in symlinks_supported()
Refs #21482.
2014-06-23 13:27:52 +02:00
Claude Paroz 9618d68b34 Fixed #8033 -- Explained app registry error during translation setup
Thanks Tim Graham and Aymeric Augustin for the review.
2014-06-23 09:31:45 +02:00
Chris Beaven 21c496ea52 Fixed #22881 -- Better soft_applied migration detection 2014-06-23 13:36:22 +12:00
Andrew Godwin ecc06d44ed Clean up syncdb parts of migrate output if no synced apps 2014-06-22 13:03:25 -07:00
Andrew Godwin 8b878c7a64 Include swapped apps in autodetector state 2014-06-22 13:00:49 -07:00
Andrew Godwin b30d32ff24 Fixed #22875: Optimizer did not take through= into account. 2014-06-22 11:23:45 -07:00
Loic Bistuer f07735c619 Fixed #22867 -- Memoized django.utils.version.get_git_changeset().
This follows commits 80f4487 and 01399fa; original patch had to be
reverted because it wasn't Python 2.6 compatible and we need it to
be in order to build docs on the djangoproject.com server.

This fix should be replaced by @lru_cache as soon as we drop
Python 2.6 compatibility.

Thanks Florian Apolloner for the review and Alexander Schepanovski
for the original patch.
2014-06-23 00:03:58 +07:00
Claude Paroz bc19ff6479 Fixed #22793 -- Updated import location for GeometryColumns in tests
The old location was removed in cebd8753c6.
Thanks Aymeric Augustin for the report.
2014-06-21 14:10:07 +02:00
Claude Paroz cecbb71312 Prevented evaluation of a possible lazy message
As far as possible, message evaluation should not happen in field
__init__ (often run at import time).
2014-06-21 11:21:35 +02:00
Tim Graham 3425d42bf1 Fixed test from refs #22782. 2014-06-20 17:53:18 -04:00
Marc Tamlyn 2764146586 Fixed #22838 -- Deprecated ModelChoiceField.cache_choices.
Undocumented, untested and probably not even useful feature.
2014-06-20 20:29:46 +01:00
Yazhong Liu 97adfc2bf8 Added HTTP 308 status and its description. 2014-06-20 13:35:59 -04:00
Luan Pablo 407d070329 Fixed #22782 -- Added i18n attr to Sitemap class
It makes possible to have your sitemap in multiple languages when
using i18n in URLs.
2014-06-20 13:04:41 -04:00
Vlastimil Zíma 78c32f1caa Fixed #22514 -- Prevented indexes on virtual fields [postgres]. 2014-06-20 11:59:02 -04:00
Huu Nguyen fbb684d95e Fixed #22862 -- Added --noinput option to makemigrations.
Thanks artortenburger for the report.
2014-06-20 08:55:02 -04:00
Claude Paroz b67e9ed8c9 Swapped placeholders in [sql]migrate command error 2014-06-20 13:53:17 +02:00
Andrew Godwin 9f4852f649 Fixed #22863: Improve clarity of makemigrations for non-db params 2014-06-19 23:41:32 -07:00
Aymeric Augustin 01399fa0aa Revert "Fixed #22867 -- Memoized django.utils.version.get_git_changeset()."
This reverts commit 80f4487 temporarily, because that commit prevented
the djangoproject.com server from building the docs, because it still
uses Python 2.6.
2014-06-19 18:11:25 +02:00
Alexander Schepanovski 80f4487d17 Fixed #22867 -- Memoized django.utils.version.get_git_changeset().
This improves pickling speed in prelease versions of Django; refs #21430.
2014-06-19 10:46:04 -04:00
Maxime Turcotte 9996158db4 Fixed #22835 -- Deprecated NoArgsCommand. 2014-06-19 08:54:59 -04:00
Renaud Parent 87d0a3384c Fixed #22778 -- Added a model Meta option to define default_related_name.
Thanks jorgecarleitao and mmardini for reviews.
2014-06-18 13:53:07 -04:00
Andrew Godwin 2cee1d4642 Fixed #22861: Internal migrations done first so __first__ works
Thanks to Chris Beaven.
2014-06-17 23:28:35 -07:00
Andrew Godwin 09b63a7cce Fix __latest__ to actually resolve to the latest migration 2014-06-17 22:12:31 -07:00
Andrew Godwin 8d2ac948a9 Fixed #22853: Swapped models are now ignored for migration operations. 2014-06-17 17:45:38 -07:00
Anubhav Joshi 91f1b6dcdc Fixed #13711 -- Model check added to ensure that auto-generated column name is within limits of the database.
Thanks russellm for report and Tim Graham for review.
2014-06-17 16:16:02 -04:00
Andrew Godwin 66a99fa210 Merge pull request #2824 from valberg/22577
Fixed #22577: Python 3 broke on non-module migrations directory
2014-06-17 09:54:39 -07:00
Víðir Valberg Guðmundsson 3a6cb9f497 Fixed #22577: Python 3 broke on non-module migrations directory 2014-06-17 18:21:38 +02:00
Tim Graham 95cc0e15b4 Fixed #22819 -- Renamed output_type -> output_field in query expression API.
Thanks jorgecarleitao for the suggestion.
2014-06-17 11:57:16 -04:00
Andrew Godwin d359647715 Fixed #21498: Don't use a fallback language if you're en-us. 2014-06-16 20:40:13 -07:00
Andrew Godwin b22917bd50 Fixed #22851: BinaryView wasn't getting a binary default 2014-06-16 18:44:08 -07:00
Tim Graham 82c935d44c Renamed DatabaseFeature.supports_check_constraints to supports_column_check_constraints.
Thanks maxi for the suggestion.
2014-06-16 19:25:13 -04:00
Andrew Godwin 4169d4694a Ignore more blank throughs on swapped-out M2Ms 2014-06-16 15:09:27 -07:00
Andrew Godwin fa9a26745f Ignore through being None on some special cases of fields. 2014-06-16 14:58:35 -07:00
Vincent-Vega 4529af9ecf Fixed #22845 -- Correctly handled memcached default timeout value. 2014-06-16 16:34:00 -04:00
Tim Graham b341f33697 Added database migration for contrib.auth.
refs #22170.
2014-06-16 16:21:37 -04:00
Tim Graham a96dbda6d3 Fixed flake8 error. 2014-06-16 15:45:07 -04:00
Tim Graham eb8600a656 Added database migration for contrib.contenttypes.
Moved contenttypes tests to allow them to run correctly in the presence of
migrations. refs #22170.
2014-06-16 15:03:00 -04:00
Andrew Godwin 6e3ac5f474 Fixed #22847: Optimizer wasn't expecting unresolved FKs 2014-06-16 10:28:31 -07:00
Andrew Godwin 067b9668fb Fixed #22783: Make sure swappable models come first in creation 2014-06-16 10:20:05 -07:00
Andrew Godwin 2b79be2bee Fixed #22848: Ignore no-migrations errors during makemigrations only 2014-06-16 09:58:35 -07:00
Andrew Godwin f047dd2f3e Use __first__ not __latest__ for unknown app dependencies 2014-06-16 09:54:43 -07:00
Matthew Schinckel bb39037fcb Fixed #22788 -- Ensured custom migration operations can be written.
This inspects the migration operation, and if it is not in the
django.db.migrations module, it adds the relevant imports to the
migration writer and uses the correct class name.
2014-06-16 12:28:52 -04:00
Tim Graham 37a8f5aeed Added database migration for contrib.sessions.
refs #22170.
2014-06-16 10:18:42 -04:00
Andrew Godwin c8c79367a2 Fixed #22844: Duplicate SQL for SQLite FKs 2014-06-16 00:27:32 -07:00
Alex Gaynor d17a4cb037 Fixed several flake8 errors 2014-06-15 20:45:15 -04:00
Claude Paroz d7576bb27a Added database migration for contrib.redirects.
refs #22170.
2014-06-15 20:20:22 -04:00
Claude Paroz 7da16b99df Added database migration for contrib.flatpages.
refs #22170.
2014-06-15 19:29:53 -04:00