Commit Graph

934 Commits

Author SHA1 Message Date
Unai Zalakain fd219fa24c Fixed #8261 -- ModelAdmin hook for customising the "show on site" button
``ModelAdmin.view_on_site`` defines wether to show a link to the object on the
admin detail page. If ``True``, cleverness (i.e. ``Model.get_absolute_url``) is
used to get the url. If it's a callable, the callable is called with the object
as the only parameter. If ``False``, not link is displayed.

With the aim of maitaining backwards compatibility, ``True`` is the default.
2013-10-29 17:10:12 -04:00
Paolo Melchiorre 3b0293370a Fixed typo in docs/releases/1.4.9.txt. 2013-10-25 07:55:05 -04:00
SusanTan 4e0a2fe59c Fixed #21271 -- Added timeout parameter to SMTP EmailBackend.
Thanks Tobias McNulty and Tim Graham for discussions and code review.
Thanks Andre Cruz the suggestion and initial patch.
2013-10-24 20:38:00 -04:00
Vajrasky Kok 9eecb91695 Fixed #21219 -- Added a way to set different permission for static files.
Previously, when collecting static files, the files would receive permission
from FILE_UPLOAD_PERMISSIONS. Now, there's an option to give different
permission from uploaded files permission by subclassing any of the static
files storage classes and setting the file_permissions_mode parameter.

Thanks dblack at atlassian.com for the suggestion.
2013-10-24 17:40:01 -04:00
Curtis Maloney 8688f03eef Fixed #20945 -- Allowed cache tag to use a specific cache. 2013-10-23 19:27:08 -04:00
Tim Graham 4ce5c119b5 Bumped release date for 1.5.5 & 1.4.9. 2013-10-23 18:28:41 -04:00
Collin Anderson d72059c2ae typo on 1.7 release notes 2013-10-23 10:56:13 -04:00
Tim Graham 2eb8f15516 Added 1.5.5 and 1.4.9 release notes 2013-10-22 17:41:10 -04:00
Florian Hahn 5240b83462 Fixed #17027 -- Added support for the power operator in F expressions.
Thanks dan at dlo.me for the initial patch.

- Added __pow__ and __rpow__ to ExpressionNode
- Added oracle and mysql specific power expressions
- Added used-defined power function for sqlite
2013-10-22 10:29:57 -04:00
Bouke Haarsma 0d0f4f020a Fixed #5789 -- Changed LocaleMiddleware session variable to '_language'.
The old 'django_language' variable will still be read from in order
to migrate users. The backwards-compatability shim will be removed in
Django 1.8.

Thanks to jdunck for the report and stugots for the initial patch.
2013-10-22 09:24:42 -04:00
Tim Graham 28b70425af Added docs for the hasher's iteration count changes. 2013-10-21 20:32:02 +02:00
Tim Graham 651bb73ab3 Fixed ReST error in 1.6. release notes. 2013-10-18 08:47:28 -04:00
Tim Graham d97bec5ee3 Removed 1.6 release note text regarding password limit length.
This changed was reverted in 5d74853e15.
2013-10-17 18:58:24 -04:00
Bouke Haarsma 2fb5a51fa3 Fixed #18659 -- Deprecated request.REQUEST and MergeDict
Thanks Aymeric Augustin for the suggestion.
2013-10-17 09:42:28 -04:00
Marc Tamlyn 349c12d3f5 Fixed #16855 -- select_related() chains as expected.
select_related('foo').select_related('bar') is now equivalent to
select_related('foo', 'bar').

Also reworded docs to recommend select_related(*fields) over select_related()
2013-10-15 15:59:36 +01:00
Unai Zalakain c7634cd7fe Fixed #7603 -- Added a 'scheme' property to the HttpRequest object
`HttpRequest.scheme` is `https` if `settings.SECURE_PROXY_SSL_HEADER` is
appropriately set and falls back to `HttpRequest._get_scheme()` (a hook
for subclasses to implement) otherwise.

`WSGIRequest._get_scheme()` makes use of the `wsgi.url_scheme` WSGI
environ variable to determine the request scheme.

`HttpRequest.is_secure()` simply checks if `HttpRequest.scheme` is
`https`.

This provides a way to check the current scheme in templates, for example.
It also allows us to deal with other schemes.

Thanks nslater for the suggestion.
2013-10-15 09:04:12 -04:00
Loic Bistuer b16dd1fe01 Fixed #8620 -- Updated the Form metaclass to support excluding fields by shadowing them. 2013-10-14 22:42:33 +07:00
Loic Bistuer ac5ec7b8bc Fixed #19617 -- Refactored Form metaclasses to support more inheritance scenarios.
Thanks apollo13, funkybob and mjtamlyn for the reviews.
2013-10-14 21:59:30 +07:00
Claude Paroz 1e8eadc94e Fixed #15888 -- Made tablename argument of createcachetable optional
Thanks Aymeric Augustin for the report and the documentation and
Tim Graham for the review.
2013-10-14 13:24:40 +02:00
Claude Paroz 21c2bfdff3 Updated OpenLayers version from 2.11 to 2.13 2013-10-12 18:08:07 +02:00
Tai Lee e527c0b6d8 Fixed #13252 -- Added ability to serialize with natural primary keys.
Added ``--natural-foreign`` and ``--natural-primary`` options and
deprecated the ``--natural`` option to the ``dumpdata`` management
command.

Added ``use_natural_foreign_keys`` and ``use_natural_primary_keys``
arguments and deprecated the ``use_natural_keys`` argument to
``django.core.serializers.Serializer.serialize()``.

