Aymeric Augustin
69039becde
Deprecated get_app().
2013-12-17 10:17:45 +01:00
Aymeric Augustin
2732edc5f2
Deprecated get_apps().
2013-12-17 10:17:45 +01:00
Aymeric Augustin
d44de9b933
Removed the _-prefix for populate().
...
Several parts of Django call get_apps() with a comment along this lines
of "this has the side effect of calling _populate()". I fail to see how
this is better than just calling populate()!
2013-12-17 10:17:45 +01:00
Aymeric Augustin
259cd3cd41
Deprecated get_app_package, get_app_path and get_app_paths.
2013-12-17 10:17:45 +01:00
Aymeric Augustin
2c9e84af4a
Removed unused attribute app_errors of the app cache.
...
get_app_errors() always returned an empty dictionary; this behavior is
preserved in django.db.models.loading until that module is deprecated.
2013-12-17 10:17:44 +01:00
Aymeric Augustin
8662654d6d
Removed module-level functions for the app cache.
...
Since the original ones in django.db.models.loading were kept only for
backwards compatibility, there's no need to recreate them. However, many
internals of Django still relied on them.
They were also imported in django.db.models. They never appear in the
documentation, except a quick mention of get_models and get_app in the
1.2 release notes to document an edge case in GIS. I don't think that
makes them a public API.
This commit doesn't change the overall amount of global state but
clarifies that it's tied to the app_cache object instead of hiding it
behind half a dozen functions.
2013-12-17 10:17:44 +01:00
Aymeric Augustin
860c2c8bc5
Moved django.db.models.loading to django.apps.cache.
...
This commit doesn't contain any code changes; it's purely a refactoring.
2013-12-17 10:17:43 +01:00
Loic Bistuer
6685713869
Fixed E127 pep8 warnings.
2013-12-14 11:59:15 -05:00
Loic Bistuer
a2814846ca
Fixed E124 pep8 warnings.
2013-12-10 15:12:48 -05:00
Loic Bistuer
2e3c7d8820
Trigger AttributeError in ValidationError.message_dict when error_dict is missing.
...
The goal of this change is twofold; firstly, matching the behavior of Django 1.6
and secondly, an AttributeError is more informative than an obscure ValueError
about mismatching sequence lengths.
Refs #20867 .
2013-12-07 23:01:28 +07:00
Loic Bistuer
a8f4553aae
Fixed #21555 -- Made ValidationError pickable.
...
Thanks trac username zanuxzan for the report and original patch.
2013-12-07 18:58:37 +07:00
Claude Paroz
41ebc4838d
Fixed #21551 -- Reenabled loading fixtures from subdirectory
...
This was a regression in Django 1.6 that was only partially
restored in 839940f27f
.
Thanks Jonas Haag for the report.
2013-12-07 10:47:34 +01:00
Andrew Godwin
4ca39684ee
Fix poor variable name (flake8 warning)
2013-12-05 14:11:46 +00:00
Andrew Godwin
3b8e46cbc7
Migration VCS conflict detection and --merge for makemigrations
2013-12-04 16:01:49 +00:00
Andrew Godwin
ab587fa51a
Add --dry-run option to makemigrations
2013-12-04 13:55:20 +00:00
Andrew Godwin
1d20e6df95
Migrate prompts if you need makemigrations, runserver prompts for migrate
2013-12-04 13:34:01 +00:00
Ramiro Morales
12615dab78
Fixed #13476 -- Added support for color in console output under Windows.
...
Detect and use the services of the ANSICON third-party tool if it's
available.
2013-12-02 23:18:04 -03:00
Claude Paroz
2080bce695
Fixed #21358 -- Allowed runserver on non-English locales
...
Thanks svartalf for the report.
2013-11-30 19:17:36 +01:00
Claude Paroz
6310d658b7
Closed file after reading pot file
...
Faulty line was introduced in 50a8ab7cd1
.
2013-11-30 11:31:17 +01:00
Claude Paroz
50a8ab7cd1
Enabled makemessages to support several translation directories
...
Thanks Rémy Hubscher, Ramiro Morales, Unai Zalakain and
Tim Graham for the reviews.
Also fixes #16084 .
2013-11-30 11:00:23 +01:00
Loic Bistuer
f563c339ca
Fixed #20867 -- Added the Form.add_error() method.
...
Refs #20199 #16986 .
Thanks @akaariai, @bmispelon, @mjtamlyn, @timgraham for the reviews.
2013-11-30 01:00:53 +07:00
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
Claude Paroz
650b6fd90e
Add get_migratable_models util method to ConnectionRouter
2013-10-16 18:02:49 +02:00
Claude Paroz
2992f42861
Fixed #19657 -- Made sql commands honor allow_migrate
...
Thanks Manel Clos for the report and the initial patch, and
Marc Tamlyn and Tim Graham for the review.
2013-10-16 18:02:32 +02:00
Andrew Godwin
763ac8b642
First pass on squashmigrations command; files are right, execution not.
2013-10-16 12:00:07 +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
Larry O'Neill
83b9bfea44
Fixed #21266 -- Fixed E201,E202 pep8 warnings.
2013-10-14 18:12:00 -04:00
Claude Paroz
42a67ec1cd
Fixed #21269 -- Don't crash when CommandError contains non-ascii
...
Thanks kontakt@eikefoken.de for the report.
2013-10-14 21:21:07 +02: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
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
b67ab75e82
Fixed assorted flake8 errors.
2013-10-11 07:25:14 -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
Tim Graham
cec11a3336
Used "is" for comparisons with None.
2013-10-10 09:35:56 -04:00
Russell Keith-Magee
8ff4303946
Refs #21197 -- Clarified upgrade check message.
...
Thanks to Carl and Shai for the discussion.
2013-10-08 10:00:39 +08:00
Baptiste Mispelon
20472aa827
Fixed #21189 : Cleaned up usage of bare except clauses.
...
Thanks to berkerpeksag for the report and to claudep
for the review.
2013-10-05 11:50:03 +02:00
Ramiro Morales
4b715fc05a
Fixed #21209 -- .po file path comments on Windows.
...
Literals from source files with Django template language syntax don't
have a '.py' suffix anymore.
Also, the '.\' prefix is preserved to respect GNU gettext behavior on
that platform.
Refs #16903 .
2013-10-01 20:37:43 -03: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
Michael Manfre
d5606b5763
Fixed #21146 - DatabaseCache converts expires to python value
...
DatabaseCache uses raw cursors to bypass the ORM. This prevents it from
being used by database backends that require special handling of datetime
values.
There is no easy way to test this, so no tests added.
2013-09-26 13:11:43 +03:00
Helen ST
41167645b1
Fixed #14028 - Added validation for clashing db_columns.
...
Thanks akaariai for the suggestion.
2013-09-23 11:51:58 -04:00
Florian Apolloner
2ca00faa91
Fixed "Address already in use" from liveserver.
...
Our WSGIServer rewrapped the socket errors from server_bind into
WSGIServerExceptions, which is used later on to provide nicer
error messages in runserver and used by the liveserver to see if
the port is already in use. But wrapping server_bind isn't enough since
it only binds to the socket, socket.listen (which is called from
server_activate) could also raise "Address already in use".
Instead of overriding server_activate too I chose to just catch socket
errors, which seems to make more sense anyways and should be more robust
against changes in wsgiref.
2013-09-22 22:02:59 +02:00
Kevin Christopher Henry
59a34c43a8
Fixed #18744 -- Updated docstring to highlight limitations of NamedTemporaryFile
...
- Noted that this does not allow for reading and writing the same open
file in different processes under Windows.
- Noted that the keyword arguments to NamedTemporaryFile no longer
match the Python version.
2013-09-19 10:12:03 -04:00
Curtis Maloney
4e9f800742
Fixed #21125 -- Removed support for cache URI syntax
2013-09-19 10:01:39 -04:00
Markus Holtermann
a772ea8117
Fixed #21115 -- Fixed NameError in migrate --list command
2013-09-17 12:53:59 -04:00
Michael Manfre
c89d80e2cc
Fixed #21097 - Added DatabaseFeature.can_introspect_autofield
2013-09-14 09:48:59 +03:00
Michael Manfre
e61cc87129
Fixed #21090 -- Allowed backends to provide dotted field path to inspectdb.
2013-09-11 13:35:26 -04:00
Gregor MacGregor
b2b763448f
Fixed #20841 -- Added messages to NotImplementedErrors
...
Thanks joseph at vertstudios.com for the suggestion.
2013-09-10 11:09:59 -04:00
John Hensley
30fc49a7ca
Fixed #21057 -- Prevented FileSystemStorage from leaving temporary files.
2013-09-10 08:33:53 -04:00
homm
7008ed61c5
Fixed #21033 -- Fixed uploaded filenames not always being truncated to 255 characters
2013-09-10 01:55:16 +02:00
Aymeric Augustin
8aaca651cf
Fixed #20557 -- Properly decoded non-ASCII cookies on Python 3.
...
Thanks mitsuhiko for the report.
Non-ASCII values are supported. Non-ASCII keys still aren't, because the
current parser mangles them. That's another bug.
2013-09-07 10:25:43 -05:00
Aymeric Augustin
ae7f9afaf6
Minor cleanup in the WSGI handler.
2013-09-07 10:25:16 -05:00
Aymeric Augustin
4e88d106dc
Refactored the unmangling of the WSGI environ.
2013-09-07 10:03:50 -05:00
Aymeric Augustin
636860fbfb
Moved two WSGI-specific functions to the WSGI handler.
...
They were defined in base when the mod_python handler used them. See bfcecbff
.
2013-09-07 10:03:49 -05:00
Alex Gaynor
2530735d2d
Fixed a number of flake8 errors -- particularly around unused imports and local variables
2013-09-06 21:56:40 -07:00
Russell Keith-Magee
926bc421d9
Merge pull request #1566 from adamsc64/ticket_11857
...
Fixed #11857 -- Added missing 'closed' property on TemporaryFile class.
2013-09-06 17:38:37 -07:00
Tim Graham
498014ccd5
Fixed Python 3 syntax error introduced in [ c72392da
]
2013-09-06 20:07:57 -04:00
Russell Keith-Magee
4f5faa1916
Merge pull request #1582 from rca/12756-missing-yaml-module-serializer-error-message
...
Fixed #12756 : Improved error message when yaml module is missing.
2013-09-06 16:05:02 -07:00
Roberto Aguilar
01a5359477
Cleanup commit after peer review.
2013-09-06 22:45:31 +00:00
Andrew Godwin
0b7cf56e28
Add -l alias for migrate --list
2013-09-06 17:00:38 -05:00
Roberto Aguilar
076cf131ec
Moved get_serializer() call in dumpdata command.
...
Moved the get_serializer() call within the condition that checks public
serializers. This will allow exceptions other than
SerializerDoesNotExist to be raised in order to provide the caller with
useful information, e.g when pyyaml is not installed.
2013-09-06 20:33:23 +00:00
Roberto Aguilar
c72392dab4
Added yaml directly into BUILTIN_SERIALIZERS.
...
The serializer definitely exists, but the dependent yaml module may not
be installed. The register_serializer() function will catch exceptions
and will stub in a fake serializer object that will raise the exception
when the serializer is used.
2013-09-06 20:33:23 +00:00
Andrew Godwin
efd1e6096e
Adding 'sqlmigrate' command and quote_parameter to support it.
2013-09-06 15:28:12 -05:00
Dan Johnson
df462cf760
Fixed #21043 -- Made resolve() handle reverse_lazy objects.
...
Thanks Keryn Knight for the report.
2013-09-06 15:46:43 -04:00
Christopher Adams
b2f5ac1656
Fixed #11857 -- Added missing 'closed' property on TemporaryFile class.
...
- TemporaryFile now minimally mocks the API of the Python standard
library class tempfile.NamedTemporaryFile to avoid AttributeError
exceptions.
- The symbol django.core.files.NamedTemporaryFile is actually assigned
as a different class on different operating systems.
- The bug only occurred if Django is running on Windows, hence why it
was hard to diagnose.
2013-09-06 14:32:46 -04:00
Andrew Godwin
9f6e6009a4
Add --list option to migrate command
2013-09-06 11:06:19 -05:00
Markus Holtermann
bd8e1a354c
Fixed #20977 -- Fixed writing migrations to disk on Python 3
2013-09-06 09:51:58 -04:00
Aymeric Augustin
6a6428a36f
Took advantage of django.utils.six.moves.urllib.*.
2013-09-05 14:39:23 -05:00
Tim Graham
5649c0af9d
Fixed "indentation is not a multiple of four" pep8 issues.
2013-09-03 14:22:21 -04:00
Carl Meyer
8f7f8bf688
Fixed #21026 -- Corrected help for manage.py test command.
2013-09-03 09:50:34 -06:00
Aymeric Augustin
365c3e8b73
Replaced "not PY3" by "PY2", new in six 1.4.0.
2013-09-02 12:11:02 +02:00
Claude Paroz
3e34005b1b
Fixed #13182 -- Prevented trailing spaces in indented json output
...
Thanks Stéphane Raimbault for the report and the initial patch.
2013-08-31 15:18:01 +02:00
Simon Charette
11cd7388f7
Fixed #20989 -- Removed useless explicit list comprehensions.
2013-08-30 10:57:51 -04:00
Tim Graham
c7d0ff0cad
Fixed #20989 -- Removed explicit list comprehension inside dict() and tuple()
...
Thanks jeroen.pulles at redslider.net for the suggestion and
helper script.
2013-08-29 12:11:03 -04:00
Christopher Medrela
32a962bdbf
Fixed #20814 -- Improved model field accessor clash error messages
...
Thanks shai for the suggestion.
2013-08-24 18:00:23 -04:00
Andrew Godwin
beefac8aae
Only create the migration directory once per app
2013-08-21 22:32:05 +01:00
Ramiro Morales
8e571e5f8f
Fixed #12422 -- Don't override global email charset behavior for utf-8.
...
Thanks simonb for the report, Claude Paroz and Susan Tan for their work
on a fix.
2013-08-21 22:32:04 +01:00
Ramiro Morales
01223840f3
Fixed #18967 -- Don't base64-encode message/rfc822 attachments.
...
Thanks Michael Farrell for the report and his work on the fix.
2013-08-21 22:32:04 +01:00
Florian Apolloner
839940f27f
Fixed #20933 -- Allowed loaddata to load fixtures from relative paths.
2013-08-21 22:32:04 +01:00
Andrew Godwin
2e7f45a372
Change autodetector changes API to be just one method
2013-08-21 22:25:15 +01: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
Alasdair Nicol
22c6497f99
Fixed #20895 -- Made check management command warn if a BooleanField does not have a default value
...
Thanks to Collin Anderson for the suggestion and Tim Graham for
reviewing the patch.
2013-08-15 19:47:26 -04:00
Andrew Godwin
841b7af812
Use DEFAULT_DB_ALIAS
2013-08-12 16:40:41 +01: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
d5a7a3d6a8
Add clarifying comment
2013-08-10 21:04:59 +01:00
Andrew Godwin
3f1f91f155
Print all bad apps passed to makemigrations, not just the first one.
2013-08-10 20:02:55 +01:00
Andrew Godwin
b3cec920a2
Remove other color_style override
2013-08-09 17:39:07 +01:00
Andrew Godwin
9f73629420
utils.importlib is deprecated
2013-08-09 17:36:16 +01:00
Andrew Godwin
679627660f
Remove useless override of self.style
2013-08-09 17:34:35 +01: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
Alex Gaynor
3e0eb2d788
Fixed a number of lint warnings, particularly around unused variables.
2013-08-04 09:17:10 -07:00
Curtis Maloney
07876cf02b
Deprecated SortedDict (replaced with collections.OrderedDict)
...
Thanks Loic Bistuer for the review.
2013-08-04 07:09:39 -04:00
MinRK
75cf5fc7f0
Added support for IPython.start_ipython in shell
...
IPython 1.0 introduces an actual stable public API function
for starting a normal (non-embedded) IPython session.
This is an official public API, which is promised to survive implementation changes.
2013-07-30 10:22:41 -07: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
Andrew Godwin
12e9804d16
Rename allow_syncdb to allow_migrate
2013-07-30 12:08:59 +01:00
Andrew Godwin
68e0a169c4
Rename pre_ and post_syncdb to *_migrate, with aliases from old names
2013-07-30 11:52:52 +01:00
Claude Paroz
5c1143910e
Removed most of absolute_import imports
...
Should be unneeded with Python 2.7 and up.
Added some unicode_literals along the way.
2013-07-29 20:28:13 +02: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
47c755327b
Fixed a number of minor misspellings.
2013-07-27 18:46:03 -07:00
Andrew Godwin
d5ca169334
Fix "OK" alignment in migrate output
2013-07-26 16:52:17 +01:00
Andrew Godwin
52643a69e3
Add --fake option to migrate
2013-07-26 16:47:00 +01:00
Andrew Godwin
c1ed21fa9e
Use new transaction API in syncdb section of migrate
2013-07-26 16:39:44 +01:00
Andrew Godwin
6b39010d57
Remove nasty error message checking hack
2013-07-26 16:33:32 +01:00
Andrew Godwin
00276e0414
Add tests for the migrate command and fix a bug they exposed
2013-07-25 13:52:35 +01:00
Tim Graham
bd0dcc6c89
Fixed #20766 -- Deprecated FastCGI support.
2013-07-24 13:41:45 -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
Andrew Godwin
162f7b938f
Make migrate command recognise prefixes and 'zero'.
2013-07-22 19:43:58 +01:00
Andrew Godwin
03ec3219a0
Merge branch 'master' into schema-alteration
...
Conflicts:
django/db/backends/mysql/introspection.py
django/db/backends/oracle/creation.py
django/db/backends/postgresql_psycopg2/creation.py
django/db/models/base.py
django/db/models/loading.py
2013-07-22 19:04:25 +01:00
Claude Paroz
11b7b9ad00
Fixed an email validation regression
...
Thanks Vincent Wagelaar for the report.
2013-07-21 21:11:32 +02:00
Tim Graham
2456ffa42c
Fixed #20746 -- Removed Python 2.6 specific code/docs
2013-07-14 13:02:55 -04:00
Claude Paroz
59ebe39812
Fixed #17471 -- Added smtplib.SMTP_SSL connection option for SMTP backend
...
Thanks dj.facebook at gmail.com for the report and initial patch
and Areski Belaid and senko for improvements.
2013-07-11 22:00:08 +02: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
Tim Graham
3c736207a3
Fixed #20722 -- Fixed MemcachedCache backend get_many on Python 3.
2013-07-09 11:55:45 -04:00
Alex Gaynor
5ac7f777cd
Merge pull request #991 from stockr-labs/feature/email-backends-generators
...
Fixed #20194 -- Adds generators support for email backends that do not support it.
2013-07-07 16:43:24 -07:00
Alex Gaynor
db2727f952
A few cleanups to capture the minimum amount of code in try/except blocks.
2013-07-08 09:26:52 +10:00
ersran9
76ee39ce14
Fixed 20613 - moved pickle loads/dumps outside with self._lock.reader()/writer() blocks
...
Additionaly added pickled=None initially and check for none before
returning in get
2013-07-06 02:09:52 +05:30
Tomáš Ehrlich
c5bc98d7e1
Fixed #20687 -- Added documentation for django.core.signing API.
...
Thanks Baptiste Mispelon for the suggestion.
2013-07-03 10:36:21 -04:00
Andrew Godwin
b1e0ec06f0
Merge branch 'master' into schema-alteration
2013-07-02 10:49:53 +01:00
Claude Paroz
7fbab3ebaf
Do not allow FileSystemStorage.delete to receive an empty name
...
Refs #20660 .
2013-06-29 18:09:31 +02:00
Ramiro Morales
f73d04dda9
Removed 'cleanup' management command as per deprecation TL.
2013-06-28 21:48:16 -03:00
Andrew Godwin
7a47ba6f6a
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
django/db/backends/__init__.py
django/db/models/fields/related.py
tests/field_deconstruction/tests.py
2013-06-28 17:32:57 +01:00
Andrew Godwin
b21e96d00d
Merge pull request #1311 from loic/ticket20619_take2
...
Fixed missing initializations in WSGIRequest. Refs #20619
2013-06-27 07:44:09 -07:00
Loic Bistuer
48ce167d89
Fixed missing initializations in WSGIRequest. Refs #20619
2013-06-26 14:36:25 +07: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
Ramiro Morales
1559f84d8b
Fixed #20311 -- Make sure makemessages doesn't create duplicate Plural-Forms .po file headers.
...
Thanks naktinis for the report and initial patch.
2013-06-22 18:45:41 -03:00
Andrew Godwin
0e8ee50e86
Rename makemigration to makemigrations
2013-06-20 15:27:33 +01:00
Baptiste Mispelon
fdbcbb9ebd
Fixed #20632 -- Fixed {{ docs_version }} in project template
2013-06-20 15:39:58 +02:00
Russell Keith-Magee
18e79f1425
Fixed #20486 -- Ensure that file_move_safe raises an error if the destination already exists.
...
Thanks to kux for the report, and Russ Webber for the patch.
2013-06-20 18:55:27 +08:00
Andrew Godwin
41214eaf18
Autodetect fields, have migrate actually work
2013-06-19 16:41:04 +01:00
Andrew Godwin
f25a385a5e
Makemigration command now works
2013-06-19 16:23:52 +01:00
Aymeric Augustin
ffcf24c9ce
Removed several unused imports.
2013-06-19 17:18:40 +02:00
Andrew Godwin
ab5cbae9b7
First stab at some migration creation commands
2013-06-19 15:36:22 +01:00
Andrew Godwin
9daf81b94e
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
django/db/models/loading.py
2013-06-19 12:05:23 +01:00
Loic Bistuer
ee77d4b253
Fixed #20199 -- Allow ModelForm fields to override error_messages from model fields
2013-06-18 08:01:17 -04:00
Loic Bistuer
f34cfec0fa
Refactored ValidationError to allow persisting error params and error codes as the exception bubbles up
2013-06-18 08:01:17 -04:00
Florian Apolloner
ffa8a9ab24
Fixed python 3.2 compat.
2013-06-14 15:44:45 +02:00
Wilfred Hughes
8365ed08b8
Fixed #17076 -- When reversing a URL fails, inform the user which patterns were tried.
2013-06-14 10:26:30 +01:00
Daniel Lindsley
91f317c76d
Added a ``checksetup`` management command for verifying Django compatibility.
2013-06-13 18:39:02 -07:00
Aymeric Augustin
55cbd65985
Fixed #20579 -- Improved TransactionTestCase.available_apps.
...
Also moved its documentation to the 'advanced' section. It doesn't
belong to the 'overview'. Same for TransactionTestCase.reset_sequences.
When available_apps is set, after a TransactionTestCase, the database
is now totally empty. post_syncdb is fired at the beginning of the next
TransactionTestCase.
Refs #20483 .
2013-06-12 20:01:41 +02:00
Aymeric Augustin
13b7f299de
Added a stealth option to flush to allow cascades.
...
This allows using flush on a subset of the tables without having to
manually cascade to all tables with foreign keys to the tables being
truncated, when they're known to be empty.
On databases where truncate is implemented with DELETE FROM, this
doesn't make a difference. The cascade is allowed, not mandatory.
2013-06-10 11:21:54 +02:00
Tim Graham
96c71d423d
Added runserver validation to detect if DEBUG=False and ALLOWED_HOSTS is empty.
...
Refs #19875 .
2013-06-09 15:08:29 -04:00
Chris Streeter
69373f3420
Fixed #19925 - Added validation for REQUIRED_FIELDS being a list
...
Thanks Roman Alexander for the suggestion.
2013-06-07 19:58:41 -04:00
Andrew Godwin
315ab41e41
Initial stab at a migrate command, it's probably quite a way off.
2013-06-07 18:47:17 +01:00
Andrew Godwin
3c296382b8
Merge remote-tracking branch 'core/master' into schema-alteration
...
Conflicts:
django/db/models/fields/related.py
2013-06-07 11:15:34 +01:00
Florian Apolloner
c9d07d251f
Fixed loaddata for Django checkouts with non ASCII chars in the name.
2013-06-03 13:18:16 +02:00
Aymeric Augustin
6900cb79dc
Fixed small regression from 51aa000378
.
...
A test failed if the path to the Django checkout contained a dot.
Refs #20485 .
2013-06-03 11:48:03 +02:00
Aymeric Augustin
51aa000378
Fixed #20485 -- Refactored loaddata for speed.
...
Thanks Anssi for reporting this performance bottleneck.
2013-06-02 20:39:45 +02:00
Anssi Kääriäinen
369b6fab25
Fixed #18169 -- NoReverseMatch not silenced if from block.super
2013-06-01 00:59:04 +03:00
René Fleschenberg
5090c7b58b
Improved the usage message of the test command.
2013-05-31 13:16:54 -04:00
Tim Graham
59235816bd
Fixed #20509 - Proper parsing for dumpdata --pks option.
...
Thanks weipin for the report and Baptiste Mispelon for the patch.
2013-05-30 10:19:13 -04:00