Commit Graph

1874 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
Alex Gaynor 83ab04c6d6 flake8 fixes 2013-11-24 21:07:21 -06:00
Simon Charette eb38257e51 Fixed #21391 -- Allow model signals to lazily reference their senders. 2013-11-24 17:51:22 -05:00
Florian Apolloner d47f794f8f Properly closed cache connections at the end of the request.
This only affects the new cache api and not the deprecated get_cache.

Refs #21012
2013-11-24 16:23:28 +01:00
Florian Apolloner cf7ddc5765 Follow up to e112654fc8
Actually comitted the code now :þ
2013-11-23 18:55:28 +01:00
Alex Gaynor 0ec712dd11 A handful of flake8 fixes 2013-11-23 08:26:11 -08: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
xuxiang 4cfe6ba6a3 Use `classmethod` as a decorator. 2013-11-19 23:08:21 -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
Claude Paroz 115fd140ab Configure settings sooner in makemessages
As get_text_list is using translations, setup settings before
calling it.
2013-11-15 15:30:22 +01:00
Claude Paroz dffcc5e979 Fixed #20990 -- Ensured unicode paths in compilemessages
Thanks Gregoire Astruc for the report and furins for the review.
2013-11-11 11:51:38 +01:00
Bouke Haarsma 9b7455e918 Fixed #21351 -- Replaced memoize with Python's lru_cache.
Replaced the custom, untested memoize with a similar decorator from Python's
3.2 stdlib. Although some minor performance degradation (see ticket), it is
expected that in the long run lru_cache will outperform memoize once it is
implemented in C.

Thanks to EvilDMP for the report and Baptiste Mispelon for the idea of
replacing memoize with lru_cache.
2013-11-11 08:53:09 +01:00
Claude Paroz e7383f16b4 Fixed #14800 -- Suppressed WSGIRequestHandler message filtering
Filtering out static file requests in runserver has been judged
arbitrary and can hide some debugging-related activity.
Thanks Roy Smith for the report and Aymeric Augustin for the
review.
2013-11-09 16:23:14 +01:00
Claude Paroz e6dd70b4db Fixed #21383 -- Added request details in SuspiciousOperation messages 2013-11-09 12:11:58 +01:00
Tim Graham 536c447820 Fixed a couple flake8 warnings. 2013-11-07 20:10:25 -05:00
Jaap Roes 7be638390e Fixed #20536 -- rewrite of the file based cache backend
* Safer for use in multiprocess environments
 * Better random culling
 * Cache files use less disk space
 * Safer delete behavior

Also fixed #15806, fixed #15825.
2013-11-07 16:12:15 +02:00
Andrew Godwin c7bf4c27a0 Allow squashing of squashed migrations 2013-11-06 15:27:08 +00:00
Alex Gaynor c347f78cc1 Fixed all E226 violations 2013-11-03 10:08:55 -08:00
Milton Mazzarri cbc7cbbc5b Fixed flake8 E251 violations 2013-11-03 03:22:11 -06:00
coagulant 3bc0d46a84 Fixed all E261 warnings 2013-11-02 18:20:39 -04:00
Alex Gaynor 7548aa8ffd More attacking E302 violators 2013-11-02 13:12:09 -07:00
Alex Gaynor 65c4ac3b24 Merge pull request #1849 from brabadu/master
Fixed flake8 E241
2013-11-02 12:57:58 -07:00
Alex Gaynor 4ad9f4d4ea Replaced a hardcoded "2" with the right named constant 2013-11-02 12:55:36 -07:00
Boryslav Larin e737c009b8 Fixed flake8 E241 2013-11-02 21:45:40 +02:00
Tim Graham 36ded01527 Fixed #21302 -- Fixed unused imports and import *. 2013-11-02 15:24:56 -04:00
Anssi Kääriäinen 9f76ea1eaa Fixed #21375 -- related_name='+' clashed with other '+' names 2013-11-02 21:18:35 +02:00
Andrew Godwin e9cb333bc3 Auto-apply initial migrations if their tables exist already. 2013-10-30 15:17:49 +00:00
Alex Gaynor b35ff0d920 Fixed all the E203 violations 2013-10-26 18:27:42 -07:00
Alex Gaynor f2d8027c9a Fixed up some more flake8 violations (this particular violation still has many occurrences in the tests/ dir so it can't be removed from setup.cfg yet) 2013-10-26 10:50:40 -07:00
Claude Paroz 3afde36d03 Undelete the login() call inadvertantly removed in 4e0a2fe59c
Refs #21271.
2013-10-25 11:23:19 +02: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
Alex Gaynor 9bf5610890 Start attacking E231 violations 2013-10-24 10:30:03 -07:00
Tim Graham 4cfbde71a3 Fixed #12027 -- Fixed EmailValidator to reject a trailing dot.
Thanks Klas H for the report and claudep for the patch.
2013-10-23 12:22:14 -04:00
Alasdair Nicol c3aa2948c6 Fixed #21298 -- Fixed E301 pep8 warnings 2013-10-23 13:45:03 +01:00
Tim Graham ae48d77ef8 Fixed E225 pep8 warnings. 2013-10-23 06:09:29 -04:00
Tim Graham 1597503a01 Fixed E221 pep8 warnings. 2013-10-22 09:51:39 -04:00
Ramiro Morales b5f52647fe Decode from UTF-8 explicitly when reading a text file in makemessages.
This shows itself with Python 3 under Windows where UTF-8 usually isn't
the default file I/O encoding and caused one failure and three errors
in our test suite under that platform setup.
2013-10-22 06:09:21 -03:00
Claude Paroz a098bee1b9 Fixed #19724 -- Output note when showing only core management commands
When listing available management commands, only core commands are
listed if settings have any error. This commit adds a note in this
case so errors are not totally silently skipped.
Thanks Peter Davis for the report.
2013-10-21 21:26:48 +02:00
Loic Bistuer e565e1332d Fixed #21275 -- Fixed a serializer error when generating migrations for contrib.auth.
The migration serializer now looks for a deconstruct method on any object.
2013-10-21 14:54:52 -04:00
Alasdair Nicol b289fcf1bf Fixed #21288 -- Fixed E126 pep8 warnings 2013-10-21 08:31:30 -04:00
Alasdair Nicol a800036981 Fixed #21287 -- Fixed E123 pep8 warnings 2013-10-18 10:07:39 +01:00
Alasdair Nicol bab9123daa Fixed #21268 -- Fixed E303 pep8 warnings 2013-10-18 01:46:24 +01:00
Alasdair Nicol 65d1d65d52 Fixed #21267 -- Fixed E502 pep8 warnings 2013-10-18 01:28:32 +01:00
Alasdair Nicol dfb4cb9970 Fixed #21285 -- Fixed E121,E122 pep8 warnings 2013-10-17 20:20:11 -04:00
Claude Paroz 3514bcb251 Fixed #21284 -- Prevented KeyError swallowing in fetch_command
Thanks wildfire for the report.
2013-10-17 18:57:44 +02: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
Javed Khan a921f06345 Fixed #21280 -- Don't generate empty migration files 2013-10-17 08:21:17 -04:00
Alasdair Nicol eb214452c3 Fixed #21270 -- Fixed E701 pep8 warnings 2013-10-17 12:12:40 +01:00