Thanks SmileyChris for the suggestion.
2013-10-11 12:52:57 -04:00
Tim Graham 945e033a69 Fixed #8918 -- Made FileField.upload_to optional.
Thanks leahculver for the suggestion and dc and vajrasky for work
on the patch.
2013-10-11 08:07:25 -04:00
Tim Graham 1dae4ac177 Whitespace cleanup.
* Removed trailing whitespace.
* Added newline to EOF if missing.
* Removed blank lines at EOF.
* Removed some stray tabs.
2013-10-10 16:49:20 -04:00
Russell Keith-Magee ddb53856b6 Fixed #21164 -- Added documentation for issue with test users.
The package renaming restores the older package names (which were also the
documented package names). This doesn't affect test discovery because the
module in question doesn't contain any tests.

Thanks to Carl for the design discussion.
2013-10-08 10:32:56 +08:00
Ryan Kaskel 8b0014869f Fixed #19321 -- Allowed redirect middleware HTTP responses to be overridden.
Thanks Melevir for the suggestion.
2013-10-04 07:36:39 -04:00
Emil Stenström 7a97df190c Fixed #19277 -- Added LocaleMiddleware.response_redirect_class
Thanks ppetrid at yawd.eu for the suggestion.
2013-10-03 16:15:29 -04:00
Simon Charette fa2e1371cd Fixed #21216 -- Allow `OneToOneField` reverse accessor to be hidden. 2013-10-03 13:20:05 -04:00
Baptiste Mispelon e1b7723817 Changed the doc to use gender-neutral pronouns when possible. 2013-10-02 16:41:04 +02:00
Ramiro Morales 1d0fc61b1c Fixed #15185 -- Allowed ModelAdmin.list_display_links=None to disable change list links.
Thanks rm_ for the suggestion.
2013-10-01 14:25:54 -04:00
Michael Manfre bf757a2f4d Fixed #21147 -- Avoided time.time precision issue with cache backends.
The precision of time.time() is OS specific and it is possible for the
resolution to be low enough to allow reading a cache key previously set
with a timeout of 0.
2013-10-01 13:42:59 -04:00
Russell Keith-Magee 9595183d03 Fixed #13724: Corrected routing of write queries involving managers.
Previously, if a database request spanned a related object manager, the
first manager encountered would cause a request to the router, and this
would bind all subsequent queries to the same database returned by the
router. Unfortunately, the first router query would be performed using
a read request to the router, resulting in bad routing information being
used if the subsequent query was actually a write.

This change defers the call to the router until the final query is acutally
made.

It includes a small *BACKWARDS INCOMPATIBILITY* on an edge case - see the
release notes for details.

Thanks to Paul Collins (@paulcollinsiii) for the excellent debugging
work and patch.
2013-09-30 13:05:43 +08:00
Erik Romijn 1a63092981 Fixed #20439 -- Started deprecation of IPAddressField 2013-09-28 10:55:32 +02:00
Michael Manfre 99c87f1410 Fixed #17671 - Cursors are now context managers. 2013-09-25 21:47:26 +03:00
Loic Bistuer 04a2a6b0f9 Fixed #3871 -- Custom managers when traversing reverse relations. 2013-09-25 21:15:59 +03:00
Ramiro Morales bebb449ac3 Added docs for changes in commit dd3a883894.
Refs #20693.
2013-09-22 15:43:27 -03:00
Rogério Yokomizo 1b4b710355 Fixed #21141 -- Update Sphinx URL
Updated Sphinx URL from http://sphinx.pocoo.org/ to http://sphinx-doc.org/.
2013-09-22 14:44:09 -03:00
tschilling 0d1ba84d13 Fixed #20702 -- Deprecated get_formsets in favor of get_formsets_with_inlines.
Thanks stanislas.guerra at gmail.com for the report.
2013-09-20 07:47:24 -04:00
Paul McMillan f8f47718ab Merge pull request #1644 from PaulMcMillan/bump_hash_iterations
Increase default PBKDF2 iterations
2013-09-19 12:17:56 -07:00
yokomizor df27803a55 Fixed #9532 -- Added min_num and validate_min on formsets.
Thanks gsf for the suggestion.
2013-09-19 13:11:49 -04:00
Paul McMillan a075e2ad0d Increase default PBKDF2 iterations
Increases the default PBKDF2 iterations, since computers have gotten
faster since 2011. In the future, we plan to increment by 10% per
major version.
2013-09-19 18:02:25 +01:00
Curtis Maloney 4e9f800742 Fixed #21125 -- Removed support for cache URI syntax 2013-09-19 10:01:39 -04:00
Russell Keith-Magee 9d3e60aa3e Reworked security issue list to be per-issue, not per-release. 2013-09-19 14:57:01 +08:00
Russell Keith-Magee 8e134c27c9 Corrected markup problems in new security summary page. 2013-09-19 13:57:02 +08:00
Alex Gaynor 8b3bae9466 Fixed two typos in the docs 2013-09-18 23:29:55 -05:00
Alex Gaynor c65ae7c969 Fixed a typo in the docs 2013-09-18 23:26:24 -05:00
James Bennett a2e25e8a83 Fix #21121: Add archive of security issues. 2013-09-18 23:13:04 -05:00
Brian Holdefehr 98514849dc Fixed #19414 -- Added admin registration decorator
Thanks stavros for the suggestion.
2013-09-18 11:44:10 -04:00
Berker Peksag 2f0566fa61 Fixed #4278 -- Added a dirs parameter to a few functions to override TEMPLATE_DIRS.
* django.template.loader.get_template()
* django.template.loader.select_template()
* django.shortcuts.render()
* django.shortcuts.render_to_response()

