Commit Graph

6137 Commits

Author SHA1 Message Date
Vajrasky Kok 7e2d61a972 Fixed #21380 -- Added a way to set different permission for static directories.
Previously when collecting static files, the directories would receive permissions
from the global umask. Now the default permission comes from FILE_UPLOAD_DIRECTORY_PERMISSIONS
and there's an option to specify the permissions by subclassing any of the
static files storage classes and setting the directory_permissions_mode parameter.
2013-11-29 08:01:30 -05:00
Claude Paroz 34b8a38558 Fixed #21496 -- Fixed crash when GeometryField uses TextInput
Thanks Rhett Garber for the report and initial patch.
2013-11-28 18:29:02 +01:00
Baptiste Mispelon 077af42139 Fixed #21515 -- Corrected example of template.Context in documentation.
Thanks to trac user oubiga for the report.
2013-11-28 00:57:13 +01:00
Tim Graham df6760f12c Added a warning regarding risks in serving user uploaded media.
Thanks Preston Holmes for the draft text.
2013-11-27 16:35:25 -05:00
Loic Bistuer ecd8556589 Fixed typo in release notes. 2013-11-28 01:37:21 +07:00
Loic Bistuer f450bc9f44 Added a bulk option to RelatedManager remove() and clear() methods
Refs #21169
2013-11-27 19:45:22 +02:00
Loic Bistuer 17c3997f68 Fixed #21169 -- Reworked RelatedManager methods use default filtering
The `remove()` and `clear()` methods of the related managers created by
`ForeignKey`, `GenericForeignKey`, and `ManyToManyField` suffered from a
number of issues. Some operations ran multiple data modifying queries without
wrapping them in a transaction, and some operations didn't respect default
filtering when it was present (i.e. when the default manager on the related
model implemented a custom `get_queryset()`).

Fixing the issues introduced some backward incompatible changes:

- The implementation of `remove()` for `ForeignKey` related managers changed
  from a series of `Model.save()` calls to a single `QuerySet.update()` call.
  The change means that `pre_save` and `post_save` signals aren't called anymore.

- The `remove()` and `clear()` methods for `GenericForeignKey` related
  managers now perform bulk delete so `Model.delete()` isn't called anymore.

- The `remove()` and `clear()` methods for `ManyToManyField` related
  managers perform nested queries when filtering is involved, which may
  or may not be an issue depending on the database and the data itself.

Refs. #3871, #21174.

Thanks Anssi Kääriäinen and Tim Graham for the reviews.
2013-11-27 19:44:18 +02:00
Andrew Godwin 0b3c8fc851 Update tutorial part 1 to discuss migrations properly 2013-11-27 16:29:49 +00:00
Andrew Godwin 19b34fbe63 Field.deconstruct() howto docs 2013-11-27 15:20:53 +00:00
Andrew Godwin 0c46ca83e8 Merge pull request #1985 from raphaa/21499
Fixed #21499 -- Migrations won't work if field signature changes
2013-11-26 12:33:52 -08:00
Alex Gaynor ac17525039 Replace use of dict.has_key with `key in dict` 2013-11-26 14:32:14 -06:00
Alex Gaynor bb5ab908cc Fixed a typo in the documentation 2013-11-26 13:49:54 -06:00
Claude Paroz 384816fccb Fixed #21448 -- Fixed test client logout with cookie-based sessions
Thanks Gunnar Scherf for the report and the suggested patch.
2013-11-26 20:41:51 +01:00
Jay Leadbetter c74504c2dd Fixed #20522 - Allowed use of partially validated object in ModelAdmin.add_view formset validation.
Updated ModelAdmin to use form.instance when passing parent model to
child inlines for add_view. There is effectively no change in the
change_view since the previously passed 'obj' is the same as form.instance.

