Shai Berger
f095356ba2
Fixed #22343 -- Disallowed select_for_update in autocommit mode
...
The ticket was originally about two failing tests, which are
fixed by putting their queries in transactions.
Thanks Tim Graham for the report, Aymeric Augustin for the fix,
and Simon Charette, Tim Graham & Loïc Bistuer for review.
2014-04-10 03:04:51 +03:00
julien 'pouete' Godin
071c933775
Fixed #22401 -- Deprecated regular expression parsing of initial SQL in favor of installing sqlparse.
2014-04-09 19:25:07 -04:00
Aymeric Augustin
5f2f47fdfc
Fixed #21553 -- Ensured unusable database connections get closed.
2014-04-09 22:41:33 +02:00
Aymeric Augustin
2791fbf59d
Used more specific test assertions.
2014-04-09 22:20:22 +02:00
e0ne
2aaa045c61
Fixed #13408 -- Deprecated silent unpacking exception passing in for template tag.
...
Thanks peterbe for the suggestion.
2014-04-08 13:55:17 -04:00
Tim Graham
3cba90f22a
Fixed #21084 -- Used proxy model's content type for admin log entries.
...
(the previous commit included only the test)
2014-04-07 09:04:49 -04:00
Tomasz Wysocki
78623d253b
Removed casting to bool just before negation.
2014-04-07 08:30:05 -04:00
Anubhav Joshi
cd914e31c9
Fixed #21977 -- Deprecated SimpleTestCase.urls
2014-04-06 17:33:43 -04:00
Claude Paroz
0a65da941c
Fixed #22236 -- Removed inappropriate usage of signals
...
Thanks Aymeric Augustin for the report and Tim Graham for the review.
2014-04-05 21:00:31 +02:00
Tim Graham
fd23c06023
Fixed #21649 -- Added optional invalidation of sessions when user password changes.
...
Thanks Paul McMillan, Aymeric Augustin, and Erik Romijn for reviews.
2014-04-05 12:50:51 -04:00
Tomasz Wysocki
c28beb4291
Refactored and commented strip_tags utility
2014-04-03 21:24:29 +02:00
Simon Charette
074d3183d9
Fixed #22363 -- Correctly serialize `django.utils.datetime_safe` objects.
...
Thanks to linovia for the report.
2014-04-03 14:54:16 -04:00
Tim Graham
0f6ea69e27
Cleaned up string detection for a deprecation warning by using six.string_types.
2014-04-03 11:03:31 -04:00
Vishal Lal
a8e2ec0e82
Fixed #22372 -- Improved description of WizardView.get_context_data().
...
Thanks simon29 for the report.
2014-04-03 08:25:11 -04:00
Tim Graham
d73d0e071c
Fixed #22218 -- Deprecated django.conf.urls.patterns.
...
Thanks Carl Meyer for the suggestion and Alex Gaynor and Carl for reviews.
2014-04-03 07:28:10 -04:00
Alex Gaynor
608e6eb295
Added an explanatory comment. Refs #22017
2014-04-02 09:47:18 -07:00
Alex Gaynor
666990a2a0
Revert "Merge pull request #2508 from tomwys/patch-1"
...
This reverts commit c45607e939
, reversing
changes made to 9769337ca8
.
2014-04-02 09:45:42 -07:00
Alex Gaynor
66cbd81456
Merge pull request #2509 from tomwys/patch-2
...
Refactor. Stop using memory for list copies.
2014-04-02 08:35:42 -07:00
Tomasz Wysocki
cb9704fc4f
Refactor. Stop using memory for list copies.
2014-04-02 17:32:51 +02:00
Tomasz Wysocki
6eb891f57a
Don't copy list for iteration.
2014-04-02 17:28:09 +02:00
Daniel Neuhäuser
4aa80149e7
Fixed #22327 -- Turned BaseEmailBackend into a context manager
...
Changed the BaseEmailBackend to allow usage as context manager to open
and close connections.
2014-03-31 14:08:51 -04:00
Tim Graham
246face209
Fixed #22362 -- Improved AuthenticationMiddleware assertion message.
...
Thanks Keryn Knight.
2014-03-31 08:10:59 -04:00
Tim Graham
981b864fbd
Replaced urllib/urlparse imports with from django.utils.six.moves.
2014-03-31 07:54:22 -04:00
Loic Bistuer
4339e9a92d
Fixed #21795 -- Made add_preserved_filters account for url prefixes.
...
Thanks to trac username honyczek for the report. Refs #6903 .
2014-03-31 07:19:59 -04:00
Tim Graham
029d77eaaa
Fixed typo in docstring.
2014-03-31 07:01:13 -04:00
Loic Bistuer
0fd51cf0bd
Fixed #22319 -- Fixed migration external dependencies when there are internal dependencies.
2014-03-31 06:50:38 -04:00
Loic Bistuer
a449e7feec
Fixed #22359 -- Changing M2M field to blank=True failed on sqlite.
2014-03-31 06:13:19 -04:00
Ramiro Morales
9a982d5ccc
Moved ServerHandler helper class to tests.
...
It has been only used in the builtin_servers tests since Django 1.4.
2014-03-30 20:55:40 -03:00
Alex Gaynor
778ce245dd
Corrected many style guide violations that the newest version of flake8 catches
2014-03-30 12:11:05 -07:00
Loic Bistuer
20399083f4
Fixed #19816 -- Pre-evaluate querysets used in direct relation assignments.
...
Since assignments on M2M or reverse FK descriptors is composed of a `clear()`,
followed by an `add()`, `clear()` could potentially affect the value of the
assigned queryset before the `add()` step; pre-evaluating it solves the problem.
This patch fixes the issue for ForeignRelatedObjectsDescriptor,
ManyRelatedObjectsDescriptor, and ReverseGenericRelatedObjectsDescriptor.
It completes 6cb6e1 which addressed ReverseManyRelatedObjectsDescriptor.
2014-03-30 15:36:45 +07:00
Loic Bistuer
bc9be72bdc
Fixed transaction handling for a number of operations on related objects.
...
Thanks Anssi and Aymeric for the reviews. Refs #21174 .
2014-03-30 12:13:00 +07:00
Aymeric Augustin
f356b6ecc3
Increased memoization cache size for language codes.
...
There may be more than 100 (default maxsize) commonly seen xx-yy values
on some sites. The additional memory consumption isn't significant.
Also added a comment explaining why this cache must have a maxsize.
2014-03-29 19:47:15 +01:00
Claude Paroz
e819a3cd62
Skipped PostGIS version tests when psycopg2 not installed
...
Refs #22334 . Thanks Tim Graham for spotting the issue.
2014-03-29 19:25:57 +01:00
Rémy Sanchez
88f1e3d93d
Unit testing Postgis version check
...
Refs #22334 .
2014-03-29 15:37:40 +01:00
Tim Graham
ed4c2e1c0d
Fixed #22329 -- Used label_tag() in some admin auth templates.
...
refs #17922 .
2014-03-29 08:54:56 -04:00
Tim Graham
2cc8840397
Removed unused imports.
2014-03-29 08:54:30 -04:00
Claude Paroz
41903d025a
Dropped support for GDAL 1.6
2014-03-29 11:08:52 +01:00
Claude Paroz
c5d1df70a4
Dropped support for GEOS 3.1
2014-03-29 11:08:52 +01:00
Claude Paroz
e62dea9ad5
Confirmed Spatialite 4 support
2014-03-29 11:08:52 +01:00
Claude Paroz
0f1f12c564
Confirmed GEOS 3.4 support
2014-03-29 11:08:52 +01:00
Anssi Kääriäinen
21f208e66e
Fixed #22250 -- regression in gis compiler for non-concrete fields
...
Thanks to gwahl@fusionbox.com for the report.
2014-03-29 07:58:25 +02:00
Maxime Turcotte
5e4e0b6fe9
Fixed #22306 -- Deprecated future versions of cycle and firstof template tags.
2014-03-28 18:55:06 -04:00
Tim Graham
12e9adcd71
Corrected deprecation warnings.
2014-03-27 17:48:12 -04:00
Tim Graham
dadf2ee75f
Fixed a deprecation warning with the HTMLParser safe argument.
...
refs 6ca6c36f82
2014-03-27 09:17:49 -04:00
Chris Beaven
b077ba7ac1
Add a useful stacklevel to some RemovedInDjango19Warnings
2014-03-27 15:44:52 +13:00
Claude Paroz
d320863878
Fixed #22114 -- Stopped adding trailing slashes in URLField.to_python
...
Thanks coredumperror at gmail.com for the report and Tim Graham
for the review.
2014-03-26 18:10:58 +01:00
Simon Charette
b9e50e4774
Fixed the PostGIS circular imports caused by 1506c71a95
.
...
Thanks to @loic for the help and @timgraham for the review.
refs #12030 .
2014-03-26 12:57:57 -04:00
Tim Graham
45ef4baf5c
Fixed Python 3.4 test failure.
2014-03-26 09:57:00 -04:00
Zbigniew Siciarz
3cdb0baa45
Fixed #22335 -- Fixed popen_wrapper error on non-English Windows systems.
2014-03-26 00:42:19 +01:00
Simon Charette
ff874f363c
Fixed field deconstruction tests failures introduced by 1506c71a95
.
...
refs #12030 .
2014-03-25 18:54:52 -04:00
Tim Graham
42336c84a0
Fixed #22331 -- Made MigrationAutodetector ignore unmanaged models.
...
This commit reverts 69d4b1c
and tackle the issue from a different angle.
Models remain present in the project state, but are now ignored by the
autodetector.
2014-03-25 18:30:58 -04:00
Simon Charette
1506c71a95
Fixed #12030 -- Validate integer field range at the model level.
...
Thanks to @timgraham for the review.
2014-03-25 14:31:20 -04:00
Tim Graham
9b7ba8af1b
Fixed #22322 -- Fixed incorrect explanation of what managed=False does.
...
refs #14305 .
Thanks Adrian Klaver for the report.
2014-03-25 14:01:37 -04:00
Loic Bistuer
69d4b1c3ea
Fixed #22331 -- Fixed migrations ProjectState to ignore unmanaged models.
2014-03-25 10:33:44 -04:00
David Evans
86dcac4634
Fixed #22315 -- str/bytes mismatch in staticfiles
...
Previously, `ManifestFilesMixin.read_manifest` failed in Python 3
because `json.loads` accepts `str` not `bytes`.
2014-03-25 09:53:24 -04:00
Tim Graham
e3c4205b79
flake8 and doc fixes for refs #22257 .
2014-03-25 09:44:59 -04:00
Ben Davis
16afffffe8
Fixed #22087 -- Made AdminReadonlyField respect ModelForm Meta overrides.
2014-03-25 09:33:13 -04:00
Stephen Burrows
35ed792cf2
Fixed #22300 -- Fixed crash in migrations when changing non-relational field to relational.
2014-03-25 07:46:15 -04:00
Marc Tamlyn
09ab447d08
Merge pull request #2465 from coder9042/ticket_22258
...
Fixed #22257 -- Added file output option to dumpdata command.
2014-03-25 11:42:03 +00:00
Anubhav Joshi
f34e8fc890
Fixed #22257 -- Added file output option to dumpdata command.
2014-03-25 13:47:03 +05:30
Daniel Hahler
1edfa155e3
Fixed #22293 -- Avoided renaming many-to-many tables to themselves.
...
Fixed this for both implementations of _alter_many_to_many, instead of
in `alter_db_table` itself (more implementations).
2014-03-24 13:24:52 -04:00
Jannis
d81a9c50d8
Fixed typo in error message in django.contrib.sitemaps.
2014-03-24 13:06:06 -04:00
Anubhav Joshi
416a858023
Fixed #17922 -- Added required_css_class to form label.
...
Thanks hanson2010 for the suggestion.
2014-03-24 08:11:54 -04:00
Tim Graham
2ec82c7387
Updated six to 1.6.1.
2014-03-24 07:33:55 -04:00
Loic Bistuer
7ac8380799
Fixed #22318 -- Added Form.has_error() to easily check if a given error has happened.
2014-03-24 07:21:32 -04:00
Aymeric Augustin
58161e4e93
Fixed #22291 -- Avoided shadowing deadlock exceptions on MySQL.
...
Thanks err for the report.
2014-03-23 20:45:22 +01:00
Simon Charette
a6fc18594e
Fixed PostGIS test failures.
2014-03-22 18:12:52 -04:00
Simon Charette
fa8b473528
Fixed #22299 -- Cleanup wizard temp files when possible.
...
Thanks to @erikr for the review.
2014-03-22 17:48:12 -04:00
Aymeric Augustin
232181d1c5
Advanced deprecation warnings for 1.8.
2014-03-22 21:12:58 +01:00
Claude Paroz
74b3467646
Removed GeoRSSSitemap
...
Refs #18531 .
2014-03-22 19:58:50 +01:00
Ramiro Morales
491419b5ff
Made m2m fields form help_text munging specific to admin widgets.
...
Refs #9321 and follow-up to e80de93af6
.
2014-03-22 15:43:17 -03:00
Loic Bistuer
e61d99d96d
Fixed #20684 -- Added support for HTML5 boolean attributes to form widgets.
2014-03-22 14:28:12 -04:00
Alex Gaynor
684e8a941b
Removed an unused variable.
2014-03-22 10:11:39 -07:00
Baptiste Mispelon
96fc3908ad
Fixed a failing test introduced in 918a16bc4c
.
...
Refs #22307 .
2014-03-22 18:05:56 +01:00
Claude Paroz
c94bff2b26
Fixed #22241 -- Selectively added line breaks in admin read-only fields
...
When content is supposed to contain HTML, we do not try to add
line breaks in read-only contents.
Thanks Alexander Todorov for the report.
2014-03-22 17:00:50 +01:00
Patrick Michaud
acee46fc95
Fixed #22256 -- Replaced bad fallback for missing PATH
...
Thanks Baptiste Mispelon for the review.
2014-03-22 16:52:05 +01:00
Claude Paroz
bc315266c8
Fixed #22294 -- Prevented converting length filter output to string
...
Thanks Steve Pike for the report.
2014-03-22 16:39:46 +01:00
Aymeric Augustin
6877a9d415
Avoided transactional truncates on amateur databases.
...
Fixed a test failure that appeared after 753a22a6
, although the bug
existed before that commit.
Refs #22308 .
2014-03-22 14:39:27 +01:00
Tim Graham
ee4edb1eda
Made ModelForms raise ImproperlyConfigured if the list of fields is not specified.
...
Also applies to modelform(set)_factory and generic model views.
refs #19733 .
2014-03-22 07:56:48 -04:00
Aymeric Augustin
0757e0f30d
Avoided transactional DDL on castrated databases.
...
Fixed a test failure that appeared after 753a22a6
, although the bug
existed before that commit.
Refs #22308 .
2014-03-22 11:05:14 +01:00
Claude Paroz
6ca6c36f82
Improved strip_tags and clarified documentation
...
The fact that strip_tags cannot guarantee to really strip all
non-safe HTML content was not clear enough. Also see:
https://www.djangoproject.com/weblog/2014/mar/22/strip-tags-advisory/
2014-03-22 10:59:18 +01:00
Antti Hirvonen
aaa2110259
Fixed #22302 -- Updated Finnish locale formats
2014-03-22 10:35:06 +01:00
Tim Graham
80e6960580
Removed unused imports.
2014-03-21 20:18:19 -04:00
Tim Graham
d74e33eb0e
Removed backwards compatibility code to call field.widget._has_changed()
...
This logic should be moved to field._has_changed() as described
in ebb504db69
- refs #16612 .
2014-03-21 19:34:21 -04:00
Tim Graham
306283bf35
Removed warning for Widget.is_hidden property.
...
refs #22137 .
2014-03-21 19:25:54 -04:00
Tim Graham
e80de93af6
Removed hard-coded help_text for ManyToManyFields that use a SelectMultiple widget
...
Per deprecation timeline; refs #9321 .
2014-03-21 19:10:07 -04:00
Hans Lawrenz
918a16bc4c
Fixed #22307 -- Fixed SpooledTemporaryFile bug in File class.
...
Added condition to prevent checking the existence of a file name of a
file like object when the name attribute is None. This is necessary
because a SpooledTemporaryFile won't exist on the file system or have a
name until it has reached its max_size. Also added tests.
2014-03-21 22:34:47 +01:00
Aymeric Augustin
7e0f9095f7
Removed BaseDatabaseCreation.set_autocommit per deprecation timeline.
2014-03-21 22:17:36 +01:00
Aymeric Augustin
6993f2886b
Fixed typo in comments.
2014-03-21 22:16:31 +01:00
Aymeric Augustin
051c666aca
Removed django.db.backend per deprecation timeline.
2014-03-21 22:16:14 +01:00
Aymeric Augustin
253e8ac29f
Removed django.middleware.doc. Refs #20126 .
...
Small doc changes missed in 66076268
.
2014-03-21 22:07:39 +01:00
Aymeric Augustin
06160cb945
Removed deprecated TRANSACTIONS_MANAGED setting.
2014-03-21 21:34:47 +01:00
Aymeric Augustin
753a22a635
Fixed transaction handling in two management commands.
...
Previously, when createcachetable and flush operated on non-default
databases, they weren't atomic.
2014-03-21 21:29:51 +01:00
Aymeric Augustin
0f9560855e
Removed legacy transaction management per the deprecation timeline.
2014-03-21 21:06:50 +01:00
Tim Graham
bf5430a20b
Removed django.test.simple and django.test._doctest per deprecation timeline.
...
refs #17365 , #17366 , #18727 .
2014-03-21 13:36:46 -04:00
Tim Graham
1ea44a3abd
Switched {% cycle %} and {% firstof %} tags to auto-escape their variables per deprecation timeline.
...
refs #17906 .
2014-03-21 13:17:10 -04:00
Tim Graham
274048351a
Removed reading of legacy admin popup GET parameter.
...
refs #20288 .
2014-03-21 11:35:33 -04:00
Tim Graham
cb47969cd7
Removed warning for settings.ADMIN_FOR which has been removed.
...
refs #21386 .
2014-03-21 11:20:52 -04:00
Tim Graham
797d742662
Removed django.forms.widgets.RadioInput per deprecation timeline.
...
refs #4592 .
2014-03-21 11:18:04 -04:00
Tim Graham
f6c1f05fbf
Removed Model._meta.module_name per deprecation timeline.
...
refs #19689 .
2014-03-21 11:10:34 -04:00
Tim Graham
4965a77407
Removed PIL compatability layer per deprecation timeline.
...
refs #19934 .
2014-03-21 10:54:53 -04:00
Tim Graham
6d1ae5e27c
Removed reading of old 'django_language' session variable per deprecation timeline.
...
refs #5789 .
2014-03-21 09:53:16 -04:00
Tim Graham
f567d04b24
Removed settings.CACHE_MIDDLEWARE_ANONYMOUS_ONLY per deprecation timeline.
...
refs #15201 .
2014-03-21 09:46:17 -04:00
Tim Graham
8b81dee60c
Removed fix_ampersands template filter per deprecation timeline.
...
Also removed related utility functions:
* django.utils.html.fix_ampersands
* django.utils.html.clean_html
2014-03-21 08:50:43 -04:00
Tim Graham
99339c77f6
Removed Model._meta.get_(add|change|delete)_permission methods per deprecation timeline.
2014-03-21 08:27:37 -04:00
Tim Graham
9344bbb446
Removed django.views.defaults.shortcut and django.conf.urls.shortcut per deprecation timeline.
2014-03-21 07:56:00 -04:00
Tim Graham
bcc15e2b21
Removed backward compatible shims to rename get_query_set and similar queryset methods.
...
Also removed the backward compatible shims introduced to rename the
attributes ChangeList.root_query_set and ChangeList.query_set.
2014-03-21 07:47:25 -04:00
Tim Graham
11e22129d5
Removed settings.SEND_BROKEN_LINK_EMAILS per deprecation timeline.
2014-03-21 07:15:58 -04:00
Tim Graham
aa93a1890f
Removed contrib.comments per deprecation timeline.
2014-03-21 07:05:36 -04:00
Tim Graham
2f37ad88b1
Bumped version to reflect master is now pre-1.8.
2014-03-21 06:17:14 -04:00
Dejan Noveski
4d0c5f6142
Fixed #22255 -- Added support for specifying re flags in RegexValidator
2014-03-21 11:12:36 +01:00
Aymeric Augustin
222262ca23
Fixed #22163 -- Stopped ignoring unhandled kwargs in select_for_update.
2014-03-20 22:22:00 +01:00
Andrew Godwin
831ce69cbb
Mark model renaming as irreversible for now ( #22248 )
2014-03-19 21:25:26 -07:00
Andrew Godwin
81f5408c7a
Fixed #22275 : unique_together broken if ForeignKey split into new file.
...
Thanks to bak1an for the patch.
2014-03-19 21:23:21 -07:00
Andrew Godwin
356f064c49
Merge pull request #2221 from bmispelon/LazyObject-refactor
...
Fixed #21840 -- Moved dunder methods from SimpleLazyObject to LazyObject...
2014-03-19 21:01:24 -07:00
Eric Palakovich Carr
c11b9346d4
Fixed migration so MySQL GIS test doesn't fail; refs #22001 .
...
The test previously failed with the error:
(1170, "BLOB/TEXT column 'name' used in key specification without a key length")
2014-03-19 06:49:29 -04:00
smallcode
61fdb8d487
Fixed regression in file locking on some platforms.
...
Some platforms with os.name == 'posix' do not have the
fcntl module, e.g. AppEngine.
refs #19373 .
2014-03-18 10:35:22 -04:00
Florian Apolloner
8520e43e13
Fixed a regression from 2e5b82f627
2014-03-18 15:30:52 +01:00
Florian Apolloner
2e5b82f627
Made a test app label unique.
2014-03-18 14:51:06 +01:00
Daniel Hahler
fc167c9b5e
Mentioned that ``dumpdata --natural`` is deprecated.
2014-03-18 07:25:37 -04:00
Matthew Somerville
61296fb1ba
Fixed #22283 -- Updated documentation referring to non-existent tuples.
2014-03-18 10:57:47 +01:00
Chris Beaven
b47ef04ea2
Fix any sqlite field migration deleting all implicit m2m tables
...
Fixes #22281
2014-03-18 16:54:35 +13:00
Marc Tamlyn
834d78ffc3
Remove u prefixes, skip test unless spatial db.
...
Refs #22001 , d22b291890
2014-03-15 12:49:03 +00:00
Russell Keith-Magee
bb2c58c701
Merge pull request #2430 from NathanRSmith/ticket_21989
...
Fixed #21989 - Modified first day of week in AU locale.
Although Australia is a signatory to ISO 8601, there's a lot of evidence to suggest that this is in the same category as "officially, the USA uses metric". See the ticket for supporting details.
2014-03-15 09:26:53 +08:00
Marc Tamlyn
d22b291890
Fixed #22001 -- Ensure db_type is respected.
...
db_parameters should respect an already existing db_type method and
return that as its type string. In particular, this was causing some
fields from gis to not be generated.
Thanks to @bigsassy and @blueyed for their work on the patch.
Also fixed #22260
2014-03-14 22:32:17 +00:00
Nathan Smith
cfbc887b2c
Changed start of week for Australia to Sunday as requested in https://code.djangoproject.com/ticket/21989
2014-03-14 14:00:27 -04:00
Baptiste Mispelon
37f7f233f5
Fixed #22272 -- Fixed regression in DecimalField when using decimal_places=0.
...
Thanks to trac user merb for the report.
2014-03-14 17:21:59 +01:00
Claude Paroz
5a976b4bec
Fixed #22245 -- Avoided widget overwrite in forms.IntegerField subclasses
...
Thanks Jeroen Pulles for the report and Simon Charette for the review.
2014-03-13 16:58:14 +01:00
Baptiste Mispelon
5c5b266b54
Simplified implementation of collectstatic command.
...
Since d2e242d16c6dde6f4736086fb38057424bed3edb made isinstance()
calls work correctly on LazyObject, we can simplify the
implementation of is_local_storage added in
7e27885c6e
.
2014-03-13 10:03:01 +01:00
Baptiste Mispelon
61917aa08b
Fixed #21840 -- Moved dunder methods from SimpleLazyObject to LazyObject.
...
This commit also added tests for LazyObject and refactored
the testsuite of SimpleLazyObject so that it can share
test cases with LazyObject.
2014-03-13 10:03:01 +01:00
Shai Berger
6983201cfb
Fixed #20292 : Pass datetime objects (not formatted dates) as params to Oracle
...
This seems worthwhile in its own right, but also works around an Oracle
bug (in versions 10 -- 11.1) where the use of Unicode would reset the
date/time formats, causing ORA-01843 errors.
Thanks Trac users CarstenF for the report, jtiai for the initial patch,
and everyone who contributed to the discussion on the ticket.
2014-03-12 23:43:45 +02:00
Shai Berger
fc79c3fb3d
Flake8 corrections
2014-03-12 20:34:05 +02:00
Akis Kesoglou
aaad3e27ac
Fixed #22217 - ManyToManyField.through_fields fixes.
...
- Docs description of arguments mix up.
- Keep it from erroneously masking E332 check.
- Add checks E338 and E339, tweak message of E337.
2014-03-11 19:33:04 -03:00
Ramiro Morales
1d42a86ec7
Tweak password admin change form view context. Refs #21293 .
2014-03-11 09:52:43 -03:00
Tim Graham
6f470650d0
Fixed #21293 -- Adjusted admin header CSS to fix admin password reset template.
...
By removing the absolute positioning of the usertools div and using
float positioning, the #header div will expand based on the height of
its content.
Thanks EvilDMP for the report.
2014-03-11 06:56:27 -04:00
Chris Beaven
107c9f5453
Fix AlterField migrations that are related to a RenameModel migration
2014-03-11 17:13:26 +13:00
Chris Beaven
40f6ca54f8
Fix autodetector creation of RenameModel migration to capitalize model names
2014-03-11 12:23:45 +13:00
Daniel Pyrathon
819e09b848
Fixed #22210 -- Saving model instances to non-related fields.
...
Previously, saving a model instance to a non-related field (in
particular a FloatField) would silently convert the model to an Integer
(the pk) and save it. This is undesirable behaviour, and likely to cause
confusion so the validatio has been hardened.
Thanks to @PirosB3 for the patch and @jarshwah for the review.
2014-03-10 15:25:18 +00:00
Chris Beaven
7feb70eef3
Fixed #22239 -- Add auto detection of renamed models
2014-03-10 13:55:44 +13:00
Aymeric Augustin
7339f43c71
Prevented admin from importing auth.User.
...
Since we don't enforce order between apps, root packages of contrib apps
cannot import models from unrelated apps.
Fix #22005 , refs #21719 .
2014-03-09 20:29:00 +01:00
Aymeric Augustin
8b67fa7551
Revert "Reordered INSTALLED_APPS in default template, refs #22005"
...
This reverts commit a718fcf201
.
2014-03-09 20:10:56 +01:00
Shai Berger
deff74ea0c
Fixed the last fix for database test settings to work with Python3.
2014-03-09 12:27:12 +02:00
Shai Berger
84c137490b
Fixed test breakage following test-settings enhancements
2014-03-09 10:23:47 +02:00
Andrew Godwin
40afdaf08c
Fix weird autodetector error
2014-03-08 18:35:45 -08:00
Shai Berger
41afae4ce9
Reorganized the database test settings
...
Change database test settings from "TEST_"-prefixed entries in the
database settings dictionary to setting in a dictionary that is itself
an entry "TEST" in the database settings.
Refs #21775
Thanks Josh Smeaton for review.
2014-03-09 03:57:18 +02:00
Alex Gaynor
add1584bfa
4 flake8 warning fixes
2014-03-08 16:17:54 -08:00
Andrew Godwin
6b07804474
Fixed #22183 : Through M2Ms now correctly handled
2014-03-08 15:58:04 -08:00
Andrew Godwin
cdf6eba181
Merge pull request #2315 from bendavis78/issues/22073
...
Fixed #22073 - Ensure CreateTable operation handles backwards migration correctly when M2M fields are present
2014-03-08 15:44:45 -08:00
Andrew Godwin
cd7a2a077e
Fixed #22199 : Bad max_length deconstruction for FileField
2014-03-08 13:59:12 -08:00
Andrew Godwin
28779abb75
Fix bad conflict detection during makemigrations
2014-03-08 13:53:20 -08:00
Claude Paroz
0c6a339952
Avoided changing raw DeprecationWarning filter behavior
...
Refs #21188 . Now pure Python DeprecationWarning visibility should
be back to Python defaults.
2014-03-08 11:13:48 +01:00
Claude Paroz
210d0489c5
Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warnings
...
Thanks Anssi Kääriäinen for the idea and Simon Charette for the
review.
2014-03-08 09:57:40 +01:00
Russell Keith-Magee
70ec4d776e
Fixed #22034 -- Added a specific set of relation checks for GenericInlineModelAdmin.
...
Thanks to jwa for the report.
2014-03-08 11:25:23 +08:00
Anssi Kääriäinen
219d928852
Fixed #21863 -- supplemented get_lookup() with get_transform()
...
Also fixed #22124 -- Expanded explanation of exactly what is going on in
as_sql() methods.
2014-03-07 14:52:13 +00:00
James Jenkins
ec675ed6cc
Fixed #22070 -- Changed verbose_name for apps in django.contrib to use title case
...
Thanks bendavis78 for the report.
2014-03-06 18:43:04 -05:00
Andrew Godwin
1232acb884
Don't allow really long migration names
2014-03-06 13:34:31 -08:00
Andrew Godwin
e46e15e5a1
Fixed #22204 : Bad circular-dep-breaking if more than one per run
2014-03-06 13:22:42 -08:00
Andrew Godwin
8ce3ea687c
Revert "Fixed #22183 : Don't make a table for M2Ms with through="
...
This reverts commit 1562b9896f
.
2014-03-06 11:50:04 -08:00
Andrew Godwin
1562b9896f
Fixed #22183 : Don't make a table for M2Ms with through=
2014-03-06 11:35:58 -08:00
Loic Bistuer
34236efc5e
Reworked ErrorDict.as_json() to prevent unnecessary serialization/deserialization step.
...
Thanks @apollo13 for the suggestion. Refs #17413 .
2014-03-06 18:33:58 +01:00
Roger Hu
9b729ddd8f
Fixed #22185 -- Added settings.CSRF_COOKIE_AGE
...
Thanks Paul McMillan for the review.
2014-03-06 08:28:43 -05:00
Claude Paroz
06efeae598
Added --previous flag to msgmerge command used by makemessages
...
Also took the opportunity to slightly refactor gettext options
so as to ease customization by subclassing the command.
Thanks Michal Čihař for the report and initial patch.
2014-03-06 10:20:01 +01:00
Baptiste Mispelon
20948612c7
Fixed issues and added new scripts to urlify.js
...
Added the following scripts:
* Lithuanian (thanks to petraszd for the patch)
* Serbian (thanks to offy)
* Azerbajani (thanks to Ali Ismayilov)
Fixed the following issues:
* In Polish character map, some uppercase letters were
converted to a lowercase ascii equivalent.
* The letter Y with a diaeresis had a lowercase version but no uppercase.
The code was also simplified and cleaned up:
* Use of `var` statements everywhere
* Systematic use of semicolons
* Proper looping over arrays and objects.
Thanks to @oinopion for his help in getting the javascript
into proper shape.
Fixes #8561 , #11035 .
2014-03-06 00:14:27 +01:00
Gabe Jackson
b77f26313c
Fixed #22207 -- Added support for GenericRelation reverse lookups
...
GenericRelation now supports an optional related_query_name argument.
Setting related_query_name adds a relation from the related object back to
the content type for filtering, ordering and other query operations.
Thanks to Loic Bistuer for spotting a couple of important issues in
his review.
2014-03-05 22:37:53 +02:00
Akis Kesoglou
c627da0ccc
Fixed #14549 - Removed restriction of single FKs on intermediary tables
...
Thanks to Loic Bistuer for review. Minor changes to error messages
done by committer.
2014-03-05 22:33:58 +02:00
Chris Wilson
95c74b9d69
Fixed #22206 -- Passed models.TextField.max_length to forms.CharField.maxlength
2014-03-05 20:09:28 +01:00
Athena
5d568bcfa6
Fixed #7571 -- Fixed parameter matching in include()'d urlpattern
...
Fixed URL resolving in the case where an outer regex includes an inner
regex and both regexes use positional parameters instead of named
groups, causing the outer regex's parameters to override the inner
regex's.
Modified the regex url resolver so that it will concatenates and then
normalizes, instead of normalizing and then concatenating.
2014-03-05 00:35:03 +01:00
Alex Gaynor
a248c88372
Fixed three small flake8 violations.
2014-03-04 15:13:15 -08:00
Andrew Godwin
8fcc0140d0
Merge pull request #2396 from loic/ticket21893
...
Fixed #21893 -- ModelState didn't account for MTI parents inherited from abstract models.
2014-03-04 12:33:51 -08:00
Loic Bistuer
6436f1fad9
Fixed #21893 -- ModelState didn't account for MTI parents inherited from abstract models.
2014-03-05 03:25:14 +07:00
zedr
6fe22b30e0
Fixed #22085 -- Added a feature for setting non-expiring keys as the default.
...
This feature allows the default `TIMEOUT` Cache argument to be set to `None`,
so that cache instances can set a non-expiring key as the default,
instead of using the default value of 5 minutes.
Previously, this was possible only by passing `None` as an argument to
the set() method of objects of type `BaseCache` (and subtypes).
2014-03-04 21:16:35 +01:00
Chris Wilson
97a5971324
Fixed typo in internal CharField method
2014-03-04 20:32:54 +01:00
Russell Keith-Magee
20da67d325
Cleaned up a repr() hack that caused problems on Python3.
2014-03-04 09:50:09 +08:00
Thomas Sorrel
53c576452e
Fixed #16727 -- Added protocol-relative URL support to contenttypes.views.shortcut.
2014-03-03 22:57:06 +01:00
Loic Bistuer
7bbb6958dc
Allowed custom querysets when prefetching single valued relations
...
The original patch for custom prefetches didn't allow usage of custom
queryset for single valued relations (along ForeignKey or OneToOneKey).
Allowing these enables calling performance oriented queryset methods like
select_related or defer/only.
Thanks @akaariai and @timgraham for the reviews. Refs #17001 .
2014-03-03 21:35:19 +02:00
Rodolfo Carvalho
0d91225892
Fixed many typos in comments and docstrings.
...
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03 07:38:09 -05:00
Greg Chapple
6acaa52386
Fixed #22135 -- Added ModelAdmin.get_changeform_initial_data().
...
Allows custom behavior for setting initial form data in ModelAdmin.
By default, initial data is set via GET params. The new method allows
this behavior to be overridden.
Thanks egasimus for the suggestion.
2014-03-03 07:28:24 -05:00
Russell Keith-Magee
6b63742ce5
Corrected expected test output to allow for cleanups in signal and compatibility checks.
2014-03-03 19:29:50 +08:00
Russell Keith-Magee
c41335fa27
Added backwards compatibliity checks to reference documentation.
2014-03-03 19:20:48 +08:00
Russell Keith-Magee
21d8175242
Fixed #22193 -- Made hint a truly optional arugment on check messages.
...
Thanks to Thomas Güttler for the suggestion.
2014-03-03 19:16:19 +08:00
Russell Keith-Magee
82ac389486
Edited model and field checks for grammar and consistency.
2014-03-03 18:18:39 +08:00
Russell Keith-Magee
bc4dc6e99c
Edited model check messages for grammar and consistency.
2014-03-03 15:35:42 +08:00
Russell Keith-Magee
f7587b20da
Edited MySQL-specific check messages for grammar and consistency.
2014-03-03 14:31:55 +08:00
Russell Keith-Magee
55ba92a9c9
Edited contrib.sites check messages for grammar and consistency.
2014-03-03 14:27:22 +08:00
Russell Keith-Magee
57e08aa232
Cleanup of contrib.contenttypes check messages.
2014-03-03 14:19:06 +08:00
Russell Keith-Magee
84207b6134
Edited contrib.auth check messages for grammar and consistency.
2014-03-03 13:39:58 +08:00
Russell Keith-Magee
3c5fc708f1
Edited contrib.admin check messages for grammar and consistency.
2014-03-03 13:27:17 +08:00
Aymeric Augustin
7ba29189fa
Restored aliases for two APIs removed by app-loading.
2014-03-02 14:01:52 +01:00
Anubhav Joshi
bb2ca9fe6c
Fixed #22172 -- Allowed index_together to be a single list (rather than list of lists)..
...
Thanks EmilStenstrom for the suggestion.
2014-03-01 15:44:42 -05:00
Erik Romijn
775975f15d
Fixed #22130 -- Deprecated fix_ampersands, removed utils.clean_html()
2014-03-01 14:07:57 +01:00
Sergey Kolosov
8c98f39624
Fixed #15318 -- Added settings for language cookie max-age, path, domain
...
Introduced a number of settings to configure max-age, path, and domain
for the language cookie: LANGUAGE_COOKIE_AGE, LANGUAGE_COOKIE_PATH and
LANGUAGE_COOKIE_DOMAIN.
Thanks sahid for the suggestion.
2014-03-01 07:52:45 -05:00
Baptiste Mispelon
c679cb7f60
Fixed #22168 -- Fixed migrations failing on sqlite when column names are SQL keywords
...
Thanks to trac user fallen_flint for the report and initial patch.
2014-03-01 13:45:45 +01:00
Claude Paroz
a19f0d0c1e
Fixed #22137 -- Made Widget.is_hidden a read-only property
...
Thanks django at patjack.co.uk for the report and the review.
2014-03-01 10:36:48 +01:00
Andrew Godwin
cbd04c7c49
Fix keyword agument names in RunPython to be positional
2014-02-28 09:22:48 -08:00
Tim Graham
72b080c2c8
Removed Django 1.5 upgrade hints for {% url %} tag.
...
Refs #19280 and Refs #19392 .
2014-02-28 07:18:45 -05:00
vvojvoda
c23b3717be
Fixed #21962 -- Added escape_html flag to ErrorDict.as_json()
2014-02-28 07:05:55 -05:00
Claude Paroz
9f76d0d351
Fixed #22136 -- Updated comment for Textarea widget
...
Thanks Aymeric Augustin for the suggestion.
2014-02-27 19:38:37 +01:00
Bouke Haarsma
2bab9d6d9e
Fixed #21389 -- Accept most valid language codes
...
By removing the 'supported' keyword from the detection methods and only relying
on a cached settings.LANGUAGES, the speed of said methods has been improved;
around 4x raw performance. This allows us to stop checking Python's incomplete
list of locales, and rely on a less restrictive regular expression for
accepting certain locales.
HTTP Accept-Language is defined as being case-insensitive, based on this fact
extra performance improvements have been made; it wouldn't make sense to
check for case differences.
2014-02-26 16:58:04 +01:00
Martin Matusiak
48a8b714d4
Fixed bad grammar in a comment.
2014-02-25 21:02:35 -05:00
Claude Paroz
27e9069710
Allowed some auth tests to be run independently
2014-02-23 20:05:45 +01:00
Patrick Robertson
6d18ab01d9
Removed incorrect statement from docstring
...
The docstring of FilterExpression said that it shouldn't be
instantiated from anywhere but the get_filters_from_token
helper function.
However, that helper function was deleted in commit
3ede006fc9
and FilterExpression
is instantiated from inside the compile_filter help function.
2014-02-23 12:33:29 +01:00
Andrew Gorcester
202bf69c2f
Fixed #22095 -- Enabled backward migrations for RunPython operations
...
Added reversible property to RunPython so that migrations will not
refuse to reverse migrations including RunPython operations, so long as
reverse_code is set in the RunPython constructor. Included tests to
check the reversible property on RunPython and the similar RunSQL.
2014-02-23 09:30:02 +01:00
Marcin Sokół
b887408486
Fixed #22113 -- changed object_name to model_name in CBV docs.
...
Thanks to trac user nikunj.sg for the report.
2014-02-22 23:36:54 +01:00
Baptiste Mispelon
7e1376c2b0
Fixed #21741 -- Fixed render_to_string to stop pushing empty dictionaries to its Context
...
Thanks to kezabelle for the report and original patch
and to numerodix for his improved patch.
2014-02-22 23:33:48 +01:00
Alex Gaynor
2798e63fa1
Extra new line to make flake8 happy
2014-02-22 11:50:19 -06:00
Erik Romijn
8cd32f0965
Fixed #22120 -- Documented persistent activation of languages and cleaned up language session key use
2014-02-22 18:29:06 +01:00
Erik Romijn
98f13762d7
Fixed #22123 -- EmailValidator now also accepts IPv6 literals in addresses
2014-02-22 17:45:33 +01:00
Baptiste Mispelon
173aa51997
Fixed #21435 -- Improved error message when urlconf is empty.
...
The new error message now hints that the most likely issue
is a circular import.
Thanks to trac user elena for the report and to
bpeschier for the original patch.
2014-02-22 15:36:49 +01:00
Baptiste Mispelon
926e18d7d1
Deprecated django.utils.text.javascript_quote.
...
Refs #21725 .
2014-02-22 13:50:12 +01:00
Bas Peschier
578bdb532c
Added tests and minified javascript missing in 83a3add4be
.
...
Refs #22038 .
2014-02-22 13:26:29 +01:00
Baptiste Mispelon
3841feee86
Fixed #22107 -- Fixed django.core.files.File object iteration.
...
Due to a mixup between text and bytes, iteration over
a File instance was broken under Python 3.
Thanks to trac user pdewacht for the report and patch.
2014-02-20 19:13:25 +01:00
Claude Paroz
cb844497d0
Fixed #22097 -- Fixed change detection for TypedChoiceField
...
Thanks Igor Mitrenko for the report.
2014-02-20 13:40:42 +01:00
Baptiste Darthenay
b4f21d1807
Fixed #19647 -- Added formats.py for Esperanto.
...
Thanks to Objectivesea and Guttorm Flatabø (dittaeva)!
2014-02-19 11:58:20 +01:00
Tim Graham
e1c8bc8fea
Fixed #21790 -- Removed reliance on an assert in auth.get_user().
...
Thanks matklad for the report.
2014-02-18 14:23:38 -05:00
Tim Graham
20f455b3d6
flake8 fixes (unused imports and variables).
2014-02-18 11:33:30 -05:00
Dmitro
d3e33fff12
Made content_type_extra optional for TemporaryUploadedFile and MemoryUploadedFile.
...
This provides better backwards compatibility for those constructing these
objects manually.
Refs #13721 .
2014-02-18 07:49:42 -05:00
Claude Paroz
621c5cf4a5
Fixed #21732 -- Made compilemessages complain about non-writable location
...
Instead of crashing with a CommandError, now a non-writable location
of mo files will only make compilemessages complain and continue.
Thanks Ramiro Morales for the review.
2014-02-18 13:38:06 +01:00
Baptiste Mispelon
6b310bafc5
Fixed broken tests when running with a non-TTY stdin.
2014-02-18 11:36:07 +01:00
Baptiste Mispelon
2a9ee49f3c
Removed BaseCommand.stdin introduced in 116d39842d
.
...
This option is not actually very useful in the general case
because it doesn't override sys.stdin.
It's still marginally useful for testing some features of
the createsuperuser command so it was moved there.
This commit also makes the detection of a TTY in createsuperuser
a bit more robust, after a suggestion of appolo13.
2014-02-18 11:36:06 +01:00
Baptiste Mispelon
b78f9a12c8
Consolidated all tests for createsuperuser in the same TestCase.
2014-02-18 11:36:06 +01:00
Claude Paroz
45edb9d235
Fixed #22057 -- Ensured reverse_lazy can be used in settings
...
And without causing a circular import. Thanks Akis Kesoglou for
the report.
2014-02-18 10:23:30 +01:00
Ben Davis
df2652c448
Fixed #22073 - Ensure CreateTable operation handles backwards migration correctly when M2M fields are present
2014-02-17 16:51:40 -06:00
Artur Frysiak
faf6a911ad
Fixed #22023 -- Raised an error for values() followed by defer() or only().
...
Previously, doing so resulted in invalid data or crash.
Thanks jtiai for the report and Karol Jochelson,
Jakub Nowak, Loic Bistuer, and Baptiste Mispelon for reviews.
2014-02-17 14:46:13 -05:00
Baptiste Mispelon
a7639722f5
Fixed #7423 -- Skip superuser creation when not running in a TTY.
...
Thanks to trac user galaxy4sale for the original report
and to AeroNotix for the patch.
2014-02-17 04:58:31 +01:00
Baptiste Mispelon
116d39842d
Added the possibility to pass a stdin object to a management command.
...
This makes testing certain features easier.
Thanks to AeroNotix for the original patch.
2014-02-17 04:58:31 +01:00
Andrew Godwin
3c547a423f
Merge pull request #2270 from bmispelon/ticket-22030
...
Fixed #22030 -- Don't assume that all fields have a swappable_setting at...
2014-02-17 01:16:49 +00:00
MattBlack85
a8ba76c2d3
Fixed #19980 : Signer broken for binary keys (with non-ASCII chars).
...
With this pull request, request #878 should considered closed.
Thanks to nvie for the patch.
2014-02-16 16:50:50 +01:00
Marek Wywiał
8274fa60f8
Made the new template.Context.flatten() method a public API.
...
That method was introduced in 9db4271bd1
.
Refs #21765 .
2014-02-16 15:18:45 +01:00
Zbigniew Siciarz
74d4d58b62
Fixed #21939 -- Deprecated loading ssi/url tags from future.
2014-02-16 13:25:21 +01:00
Baptiste Mispelon
9db4271bd1
Fixed bad comparison logic introduced in d97bf2e9c8
.
...
Refs #21765 .
Thanks to kezabelle for the quick report and to onjin
for providing the patch.
2014-02-15 22:58:03 +01:00
Aleksander Budzinski
f46ef750b9
Split line and added indentation for better readability.
2014-02-15 14:25:23 -05:00
Alex Gaynor
cd7f37b647
Corrected a pair of flake8 violations
2014-02-15 10:42:12 -08:00
MattBlack85
1c1dffca75
Fixed #21725 -- Fixed JavaScript quoting encoding.
...
Thanks to nedbatchelder for the report.
2014-02-15 19:39:21 +01:00
Grzegorz Nosek
0b6f9f7c6f
Improved fix for #18373 -- backward compatibility
...
Commit 79558c78
cleaned up the (undocumented) interface of Resolver404
exception, which breaks compatibility with code messing with .args[0]
directly. Revert the cleanup part and simply leave the fix itself.
2014-02-15 17:51:18 +01:00
Christopher Medrela
d0133504e5
Fixed #22047 -- detecting related_name clash with inheritance
...
Thanks to mondone for fruitful colaboration.
2014-02-15 17:24:05 +01:00
Tim Graham
65b421c661
Fixed some flake8 errors from recent commits.
2014-02-15 11:21:15 -05:00
Aaron France
1150053b99
Fixed #21912 -- Improved error message if a view returns None.
...
Thanks brycenesbitt for the report.
2014-02-15 11:18:16 -05:00
Marek Wywiał
d97bf2e9c8
Fixed #21765 -- Added support for comparing Context instances
2014-02-15 17:14:28 +01:00
Grzegorz Nosek
79558c787e
Fixed #18373 - improved handling of Resolver404s from views
...
When django.core.urlresolvers.resolve was called from a view, failed
and the exception was propagated and rendered by technical_404_response,
the URL mentioned on the page was the current URL instead of the URL
passed to resolve().
Fixed by using the path attribute from the Resolver404 exception instead
of request.path_info. Also cleaned up the exceptions to use standard
named parameters instead of stuffing a dict in args[0]
2014-02-15 15:56:04 +01:00
Albert Wang
8bbdcc76e4
Fixed #19299 -- Fixed Nullification of Foreign Keys To CharFields
...
Thanks tunixman for the report and Baptiste Mispelon and
Shai Berger for reviews.
2014-02-15 09:47:32 -05:00
Rodolfo Carvalho
4d4e0ea461
Fixed two typos.
2014-02-15 15:16:16 +01:00
Rodolfo Carvalho
fd4d8f0f52
Fixed typo in comment.
2014-02-15 15:14:58 +01:00
Aaron France
23b781cc3d
Fixed #22018 -- Fixed checks for ModelAdmin.fields not handling sub-lists.
...
Flatten a level of sublists before checking for duplicate fields.
When given sublists such as:
```python
class FooAdmin(admin.ModelAdmin):
fields = ('one', ('one', 'two'))
```
The previous code did not correctly detect the duplicated 'one' field.
Thanks to jwa for the report.
2014-02-15 15:01:44 +01:00
Rodolfo Carvalho
2ebccebf06
Fixed typo in test docstring.
2014-02-15 14:19:33 +01:00
Tim Graham
8251438cb8
Moved relative URL handling added in refs #21177 to a better place.
...
Thanks apollo13: "reverse() shouldn't know about absolute/relative paths."
2014-02-15 07:54:35 -05:00
Rodolfo Carvalho
be6d1f39e8
Fixed typo in docstring.
2014-02-15 13:35:41 +01:00
Anton Baklanov
0bd92d68ad
Fixed #22035 -- reordered migration operations
...
Now AddField actions appear in operations list before AlterUniqueTogether
actions.
Thanks to SmileyChris for the report.
2014-02-14 20:00:39 -05:00
Klemens Mantzos
f683cb90be
Fixed #21924 -- Added the ability to specify a reverse order for admin_order_field.
...
Thanks Klemens Mantzos for the report and initial patch.
2014-02-14 19:53:44 -05:00
Lukasz Balcerzak
0242134d32
Fixed #17942 -- Added a JsonResponse class to more easily create JSON encoded responses.
...
Thanks leahculver for the suggestion and Erik Romijn,
Simon Charette, and Marc Tamlyn for the reviews.
2014-02-14 18:25:19 -05:00
Antoine Catton
e3d0790bd0
Fixed #21177 -- Made resolve_url support relative URLs.
...
This fixes redirecting to relative URLs with django.shortcuts.redirect.
2014-02-14 17:58:03 -05:00
Bas Peschier
83a3add4be
Removed _actions_icnt declaration from local scope in admin JS.
...
Commit 4523fcd
introduces _actions_icnt to the local scope,
which overrides the value set in the HTML.
The admin would incorrectly show selected rows in a change list
as "1 of undefined selected".
2014-02-13 14:30:18 -05:00
Baptiste Mispelon
6873eeeefb
Fixed #22030 -- Don't assume that all fields have a swappable_setting attribute.
2014-02-13 17:43:21 +01:00
Florian Apolloner
474eeccb52
Fixed a typo (I guess).
2014-02-13 17:36:53 +01:00
Jeremy
f94f466cd3
Fixed #19496 -- Added truncatechars_html filter.
...
Thanks esevece for the suggestion and Nick Sandford and Martin Warne
for the inital work on the patch.
2014-02-13 10:27:27 -05:00
Adam Avramov
390001ce52
Fixed #21064 -- Refactored common logic in ModelAdmin.add_view and change_view.
2014-02-13 07:31:18 -05:00
Andrew Godwin
f0f1ba75b0
Fixed #21856 : Don't crash runserver when DATABASES = {}
2014-02-12 19:09:43 +00:00
Andrew Godwin
7e941ba67c
Reverting unapplied migrations check away from being a system-level check.
...
This reverts commit 0ac13ecceb
.
2014-02-12 18:55:20 +00:00
Andrew Godwin
bad9456b9c
Fix my slightly hasty autodetector changes
2014-02-12 17:22:50 +00:00
Andrew Godwin
80bbe2265d
Remove redunant code from RunPython operation
2014-02-12 17:21:25 +00:00
Andrew Godwin
b333de0f5d
Add --empty option to makemigrations
2014-02-12 17:16:40 +00:00
Loic Bistuer
7e27885c6e
Reworked the detection of local storages for the collectstatic command.
...
Before 4befb30
the detection was broken because we used isinstance
against a LazyObject rather than against a Storage class. That commit
fixed it by looking directly at the object wrapped by LazyObject.
This could however be a problem to anyone who subclasses the
collectstatic management Command and directly supplies a Storage class.
Refs #21581 .
2014-02-12 11:00:01 -05:00
Eli Bendersky
73f51e4113
Fixed #22025 -- Listing app followed by app.Model in dumpdata command
...
When invoked as follows:
$ python manage.py dumpdata blogapp blogapp.Tag
Django would throw a TypeError. This commit fixes the problem and provides
a test.
2014-02-12 15:34:26 +01:00
Claude Paroz
e0381cdf2e
Fixed #22017 -- Prevented RuntimeError on Python 3
...
Refs #21049 . Thanks quinox for the report.
2014-02-12 10:26:08 +01:00
Christopher Adams
eefc88feef
Fixed #2445 -- Allowed limit_choices_to attribute to be a callable.
...
ForeignKey or ManyToManyField attribute ``limit_choices_to`` can now
be a callable that returns either a ``Q`` object or a dict.
Thanks michael at actrix.gen.nz for the original suggestion.
2014-02-11 14:05:12 -05:00
Florian Apolloner
a718fcf201
Reordered INSTALLED_APPS in default template, refs #22005
2014-02-11 09:01:48 +01:00
Claude Paroz
fb1e3435a4
Fixed #21996 -- Used proper encoding for GeoIP content
...
Thanks Florent Messa for the report.
2014-02-10 16:09:04 +01:00
Christopher Medrela
ee9fcb1672
Fixed #17673 -- Forbid field shadowing.
...
Thanks Anssi Kääriäinen for the suggestion.
2014-02-10 10:04:19 -05:00
julien 'pouete' Godin
f5123c7291
Fixed #21371 -- Added the block.super to admin bodyclass blocks.
...
Thanks Keryn Knight for the report.
2014-02-10 09:13:29 -05:00
Julian Wachholz
9a4ee8ddb8
Fixed #21994 -- Added form_dict argument to calls of WizardView.done()
...
Added an additional keyword argument ``form_dict`` to calls of
WizardView.done() implementations which allows easier access to validated
forms by their step name.
2014-02-10 07:28:39 -05:00
Si Feng
b102c27ff4
Fixed #20784 -- Added inverse_match parameter to RegexValidator.
2014-02-10 05:38:43 -05:00
Chris Bailey
c5395eef76
Allowed a message to be passed to assertQuerysetEqual to make it consistent with other assert methods.
2014-02-10 05:21:23 -05:00
Tim Graham
21f034165c
Removed unused import in humanize tests.
2014-02-09 16:30:08 -05:00
Adam Avramov
651a6f76f3
Fixed #21992 : Skipped test when pytz is missing.
...
The test fails on Windows when pytz is not installed.
2014-02-09 16:23:14 -05:00
Robert Stapenhurst
12385a5f86
Fixed #21763 -- Added an error msg for missing methods on ManyRelatedManager.
...
Attempting to add() and remove() an object related by a 'through' model
now raises more descriptive AttributeErrors, in line with set and
create().
2014-02-09 16:01:17 -05:00
Claude Paroz
e2f28572b7
Merge pull request #2245 from funkybob/parse_header
...
Replaced _parse_content_type with cgi.parse_header
2014-02-09 20:39:07 +01:00
Marc Tamlyn
d238ab2991
Silence deprecation warnings.
...
Also they should only be raised if allow_syncdb does exist, not just if
allow_migrate does not.
Refs comments on 250841017c
2014-02-09 17:48:15 +00:00
Ryan Kaskel
d25622000a
Fixed #21382 - Added "has_original" to stacked inlines.
...
Report and original patch from jrief.
2014-02-09 12:20:09 -05:00
Alasdair Nicol
1b29d32894
Fixed #21771 -- Made log_deletion consistent with other log methods.
...
Thanks Keryn Knight for the report.
2014-02-09 12:08:03 -05:00
Jannis Leidel
f90be002d9
Fixed #20780 -- Get rid of stale symlinks when using collectstatic.
...
Thanks to John Giannelos for the initial patch.
2014-02-09 14:48:11 +00:00
Vajrasky Kok
6a9ed7d403
Fixed #19879 -- Have 'findstatic' says on which directories it searched the relative paths.
...
Added searched_locations in finders module. Added verbosity flag level 2 on 'findstatic'
command that will output the directories on which it searched the relative paths.
Reported by ccurvey. Initial patch by Jonas Svensson and Vajrasky Kok.
2014-02-09 14:22:22 +00:00
Andrew Godwin
935e6c1dfc
Fixed #21868 : Don't die when seeing py3 namespace packages for mig dirs
2014-02-09 14:03:41 +00:00
Andrew Godwin
11c021336c
Fixed #21958 : Handle dependencies for swappable models in AddField
2014-02-09 12:46:38 +00:00
Andrew Godwin
42607a9e33
Fixed #21844 : Move quote_parameter off of Operations and rename
2014-02-09 12:42:26 +00:00
Jannis Leidel
5cc0555603
Fixed #21482 -- Uplifted restriction of collectstatic using symlink option in Windows NT 6.
...
Original patch by Vajrasky Kok. Reviewed by Florian Apolloner, Aymeric Augustin.
2014-02-09 12:39:20 +00:00
Andrew Godwin
9c4ad454d1
Fixed #21842 : Remove redundant DatabaseFeatures.max_index_name_length
2014-02-09 12:33:52 +00:00
Andrew Godwin
d5df7a0515
Fixed #21969 : Fix behaviour of initial_data with migrated apps
2014-02-09 12:22:59 +00:00
Marc Tamlyn
250841017c
Raise (pending) deprecation warning for allow_syncdb.
2014-02-09 11:42:34 +00:00
Andrew Godwin
2085f53f56
Fixed #21968 : Bad detection of old-style apps to add initial migration
2014-02-09 11:42:10 +00:00
Ryan Kaskel
75a96f06e9
Fixed #21967 : Added check for object in ModelFormMixin.get_form_kwargs.
...
Thanks lagovas.lagovas at gmail.com for the report.
2014-02-09 06:30:03 -05:00
Marc Tamlyn
80cd64ee17
Fixed #21247 -- Made method_decorator play nicely with descriptors
...
When a method decorator was used in conjunction with a decorator
implemented as a descriptor, method_decorator did not correctly respect
the method binding.
Thanks for Graham Dumpleton for the report and initial patch.
2014-02-09 11:23:09 +00:00
Andrew Godwin
97a8fd4682
Fixed #21954 : Raise nice error when serializing datetimes with timezones
2014-02-09 11:17:38 +00:00
Tim Graham
4f8e8a6ec2
Removed unused imports + other flake8 fixes.
2014-02-09 06:13:10 -05:00
Andrew Godwin
a7e2957110
Fixed #21917 : Overly cautious SQLite3 backend for null fields + defaults
2014-02-09 11:10:21 +00:00
Andrew Godwin
98dd8dd02e
Fixed #21892 : RunPython no longer accepts strings
2014-02-09 10:54:02 +00:00
Andrew Godwin
38b4adc696
Merge pull request #2244 from mlavin/21856-migration-checks
...
Fixed #21856 : Allow Empty DATABASES Setting
2014-02-09 10:46:57 +00:00
Marc Tamlyn
46a87214ca
Merge pull request #1997 from dpwrussell/method_decorator_args_fix
...
Used available_attrs in method_decorator
2014-02-09 10:12:22 +00:00
Curtis
f43e895b15
Replace _parse_content_type with cgi.parse_header
2014-02-09 10:01:16 +11:00
Kevin Christopher Henry
6fe26bd3ee
Fixed #19373 -- Ported Windows file locking from PyWin32 to ctypes
...
There wasn't any file locking under Windows unless PyWin32 was
installed. This removes that (undocumented) dependency by using ctypes
instead.
Thanks to Anatoly Techtonik for writing the ctypes port upon which this
is based.
2014-02-08 15:52:06 -05:00
Aymeric Augustin
07ae47f7f8
Fixed #21959 -- Handled Inf/NaN in widthratio tag.
...
Thanks rmoe for the report and the patch.
2014-02-08 21:01:55 +01:00
Berker Peksag
5d263dee30
Fixed #21674 -- Deprecated the import_by_path() function in favor of import_string().
...
Thanks Aymeric Augustin for the suggestion and review.
2014-02-08 11:12:19 -05:00
mlavin
0ac13ecceb
Remove check_migrations from the runserver command and use the new checks framework to check for unapplied migrations. Don't check for migrations if the DATABASES setting is empty.
2014-02-08 09:01:59 -05:00
Mitar
b041850853
Allowed more easily subclassing of BlockNode tags.
2014-02-08 07:22:11 -05:00
Tom Fifield
114b70ccf8
Fixed #21237 -- Added Australian English (en_AU) to locale conf
...
Adds Australian English (en_AU) to locale conf, which differs from
American English in date formatting and spelling, and continues
to diverge from British English in spelling (and first-day-of-week
according to the current en_GB locale format.py).
The transifex language project to match this patch has been requested.
2014-02-08 07:12:46 -05:00
Claude Paroz
02add43568
Fixed #21417 -- Expanded TEMPLATE_STRING_IF_INVALID in blocktrans
...
Thanks keturn for the reporti, Chris Medrela for details and
Tim Graham for the review.
Refs #19915 .
2014-02-08 11:06:54 +01:00
Loic Bistuer
8847a0c601
Fixed #16192 -- Made unique error messages in ModelForm customizable.
...
Overriding the error messages now works for both unique fields, unique_together
and unique_for_date.
This patch changed the overriding logic to allow customizing NON_FIELD_ERRORS
since previously only fields' errors were customizable.
Refs #20199 .
Thanks leahculver for the suggestion.
2014-02-08 04:59:09 -05:00
Chris Wilson
65131911db
Fixed #21518 -- Made override_settings(ROOT_URLCONF) clear the resolver cache.
...
Thanks Aymeric Augustin and Simon Charette for reviews.
2014-02-07 15:29:25 -05:00
Jacob Kaplan-Moss
43510cffcb
Bumped version number for 1.7a2
2014-02-06 15:54:27 -06:00
Vajrasky Kok
d3cf6cfacf
Fixed #17713 -- Renamed BaseDatabaseFeatures.allows_primary_key_0 to allows_auto_pk_0.
...
MySQL does allow primary key with value 0. It only forbids autoincrement
primary key with value 0.
Thanks Claude Paroz for the report.
2014-02-06 05:16:40 -05:00
Christopher Medrela
b22d6c47a7
Fixed #17005 -- Added CurrentSiteMiddleware to set the current site on each request.
...
Thanks jordan at aace.org for the suggestion.
2014-02-06 04:45:49 -05:00
Vajrasky Kok
c43c469a2e
Fixed #21731 -- Made javascript_quote escapes '</'.
2014-02-06 04:02:09 -05:00
Baptiste Mispelon
a878bf9b09
Revert "Fixed #20296 -- Allowed SafeData and EscapeData to be lazy"
...
This reverts commit 2ee447fb5f
.
That commit introduced a regression (#21882 ) and didn't really
do what it was supposed to: while it did delay the evaluation
of lazy objects passed to mark_safe(), they weren't actually
marked as such so they could end up being escaped twice.
Refs #21882 .
2014-02-05 21:22:40 +01:00
Baptiste Mispelon
a0fc7fa5df
Fixed ImportError when running contrib.gis tests without libgeos installed.
2014-02-05 21:17:01 +01:00
Florian Apolloner
297c009cf2
Simplified signal code.
...
Refs #21952
2014-02-05 20:57:40 +01:00
Anssi Kääriäinen
c29d6f7676
Fixed #21952 -- signals deadlock due to locking + weakref interaction
2014-02-05 20:57:40 +01:00
Marc Tamlyn
aea9faa146
Fix pep8 violation in migration template.
2014-02-05 14:39:44 +00:00
Alex Gaynor
6f504266b2
Removed two imports which are now unused
2014-02-04 15:45:18 -08:00
Claude Paroz
343dfff133
Removed the this_is_the_login_form hack
...
Refs #21911 . Now that we have a more traditional login form, we
don't need any more a special field telling us we are dealing with
the login form.
2014-02-04 20:02:28 +01:00
Claude Paroz
be0ad62994
Fixed #21911 -- Made admin views redirect to login when needed
...
Historically, the Django admin used to pass through the request
from an unauthorized access to the login view directly. Now we
are using a proper redirection, which is also preventing
inadvertantly changing data when POSTing login data to an admin
view when user is already authorized.
Thanks Marc Tamlyn and Tim Graham for the reviews.
2014-02-04 20:02:28 +01:00
Claude Paroz
5848bea9dc
Made staff_member_required redirect to login
...
Refs #21911 .
2014-02-04 20:02:28 +01:00
Anssi Kääriäinen
35cecb1ebd
Fixed #21748 -- join promotion for negated AND conditions
...
Made sure Django treats case .filter(NOT (a AND b)) the same way as
.filter((NOT a OR NOT b)) for join promotion.
2014-02-04 18:48:06 +02:00
Claude Paroz
6e0f1bc06d
Moved a GoogleMap test
2014-02-03 16:22:10 +01:00
David Fischer
e7e3435b4d
Fixed #21934 -- Added unicode support in GoogleMap class
2014-02-03 16:18:32 +01:00
Michael Manfre
e1d839237f
Make mysql's CursorWrapper a contextmanager.
2014-02-02 22:43:53 +01:00
Alex Gaynor
5616234d4d
Removed an unused import which snuck in.
2014-02-02 12:14:16 -08:00
Thomas Grainger
a42e04f77d
Used the proxied call to staticfiles_storage.url
2014-02-02 15:09:34 -05:00
Claude Paroz
9ab798a8d8
Fixed #21930 -- Only import add_srs_entry if GDAL is installed
...
Fixed regression introduced by fabc678f93
. Thanks Michael Manfre
for the report.
2014-02-02 20:05:35 +01:00
Michael Manfre
3ffeb93186
Ensure cursors are closed when no longer needed.
...
This commit touchs various parts of the code base and test framework. Any
found usage of opening a cursor for the sake of initializing a connection
has been replaced with 'ensure_connection()'.
2014-02-02 12:47:21 -05:00
Michael Manfre
0837eacc4e
Made SQLCompiler.execute_sql(result_type) more explicit.
...
Updated SQLUpdateCompiler.execute_sql to match the behavior described in
the docstring; the 'first non-empty query' will now include all queries,
not just the main and first related update.
Added CURSOR and NO_RESULTS result_type constants to make the usages more
self documenting and allow execute_sql to explicitly close the cursor when
it is no longer needed.
2014-02-02 12:47:06 -05:00
Aymeric Augustin
76ff266df1
Avoided importing models from django.contrib.admin.
...
Fixed #21923 . Refs #21719 .
2014-02-01 20:38:15 +01:00
Aymeric Augustin
f9698c4391
Suppressed the `if Site._meta.installed` pattern.
...
The purpose of this construct is to test if the django.contrib.sites
application is installed. But in Django 1.9 it will be forbidden to
import the Site model when the django.contrib.sites application isn't
installed.
No model besides Site used this pattern.
Refs #21719 , #21923 .
2014-02-01 20:38:15 +01:00
Claude Paroz
9c8d62a06f
Fixed #21907 -- Fixed add_srs_entry for Spatialite >= 4
...
Thanks dfunckt for the report.
2014-01-30 09:49:02 +01:00
Claude Paroz
fabc678f93
Added new srs test and various cleaning
2014-01-30 09:48:45 +01:00
Shai Berger
e9d12bae1e
Made Oracle introspect FloatFields correctly
...
Broke InspectDBTestCase.test_field_types in two:
- a test_number_field_types, which now passes on Oracle too
- a test_field_types, for all non-numeric fields, which is still expected to fail
Also made some pep8 fixes in the tests file. Refs #19884
Thanks Tim Graham for review.
2014-01-30 00:41:11 +02:00
Shai Berger
ad975c64fc
Made Oracle introspect boolean fields
...
Fixed failing test schema.tests.SchemaTests.test_add_field_temp_default_boolean
Refs #19884
2014-01-29 18:08:01 +02:00
Anssi Kääriäinen
0ca647357e
Fixed #21883 -- Added six.moves.xrange import
...
When moving code around from sql.where to lookups six.moves.xrange
import was forgotten. The xrange import is needed on Python 3.
2014-01-28 21:08:37 +02:00
Tim Graham
2b6914049a
Fixed #21849 -- Included the count of silenced system checks in output.
2014-01-28 08:31:02 -05:00
Loic Bistuer
3e4dc5ecf2
Fixed #21853 -- Fixed Manager.__module__ to properly return 'django.db.models.manager'.
...
The combination of BaseManager.from_queryset() and RenameMethodsBase results in
Manager.__module__ having the wrong value. This can be an issue when trying to
pickle the Manager class.
2014-01-28 08:17:01 -05:00
Carl Meyer
88a2d39159
Fixed #21874 -- Require Django applications to have a filesystem path.
...
Wherever possible this filesystem path is derived automatically from the app
module's ``__path__`` and ``__file__`` attributes (this avoids any
backwards-compatibility problems).
AppConfig allows specifying an app's filesystem location explicitly, which
overrides all autodetection based on ``__path__`` and ``__file__``. This
permits Django to support any type of module as an app (namespace packages,
fake modules, modules loaded by other hypothetical non-filesystem module
loaders), as long as the app is configured with an explicit filesystem path.
Thanks Aymeric for review and discussion.
2014-01-27 15:34:22 -07:00
Aymeric Augustin
b87bc461c8
Removed TransRealMixin.
...
Fixed #21688 . Refs https://github.com/django/django/pull/1147 .
2014-01-27 22:02:07 +01:00
Aymeric Augustin
b951a7fbc1
Removed superfluous uses of TransRealMixin.
...
The translation.override context manager cleans up after itself. As a
consequence this mixin isn't needed any more in many cases.
2014-01-27 22:01:22 +01:00
Aymeric Augustin
3145ae06be
Minor cleanup.
2014-01-27 22:01:22 +01:00
Andrew Godwin
6758a9c0fc
Fixed #21872 : Not detecting dependencies from M2M fields
2014-01-27 11:49:55 +00:00
Tim Graham
780ae7e9f8
Fixed #21823 -- Upgraded six to 1.5.2
2014-01-26 15:13:35 -05:00
Simon Charette
10e3faf191
Fixed #19774 -- Deprecated the contenttypes.generic module.
...
It contained models, forms and admin objects causing undesirable
import side effects. Refs #16368 .
Thanks to Ramiro, Carl and Loïc for the review.
2014-01-26 14:42:30 -05:00
Simon Charette
c3881944e8
Fixed some missing/extraneous new line warnings.
2014-01-26 14:32:01 -05:00
Wojciech Banaś
8f2f48ecc9
Fixed #21866 -- Replaced "COMMIT" in managmement command SQL with backend hook.
2014-01-26 12:42:41 -05:00
Aymeric Augustin
2b154ae280
Fixed #21880 -- Added missing items to django.utils.timezone.__all__.
...
Thanks Wim for the report.
2014-01-26 15:35:22 +01:00
Aymeric Augustin
4f03b718f7
Fixed #21877 -- Renamed django.apps.base to config.
2014-01-26 13:17:03 +01:00
Aymeric Augustin
f901b4d6c8
Took advantage of the new get_model API. Refs #21702 .
2014-01-26 13:08:05 +01:00
Aymeric Augustin
3c47786cb9
Fixed #21702 -- get_model('app_label.ModelName').
...
Also added tests for get_model.
2014-01-26 13:01:09 +01:00