Thanks amcnabb for the suggestion.
2013-09-18 07:37:08 -04:00
Tim Graham 18ffdb1772 Fixed #17627 -- Renamed util.py files to utils.py
Thanks PaulM for the suggestion and Luke Granger-Brown and
Wiktor Kołodziej for the initial patch.
2013-09-16 12:52:05 -04:00
Tim Graham 8d29005524 Cleaned up 1.5.4/1.4.8 release notes 2013-09-15 14:14:26 -04:00
Russell Keith-Magee aae5a96d57 Ensure that passwords are never long enough for a DoS.
* Limit the password length to 4096 bytes
  * Password hashers will raise a ValueError
  * django.contrib.auth forms will fail validation
* Document in release notes that this is a backwards incompatible change

Thanks to Josh Wright for the report, and Donald Stufft for the patch.

This is a security fix; disclosure to follow shortly.
2013-09-15 13:42:23 +08:00
Tim Graham ec89e1725a Fixed #21100 -- Noted that Create/UpdateViews.fields is new in 1.6
Thanks AndrewIngram for the suggestion.
2013-09-13 09:34:12 -04:00
Matt Austin 9451d8d558 Fixed #21095 -- Documented new requirement for dates lookups.
Day, month, and week_day lookups now require time zone definitions in the database.
2013-09-13 09:56:19 +02:00
Tim Graham baec6a26dd Added 1.4.7/1.5.3 release notes 2013-09-10 21:07:22 -04:00
Juan Catalano 4840fd9cbc Fixed #20919 -- Extended assertRedirects to be able to avoid fetching redirect's response.
Thanks mjtamlyn for the suggestion.
2013-09-10 12:22:55 -04:00
Tim Graham 4ba373840a Fixed #16534 -- Improved ability to customize DiscoverRunner
Added DiscoverRunner.test_suite and .test_runner attributes.

Thanks tomchristie for the suggestion and jcd for the patch.
2013-09-10 09:49:39 -04:00
Romain B. 522d3d6132 Fixed a little mistake in Django 1.7 release notes 2013-09-09 19:02:41 -04:00
Aymeric Augustin ec2778b445 Fixed #17262 -- Refactored tzinfo implementations.
This commit deprecates django.utils.tzinfo in favor of the more recent
django.utils.timezone which was introduced when Django gained support
for time zones.
2013-09-09 22:32:51 +02:00
Kevin Christopher Henry 9d700322b3 Fixed #19885 -- cleaned up the django.test namespace
* override_settings may now be imported from django.test
* removed Approximate from django.test
* updated documentation for things importable from django.test

Thanks akaariai for the suggestion.
2013-09-09 16:03:13 -04:00
Tim Graham 910a5760f6 Improved release notes for ticket #10164
Thanks Aymeric for the suggestions.

refs #10164
2013-09-09 14:22:29 -04:00
Baptiste Mispelon 28a571348b Fix #20745: Don't silence TypeError raised inside templates.
Thanks to robin for the report and claudep for the review.
2013-09-08 22:05:35 +02:00
Aymeric Augustin fa7bc24671 Repositioned two paragraphs in the release notes. 2013-09-08 11:23:37 +02:00
Tim Graham 5ca290f5db Fixed some sphinx errors and added some links. 2013-09-06 16:15:35 -04:00
Adrian Holovaty c7c19ac408 Added new AdminSite attributes to 1.7 release notes 2013-09-06 14:27:40 -05:00
Daniele Procida 263eecc583 Merge pull request #1544 from evildmp/ticket_20920_rebase
Fixed #20920 -- Consolidated F() and Q() documentation
2013-09-06 11:27:58 -07:00
evildmp 79cc66692a Consolidated documentation for F() and Q() 2013-09-06 12:57:25 -05:00
Chris Wilson eade315da1 Fixed #10164 -- Made AutoField increase monotonically on SQLite
Thanks malte for the report.
2013-09-06 12:31:17 -04:00
Preston Timmons 8625c7aab3 Fixed #16096 -- Added origin attribute to template instances.
Thanks jdunck for the suggestion.
2013-09-06 09:14:52 -04:00
Eric Boersma 4d13cc56de Fixed #21035 -- Changed docs to treat the acronym SQL phonetically.
The documentation and comments now all use 'an' to
refer to the word SQL and not 'a'.
2013-09-05 20:14:58 -04:00
CHI Cheng ed9cd4fd8b Fixed #21000 -- Made cached_db session backend respect SESSION_CACHE_ALIAS 2013-09-05 10:47:58 -04:00
Tim Graham 3baf1d1042 Fixed #21002 -- Documented JSON session serialization requires string keys
Thanks jeroen.pulles at redslider.net for the report.
2013-09-03 07:48:03 -04:00
Ramiro Morales e909ceae9b Made django.test.testcases not depend on staticfiles contrib app.
Do this by introducing a django.contrib.staticfiles.testing.StaticLiveServerCase
unittest TestCase subclass.

Fixes #20739.
2013-08-31 11:02:32 -03:00
Curtis Maloney e2f06226ea Improved {% include %} implementation
Merged BaseIncludeNode, ConstantIncludeNode and Include node.

This avoids raising TemplateDoesNotExist at parsing time, allows recursion
when passing a literal template name, and should make TEMPLATE_DEBUG behavior
consistant.

Thanks loic84 for help with the tests.

Fixed #3544, fixed #12064, fixed #16147
2013-08-30 10:36:36 +03:00
Anssi Kääriäinen e973ee6a98 Fixed #20988 -- Added model meta option select_on_save
The option can be used to force pre 1.6 style SELECT on save behaviour.
This is needed in case the database returns zero updated rows even if
there is a matching row in the DB. One such case is PostgreSQL update
trigger that returns NULL.