Thanks to meshy for report, and EvilDMP and timo for review.
2013-11-25 20:01:16 -05:00
Ludwik Trammer 70e61310d6 Fixed #21507 -- Corrected default widget information for FileField 2013-11-25 08:26:10 -05:00
Alex Gaynor 4e07d93325 Fixed some unnescesarily gendered language in the docs 2013-11-24 21:05:59 -06:00
Simon Charette eb38257e51 Fixed #21391 -- Allow model signals to lazily reference their senders. 2013-11-24 17:51:22 -05:00
Tim Graham 03bc0a8ac5 Fixed typo in previous commit; refs #21490. 2013-11-24 16:28:29 -05:00
Tim Graham bfe7377adb Fixed #21490 -- Fixed custom admin URL reverse example.
Thanks glarrain for the report.
2013-11-24 15:19:05 -05:00
Loic Bistuer 2a0ae9b9ec Removed confusing comments from the docs.
The settings reference documentation doesn't seem the right place to
invite users to write their own db and cache backends.

Also the actual wording makes the task sound trivial, which is hardly
the case; writing a custom db backend is a very difficult task, and
writing a custom cache backend is full of gotcha.
2013-11-24 20:22:22 +01:00
Raphael Jasjukaitis 455e2896b1 Fixed #21499 -- Added a paragraph to the docs. 2013-11-24 15:26:45 +01:00
Thomas Orozco 957d22b850 Add missing commas in Prefetch docs 2013-11-23 23:48:34 +01:00
Claude Paroz 42fef29446 Fixed #21486 -- Prevented settings config in signal connection
This was particularly problematic in the chain get_wsgi_application
-> db.connections import -> signal connection -> settings configuration.
Thanks Jon Dufresne for the report.
2013-11-23 18:47:47 +01:00
Florian Apolloner e112654fc8 Fixed #21200 -- Consistantly raise errors across all cache backends.
Thanks to tchaumeny for the patch.
2013-11-23 17:50:28 +01:00
Ramiro Morales 62b393c5ae Fixed #21488 -- Multiple locales treatment in i18n commands.
Removed multiple locales separated by commas variation (that wasn't
working as documented) in favor of simply allowing use of the
``--locale``/``-l`` options more than once for ``makemessages`` and
``compilemessages``.

Thanks Romain Beylerian for the report and Claude, Simon for their help.

8750296918 from stable/1.6.x.
2013-11-23 11:53:47 -03:00
Curtis Maloney ffc37e2343 Fixed #21012 -- New API to access cache backends.
Thanks Curtis Malony and Florian Apolloner.

Squashed commit of the following:

commit 3380495e93
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Nov 23 14:18:07 2013 +0100

    Looked up the template_fragments cache at runtime.

commit 905a74f52b
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Nov 23 14:19:48 2013 +0100

    Removed all uses of create_cache.

    Refactored the cache tests significantly.

    Made it safe to override the CACHES setting.

commit 35e289fe92
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Nov 23 12:23:57 2013 +0100

    Removed create_cache function.

commit 8e274f747a
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Nov 23 12:04:52 2013 +0100

    Updated docs to describe a simplified cache backend API.

commit ee7eb0f73e
Author: Curtis Maloney <curtis@tinbrain.net>
Date:   Sat Oct 19 09:49:24 2013 +1100

    Fixed #21012 -- Thread-local caches, like databases.
2013-11-23 15:06:59 +01:00
Haiko Schol dfde4d9012 Removed information about releases < 1.7. 2013-11-23 13:53:50 +01:00
Loic Bistuer 033b26173b Improved docs for ModelFormSet.clean(). 2013-11-22 19:48:54 -05:00
mlissner c456ea4ec8 Noted that localmem is the default cache. 2013-11-22 19:39:25 -05:00
Tim Graham f0fc1690b4 Removed unused import in docs/topics/http/sessions.txt 2013-11-22 15:28:22 -05:00
Loic Bistuer 82a58ce5b6 Fixed #21491 -- Removed documented workaround for a known issue.
The issue was that two M2M hidden reverse managers
(related_name ending with a '+') could clash with each other.