Reviewed by Tim Graham.

Refs #16649
2013-08-30 09:41:07 +03:00
Tim Graham cf8d6e9108 Fixed #20881 -- Removed contrib.auth.models.AbstractUser.get_absolute_url()
The definition is arbitrary and creates a broken "view on site"
link in the admin if a project doesn't define such a URL.
2013-08-29 06:36:35 -04:00
Curtis Maloney 5cdacbda03 Fixed #17356 -- Allowed {% include %} to render compiled templates
Reviewed by Loic Bistuer and Tim Graham.
2013-08-29 10:22:24 +03:00
Loic Bistuer da800be6dd Fixed #20986 -- Enabled SelectDateWidget to use custom months
Reviewed by Trac alias MarkusH.
2013-08-28 16:39:26 +03:00
Tim Graham 4f7ed3f2d1 Organized 1.7 minor features into subsections. 2013-08-27 09:39:56 -04:00
Erik Romijn fa57266699 Fixed #20972 -- Make messages cookie follow session cookie secure/httponly 2013-08-26 21:34:29 +02:00
Andrew Godwin 5569b0b92f Merge remote-tracking branch 'core/master' into schema-alteration
Conflicts:
	django/db/backends/oracle/base.py
	django/db/backends/postgresql_psycopg2/base.py
	django/db/models/signals.py
	tests/queries/tests.py
2013-08-23 12:36:53 +01:00
Tim Graham b0ce6fe656 Fixed #20922 -- Allowed customizing the serializer used by contrib.sessions
Added settings.SESSION_SERIALIZER which is the import path of a serializer
to use for sessions.

Thanks apollo13, carljm, shaib, akaariai, charettes, and dstufft for reviews.
2013-08-22 13:58:26 -04:00
Anssi Kääriäinen 6af05e7a0f Fixed model.__eq__ and __hash__ for no pk value cases
The __eq__ method now considers two instances without primary key value
equal only when they have same id(). The __hash__ method raises
TypeError for no primary key case.

Fixed #18864, fixed #18250

Thanks to Tim Graham for docs review.
2013-08-22 17:24:07 +03:00
Andrew Godwin b6a957f0ba Merge remote-tracking branch 'core/master' into schema-alteration
Conflicts:
	docs/ref/django-admin.txt
2013-08-19 18:30:48 +01:00
Anssi Kääriäinen 4668c142dc Made Model.__eq__ consider proxy models equivalent
Fixed #11892, fixed #16458, fixed #14492.
2013-08-19 09:51:28 +03:00
James Bennett bc5716fc9c Added release date to 1.5 release notes.
Forwardport of 61283a8208 from 1.5.x
2013-08-15 07:41:18 -04:00
Tim Graham 29255fcb4f Fixed some ReST errors regarding backticks 2013-08-15 07:14:10 -04:00
Jonathan Slenders ff410565bf Fixed #20709 -- Allowed {% widthratio %} to accept an "as" parameter.
Thanks clay.evil@ for the suggestion.
2013-08-14 12:40:19 -04:00
SusanTan 71c491972e Fixed #11400 -- Passed kwargs from AbstractUser.email_user() to send_mail()
Thanks Jug_ for suggestion, john_scott for the initial patch,
and Tim Graham for code review.
2013-08-14 07:46:11 -04:00
Matt Johnson 907ef9d0d1 Fixed #20555 -- Make subwidget id attribute available
In `BoundField.__iter__`, the widget's id attribute is now passed to
each subwidget. A new id_for_label property was added to ChoiceInput.
2013-08-13 13:23:05 -04:00
Tim Graham db682dcc9e Added 1.4.6/1.5.2 release notes. 2013-08-13 11:16:30 -05:00
Loic Bistuer 163a34ce4b Fixed #20883 -- Made model inheritance find parent links in abstract parents 2013-08-13 15:14:11 +03:00
Tim Graham 3f6cc33cff Added missing release notes for older versions of Django 2013-08-12 14:05:25 -04:00
Mel Collins 6bdb3b1135 Fixed #13518 -- Added FILE_UPLOAD_DIRECTORY_PERMISSIONS setting
This setting does for new directories what FILE_UPLOAD_PERMISSIONS
does for new files.

Thanks jacob@ for the suggestion.
2013-08-12 07:15:59 -04:00
Andrew Godwin 7970d97a70 Docs tweaks (thanks timgraham) 2013-08-10 20:00:12 +01:00
ersran9 00d23a13eb Fixed #20828 -- Allowed @permission_required to take a list of permissions
Thanks Giggaflop for the suggestion.
2013-08-10 10:10:18 -04:00
Andrew Godwin 588b523233 Merge remote-tracking branch 'core/master' into schema-alteration
Conflicts:
	django/db/models/options.py
2013-08-09 14:37:37 +01:00
Andrew Godwin 1d1cfd0bd8 Document new field API in release notes 2013-08-09 14:31:24 +01:00
Tim Graham ddae74b64c Fixed #9057 -- Added default_permissions model meta option.
Thanks hvendelbo for the suggestion and koenb for the draft patch.
2013-08-09 09:19:52 -04:00
Andrew Godwin de64c4d6e9 Merge remote-tracking branch 'core/master' into schema-alteration
Conflicts:
	django/core/management/commands/flush.py
	django/core/management/commands/syncdb.py
	django/db/models/loading.py
	docs/internals/deprecation.txt
	docs/ref/django-admin.txt
	docs/releases/1.7.txt
2013-08-09 14:17:30 +01:00
Marc Tamlyn 1c4a9bd9ad Revert change to the default Form.clean()
This means it doesn't break for people who are doing
`cleaned_data = super(FooForm, self).clean()`.
2013-08-08 14:27:48 +01:00
Marc Tamlyn fb1dd6b13a Form.clean() does not need to return cleaned_data.
If it does, that will be used as the cleaned_data. The default
implementation has been changed to match this change.
2013-08-08 14:05:55 +01:00
Tai Lee 1280675834 Fixed #15511 -- Allow optional fields on ``MultiValueField` subclasses.
The `MultiValueField` class gets a new ``require_all_fields`` argument that
defaults to ``True``. If set to ``False``, individual fields can be made
optional, and a new ``incomplete`` validation error will be raised if any
required fields have empty values.

The ``incomplete`` error message can be defined on a `MultiValueField`
subclass or on each individual field. Skip duplicate errors.
2013-08-06 08:50:47 -04:00
Dominic Rodger c33d1ca1d9 Fixed #20852 - Fixed incorrectly generated left quotes in docs.
Sphinx generates left single quotes for apostrophes after
code markup, when right single quotes are required. The
easiest way to fix this is just by inserting the unicode
character for a right single quote.

Instances of the problem were found by looking for
">‘" in the generated HTML.
2013-08-06 07:13:17 -04:00
Justin Michalicek 6d88d47be6 Fixed #20832 -- Enabled HTML password reset email
Added optional html_email_template_name parameter to password_reset view
and PasswordResetForm.
2013-08-05 09:47:28 -04:00
Julien Phalip 28d3b33c04 Added a note to the 1.6 release about the new `--keep-pot` option for `makemessages`.
Refs #17008.
2013-08-04 17:18:10 -07:00
Loic Bistuer ebb3e50243 Introduced ModelAdmin.get_fields() and refactored get_fieldsets() to use it.
Refs #18681.

This also starts the deprecation of ModelAdmin.declared_fieldsets
2013-08-04 09:14:18 -04:00
Curtis Maloney 07876cf02b Deprecated SortedDict (replaced with collections.OrderedDict)
Thanks Loic Bistuer for the review.
2013-08-04 07:09:39 -04:00
Loic Bistuer 0bcdcc7eb9 Added ModelAdmin.get_search_fields. 2013-08-03 20:02:43 -04:00
Alex Couper 1123f45511 Fixed #20649 -- Allowed blank field display to be defined in the initial list of choices. 2013-07-31 14:12:03 -04:00
Tim Graham a1889397a9 Fixed #12103 -- Added AuthenticationForm.confirm_login_allowed to allow customizing the logic policy.
Thanks ejucovy and lasko for work on the patch.
2013-07-31 13:54:05 -04:00
Julian Bez 8f5533ab25 Fixed #20793 -- Added Last-Modified header to sitemaps. 2013-07-31 07:42:30 -04:00
Tim Graham 4d8ecbdfda Fixed some ReST errors; refs #20819. 2013-07-31 07:22:38 -04:00
Tai Lee 4c6ffcf721 Fixed #20819 -- Return 404 instead of 500 error when ``staticfiles`` view is used in production. 2013-07-31 18:58:50 +10:00
Jose L. Patino 7b57e575c9 Fixed #19877 -- Added `--no-color` option to `BaseCommand` to avoid using output styles. 2013-07-30 09:26:18 -04:00
Tim Graham d4dd55e78c Doc tweaks for html_message parameter to send_mail(); refs #20817 2013-07-30 08:06:49 -04:00
Andrew Godwin fddc5957c5 Implement allow_migrate for migration operations 2013-07-30 12:34:31 +01:00
Andrew Godwin 12e9804d16 Rename allow_syncdb to allow_migrate 2013-07-30 12:08:59 +01:00
Andrew Godwin 086389f5fc Start adding schema migration into the release notes 2013-07-30 11:52:36 +01:00
Claude Paroz fdd7a355bf Deprecated django.utils.importlib
This was a shim for pre-Python 2.7 support.
2013-07-29 17:10:22 +02:00
Justin Michalicek ac09558760 Fixed #20817 -- Added html_message parameter to django.core.mail.send_mail() 2013-07-29 09:53:47 -04:00
Przemek Lewandowski 382c53d7d8 Fixed #18213 -- Allowed empty fixtures (emit a warning rather than raising an exception). 2013-07-29 08:03:51 -04:00
Julien Phalip 0d0ccf81a0 Moved a release note that I had accidentally misplaced in bb145e2c47. 2013-07-27 19:52:59 -07:00
Julien Phalip 4e0ff35146 Fixed #11195 -- Added CSS classes to the changelist cells to allow style customizations. Thanks to akaihola, Ramiro Morales and vdboor for their work on the patch. 2013-07-27 19:50:02 -07:00
Julien Phalip 47c755327b Fixed a number of minor misspellings. 2013-07-27 18:46:03 -07:00
Tim Graham 8676318d2d Fixed #20805 -- Removed an extra colon beside checkboxes in the admin.
Thanks CollinAnderson for the report.
2013-07-26 14:45:38 -04:00
Loic Bistuer 31fadc1202 Fixed #20625 -- Chainable Manager/QuerySet methods.
Additionally this patch solves the orthogonal problem that specialized
`QuerySet` like `ValuesQuerySet` didn't inherit from the current `QuerySet`
type. This wasn't an issue until now because we didn't officially support
custom `QuerySet` but it became necessary with the introduction of this new
feature.