Refs #21375 and #15932. Thanks Baptiste.
2013-11-23 01:29:09 +07:00
Aymeric Augustin 9f8810ac51 Fixed #21487 -- Session cannot store tzinfo instances anymore.
Thanks filipp for the report.

Forward-port of 1eddca0a from stable/1.6.x.
2013-11-22 15:34:37 +01:00
Cody Scott 4a54b69e88 Fixed sentence structure in docs/internals/contributing/triaging-tickets.txt 2013-11-22 09:07:10 -05:00
Claude Paroz 1718b5256c Fixed #21405 -- Prevented queryset overwrite in BaseModelAdmin
Thanks guido@20tab.com for the report and Tim Graham for the
analyze.
2013-11-21 22:18:52 +01:00
Loic Bistuer 27f04e79b1 Fixed #21479 -- Favor 'migrate' over 'syncdb' in the docs. 2013-11-21 15:12:39 +01:00
Markus Amalthea Magnuson b6a6cf4ab7 Fixed #21427 -- Clearly state integer field value ranges in docs
Added an explicit mention of the exact value ranges for integer type
fields that are safe in all databases supported by Django. Also, put
all value numbers inside double ticks.
2013-11-21 14:15:23 +01:00
Claude Paroz fafb6cf049 Fixed #21472 -- Fixed inline formsets display when parent pk is 0
Thanks agale031176@gmail.com for the report.
2013-11-20 21:36:20 +01:00
Dražen Lučanin b5eef8535a Recommended setuptools in the reuseable app tutorial.
setuptools has merged with distribute.
2013-11-19 13:57:17 -05:00
Baptiste Mispelon ebfa508fa3 Added more examples to the get_object_or_404 documentation. 2013-11-19 19:23:44 +01:00
Julia Antokhine 3c3be2e8ec fixed typo in builtins.txt 2013-11-19 12:53:28 -05:00
Rocky Meza 42197e31aa Fixed the base class note in the Date Views docs. 2013-11-19 10:23:59 -05:00
Unai Zalakain 4fdd51b732 Fixed #15179 -- middlewares not applied for test client login()
Requests made with django.test.Client.login() and logout() respect
defaults defined in django.test.Client instantiation and are processed
through middleware.

Thanks to Loic for the reviews.
2013-11-19 09:04:20 +02:00
Tim Graham 9348fc5628 Fixed typo in topics/http/sessions.txt. 2013-11-18 19:10:58 -05:00
Claude Paroz 97ac22ebfc Fixed #21457 -- Allowed fixture file name to contain dots
Thanks Keryn Knight for the report.
2013-11-18 20:32:13 +01:00
Baptiste Mispelon bc0413cbc6 Added more internal links in the management command documentation. 2013-11-18 19:25:28 +01:00
Claude Paroz a0f3eeccf3 Fixed #21397 -- Re-added flexibility to TypedChoiceField coercion
Thanks Elec for the report and Simon Charette for the review.
2013-11-18 18:24:56 +01:00
Claude Paroz 4a00f132e0 Added release note for TypedChoiceField coerce limitation
Thanks Elec for the report and Simon Charette for the review.
Refs #21397.
2013-11-18 18:08:59 +01:00
Tim Graham ba63b9895b Fixed #21240 -- Added 1.5 release note for OneToOneField/select_related change.
Thanks marcin at sokrates.pl.
2013-11-18 09:32:25 -05:00
Tim Graham ffdae5b66d Fixed #21404 -- Added session.set_expiry() note to 1.6 release notes.
Thanks pwr for the suggestion.
2013-11-18 07:58:43 -05:00
Claude Paroz 2b7fc36295 Updated 1.6.1 release notes
Partial forward port of e85baa813f.
2013-11-17 21:22:06 +01:00