Thanks aaugustin, akaariai, carljm, charettes, mjtamlyn, shaib and timgraham
for the reviews.
2013-07-26 12:41:27 +03:00
Tim Graham bddb4a6818 Fixed #20769 -- Added "Python compatibility" section to the 1.6 release notes. 2013-07-25 13:03:15 -04:00
Tim Graham 31c13a99bb Fixed #14300 -- Fixed initial SQL location if models is a package.
Thanks al_the_x for the report and fheinz for the draft patch.
2013-07-24 06:56:33 -04:00
Dominic Rodger c928725b93 Fixed #20794 -- Documented changes to validate_email
4e2e8f39d changed the way validate_email behaves for foo@localhost
email addresses, but wasn't listed in the release notes.
2013-07-24 10:26:03 +02:00
Tim Graham 65e03a424e Fixed #10284 -- ModelFormSet.save(commit=False) no longer deletes objects
Thanks laureline.guerin@ and Wedg.
2013-07-23 16:21:23 -04:00
Pedro Mourelle fb052b528a Fixed #19900 -- Updated admin buttons to use CSS3 rounded corners. 2013-07-23 11:28:22 -04:00
Thomas Sorrel bb145e2c47 Fixed #13629 -- Added CSS classes to the `<body>` tag of some admin templates to allow style customizations per app or per model. 2013-07-21 20:17:14 +00:00
Matt Deacalion Stevens a269ea4fe0 Fixed #14656 -- Added Atom1Feed `published` element
Some feed aggregators make use of the `published` element as well as
the `updated` element (within the Atom standard -- http://bit.ly/2YySb).

The standard allows for these two elements to be present in the same
entry. `Atom1Feed` had implemented the `updated` element which was
incorrectly taking the date from `pubdate`.
2013-07-19 10:38:34 -04:00
Curtis Maloney a3e7d73ed7 Allowed Context.push to behave as a context mananger.
Thanks Loic Bistuer for the review.
2013-07-17 13:32:32 -04:00
Tim Graham 2333c9662b Fixed #14007 -- Added model discovery in models module without the need to specify app_label.
Thanks mark@ and Aramgutang for work on the patch.
2013-07-16 19:32:30 -04:00
Tim Graham 2456ffa42c Fixed #20746 -- Removed Python 2.6 specific code/docs 2013-07-14 13:02:55 -04:00
Tim Graham a7d97a6778 Fixed #20653 -- Renamed checksetup -> check missed in [03465639]
Thanks CollinAnderson for the report.
2013-07-12 12:48:49 -04:00
Karol Sikora 6272d2f155 Fixed #20429 -- Added QuerySet.update_or_create
Thanks tunixman for the suggestion and Loic Bistuer for the review.
2013-07-12 08:26:35 -04:00
Joeri Bekker 66f3d57b79 Fixed #19031 -- Added a warning when using override_settings with 'DATABASES' 2013-07-12 07:10:18 -04:00
Benjamin Kagia b0953dc913 Fixed #13721 -- Added UploadedFile.content_type_extra.
Thanks Waldemar Kornewald and mvschaik for work on the patch.
2013-07-11 09:11:59 -04:00
Aymeric Augustin 1333967f91 Added 1.7 release notes in TOC. 2013-07-09 23:04:37 +02:00
Loic Bistuer 7e6d852bac Fixed #20663 -- "Today" and "now" admin shortcuts.
Changed the shortcuts next to date and time intput widgets
to account for the current timezone.

Refs #7717, #14253 and #18768.
2013-07-09 23:04:33 +02:00
Tim Graham dab921751d Fixed #18944 -- Documented PasswordResetForm's from_email argument as a backwards incompatible change for 1.3
Thanks DrMeers for the report.
2013-07-08 15:01:37 -04:00
James Bennett c0f03175ce Fixed #19695 -- Retitle "Form Media" to "Form Assets". 2013-07-08 13:59:54 -04:00
hekevintran 62a826ab31 fixed grammar 2013-07-04 12:31:58 -07:00
Tim Graham 3632d289de A couple more semicolon -> colon fixes; refs #18134. 2013-07-02 14:14:56 -04:00
Aymeric Augustin 72c65fea41 Deprecated django.utils.dictconfig.
The module still exists for whoever uses it in its current state, but it
isn't imported by Django anywhere.
2013-07-01 22:50:58 +02:00
Aymeric Augustin 7f264e02f4 Fixed #20680 -- Deprecated django.utils.unittest.
Refs #19204.
2013-07-01 14:29:33 +02:00
Florian Apolloner adc6f38867 Fixed 1.6 release notes. 2013-06-29 10:50:04 +02:00
Ramiro Morales 24bbf1367a Removed django.utils.encoding.StrAndUnicode class, deprecated in Django 1.5. 2013-06-28 23:16:28 -03:00
Ramiro Morales c196564132 Removed custom profile model functionality as per deprecation TL. 2013-06-28 21:48:16 -03:00
Ramiro Morales f73d04dda9 Removed 'cleanup' management command as per deprecation TL. 2013-06-28 21:48:16 -03:00
Shai Berger d097417025 Support 'pyformat' style parameters in raw queries, Refs #10070
Add support for Oracle, fix an issue with the repr of RawQuerySet,
add tests and documentations. Also added a 'supports_paramstyle_pyformat'
database feature, True by default, False for SQLite.

Thanks Donald Stufft for review of documentation.
2013-06-28 06:59:10 +03:00
Tim Graham 1184d07789 Fixed #14881 -- Modified password reset to work with a non-integer UserModel.pk.
uid is now base64 encoded in password reset URLs/views. A backwards compatible
password_reset_confirm view/URL will allow password reset links generated before
this change to continue to work. This view will be removed in Django 1.7.

Thanks jonash for the initial patch and claudep for the review.
2013-06-26 13:11:47 -04:00
Simon Charette b91787910c Fixed #20642 -- Deprecated `Option.get_(add|change|delete)_permission`.
Those methods were only used by `contrib.admin` internally and exclusively
related to `contrib.auth`. Since they were undocumented but used
in the wild the raised deprecation warning point to an also undocumented
alternative that lives in `contrib.auth`.

Also did some PEP8 and other cleanups in the affected modules.
2013-06-25 12:22:37 -04:00
Tim Graham e10757ff4d Doc cleanup for FormMixin.prefix; refs #18872. 2013-06-25 07:50:43 -04:00
Russell Keith-Magee 0346563939 Fixed #20653 -- Renamed checksetup management command.
This is to allow future compatibility with work that is ongoing in the 2013 GSoC.
2013-06-25 09:37:54 +08:00
Gilberto Gonçalves ef37b23050 Fixed #18872 -- Added prefix to FormMixin
Thanks @ibustama for the initial patch and dragonsnaker for opening the
report.
2013-06-22 12:12:43 +01:00
Loic Bistuer 7462a78c1b Fixed #20288 -- Fixed inconsistency in the naming of the popup GET parameter.
Thanks to Keryn Knight for the initial report and reviews,
and to tomask for the original patch.
2013-06-19 22:16:16 +02:00
Loic Bistuer c86a9b6398 Fixed #6903 - Preserve admin changelist filters after saving or deleting an object 2013-06-19 02:41:36 +07:00
Erik Romijn 2c4fe761a0 Fixed #20593 -- Allow blank passwords in check_password() and set_password() 2013-06-18 13:32:54 -04:00
Loic Bistuer ee77d4b253 Fixed #20199 -- Allow ModelForm fields to override error_messages from model fields 2013-06-18 08:01:17 -04:00
Baptiste Mispelon 1b7634a0d0 Fixed #20464 -- Added a `total_error_count` method on formsets.
Thanks to frog32 for the report and to Tim Graham for the review.
2013-06-16 15:49:30 -04:00
Marc Tamlyn b7bd7087e6 Fixed #15273 -- Extend RedirectView to allow reversal by name.
Thanks to @DrMeers for the report and @ludwigkraatz for the initial patch.
2013-06-14 11:59:26 +01:00
Daniel Lindsley 91f317c76d Added a ``checksetup`` management command for verifying Django compatibility. 2013-06-13 18:39:02 -07:00
Tim Graham 70d7e45eb0 Added release notes for auth views being reversed by name, not by path.
Refs #20532
2013-06-13 16:08:56 -04:00
Loic Bistuer 9e50833e22 Fixed #20000 -- Allowed ModelForm meta overrides for label, help_text and error_messages 2013-06-13 15:06:25 -04:00
Jaap Roes 3ce1d303da Warned that `request_finished` isn't sent by some buggy setups.
Older versions of uWSGI and Sentry's middleware do not adhere to
the WSGI spec and cause the `request_finished` signal to never
fire. Added notes to the appropriate places in the docs.

Fixed #20537.
2013-06-12 20:52:08 +02:00
Gabe Jackson 584bd14dcf Fixed #18134 -- BoundField.label_tag now includes the form's label_suffix
There was an inconsistency between how the label_tag for forms were
generated depending on which method was used: as_p, as_ul and as_table
contained code to append the label_suffix where as label_tag called on a
form field directly did NOT append the label_suffix. The code for
appending the label_suffix has been moved in to the label_tag code of
the field and the HTML generation code for as_p, as_ul and as_table now
calls this code as well.

This is a backwards incompatible change because users who have added the
label_suffix manually in their templates may now get double label_suffix
characters in their forms.
2013-06-10 14:23:15 -04:00
Tim Graham bb863faecd Proofed the 1.6 release notes 2013-06-05 12:55:58 -04:00
Tim Graham a35ed20241 Fixed #18924 -- Made test.Client.logout send user_logged_out signal.
Thanks awsum for the suggestion and Pavel Ponomarev and
Florian Hahn for the patch.
2013-06-04 12:39:09 -04:00
Russell Keith-Magee 164c67c831 Fixed #20552 -- Corrected release notes reference to name of new test discovery runner. 2013-06-03 15:59:20 +08:00
Tim Graham 61524b09cf Fixed #18388 - Added InlineModelAdmin.get_max_num hook.
Thanks d.willy.c.c@ for the suggestion and Melevir and Areski Belaid for work
on the patch.
2013-06-01 18:20:54 -04:00
Anssi Kääriäinen 369b6fab25 Fixed #18169 -- NoReverseMatch not silenced if from block.super 2013-06-01 00:59:04 +03:00
Tim Graham f513764e72 Fixed #20515 - Clarified note regarding translator comments.
Thanks wim@ for the suggestion.
2013-05-31 07:43:05 -04:00
Tim Graham 36aecb12b8 Fixed #19425 - Added InlineModelAdmin.get_extra hook.
Thanks dave@ for the suggestion and Rohan Jain for the patch.
2013-05-30 13:48:10 -04:00
Tim Graham 5074c75a37 Fixed #16856 - Added a way to clear select_related.
Thanks Carl for the suggestion and David Cramer for the patch.
2013-05-30 11:06:05 -04:00
Tim Graham ded95ccdce Fixed #20484 -- Added model validation for GenericIPAddressField
GenericIPAddressField must not allow blank for NOT NULL fields

Thanks Erik Romijn.
2013-05-28 15:12:47 -04:00
Carl Meyer cd79f33723 Fixed #20503 - Moved doctest utilities in with the rest of the deprecated test code.
The ``DocTestRunner`` and ``OutputChecker`` were formerly in
``django.test.testcases``, now they are in ``django.test.simple``. This avoids
triggering the ``django.test._doctest`` deprecation message with any import
from ``django.test``. Since these utility classes are undocumented internal
API, they can be moved without a separate deprecation process.

Also removed the deprecation warnings specific to these classes, as they are
now covered by the module-level warning in ``django.test.simple``.

Thanks Anssi for the report.

Refs #17365.
2013-05-27 14:55:08 -06:00
Tim Graham d194714c0a Fixed #11603 - Added django.test.SimpleTestCase.assertFormsetError
Thank-you Martin Green for the patch.
2013-05-27 12:25:35 -04:00
Tim Graham 90af278203 Fixed #16137 - Removed kwargs requirement for QuerySet.get_or_create
Thanks wilfred@, poirier, and charettes for work
on the patch.
2013-05-27 10:01:14 -04:00
Tim Graham 6f8627dd7f Fixed #17582 - Added message to DoesNotExist exceptions.
Thanks simon@ for the suggestion and JordanPowell
for the initial patch.
2013-05-27 07:57:06 -04:00
Preston Holmes d228c1192e Fixed #19866 -- Added security logger and return 400 for SuspiciousOperation.
SuspiciousOperations have been differentiated into subclasses, and
are now logged to a 'django.security.*' logger. SuspiciousOperations
that reach django.core.handlers.base.BaseHandler will now return a 400
instead of a 500.

Thanks to tiwoc for the report, and Carl Meyer and Donald Stufft
for review.
2013-05-25 16:27:34 -07:00
Vlastimil Zíma 6de81d65f4 Fixed #14825 -- LocaleMiddleware keeps language
* LocaleMiddleware stores language into session if it is not present there.
2013-05-25 10:52:54 +02:00
Gavin Wahl 48424adaba Fixed #17648 -- Add `for_concrete_model` to `GenericForeignKey`.
Allows a `GenericForeignKey` to reference proxy models. The default
for `for_concrete_model` is `True` to keep backwards compatibility.

Also added the analog `for_concrete_model` kwarg to
`generic_inlineformset_factory` to provide an API at the form level.
2013-05-23 19:03:14 -04:00
Ramiro Morales 8c2fd050f8 Made fix for #9321 less buggy and more effective.
Don't try to be smart about building a good-looking help string
because it evaluates translations too early, simply use the same old
strategy as before. Thanks Donald Stufft for the report.

Also, actually fix the case reported by the OP by special-casing
CheckboxSelectMultiple.

Added tests.

Refs #9321.
2013-05-23 07:49:29 -03:00
Russell Keith-Magee 11b06532f7 Merge pull request #1198 from KrzysiekJ/http-patch-method
Fixed #20478 – Added support for HTTP PATCH method in generic views.
2013-05-22 17:19:43 -07:00
Tim Graham ef8a9bc7fa Fixed #17048 - Added docs for upgrading Django.
Thanks Donald Stufft for the suggestion and
Susan Tan and Brian Fabian Crain for the patch.
2013-05-22 08:52:46 -04:00
Krzysztof Jurewicz ee8b810b97 Fixed #20478 – Added support for HTTP PATCH method in generic views. 2013-05-22 14:48:11 +02:00
Anssi Kääriäinen 70679243d1 Fixed #18702 -- Removed chunked reads from QuerySet iteration 2013-05-21 19:51:59 +03:00
Selwin Ong ea9a0857d4 Fixed #19326 -- Added first() and last() methods to QuerySet 2013-05-21 18:52:28 +03:00
Ramiro Morales 4ba1c2e785 Fixed #9321 -- Deprecated hard-coding of help text in model ManyToManyField fields.
This is backward incompatible for custom form field/widgets that rely
on the hard-coded 'Hold down "Control", or "Command" on a Mac, to select
more than one.' sentence.

Application that use standard model form fields and widgets aren't
affected but need to start handling these help texts by themselves
before Django 1.8.

For more details, see the related release notes and deprecation timeline
sections added with this commit.
2013-05-20 16:29:51 -03:00
Preston Holmes 6786920fd8 Fixed #16330 -- added --pks option in dumpdata command
Thanks to guettli for the initial ticket and patch, with additional work
from mehmetakyuz and Kevin Brolly.
2013-05-19 09:10:40 -07:00
Baptiste Mispelon 980ae2ab29 Fix #20447: URL names given to contrib.auth.views are now resolved.
This commit also adds tests for the redirect feature of most auth views.
It also cleans up the tests, most notably using @override_settings instead
of ad-hoc setUp/tearDown methods.

Thanks to caumons for the report.

Conflicts:
	docs/releases/1.6.txt
2013-05-19 14:36:38 +02:00
Łukasz Langa 660762681c Fixed #20126 -- XViewMiddleware moved to django.contrib.admindocs.middleware 2013-05-19 13:18:35 +02:00
Aymeric Augustin cb86f707a0 Fixed #12747 -- Made reason phrases customizable. 2013-05-19 13:14:54 +02:00
Ramiro Morales 0a50311063 Fixed #20004 -- Moved non DB-related assertions to SimpleTestCase.
Thanks zalew for the suggestion and work on a patch.

Also updated, tweaked and fixed testing documentation.
2013-05-18 19:04:34 -03:00
Łukasz Langa bd97f7d0cb Fixed #15201: Marked CACHE_MIDDLEWARE_ANONYMOUS_ONLY as deprecated 2013-05-18 17:38:32 +02:00
Donald Stufft 398841d6d3 Merge branch 'allow-any-iterable-for-choices' 2013-05-18 11:31:16 -04:00
Donald Stufft a19e9d80ff Fixed #20430 - Enable iterable of iterables for model choices
Allows for any iterable, not just lists or tuples, to be used as
the inner item for a list of choices in a model.
2013-05-18 11:14:05 -04:00