Commit Graph

1807 Commits

Author SHA1 Message Date
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
Claude Paroz 8010289ea2 Fixed #15697 -- Made sqlindexes aware of auto-created tables
Thanks mbertheau for the report and Ash Christopher for the
initial patch.
2013-05-29 15:50:26 +02: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
Ramiro Morales 0fa8d43e74 Replaced `and...or...` constructs with PEP 308 conditional expressions. 2013-05-26 23:47:50 -03: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
Andrew Jesaitis 31f6421b13 Fixed #19938 -- Consumed iterator only once in paginator's Page
Thanks Joshua Fialkoff for the report.
2013-05-25 16:27:26 +02:00
Donald Stufft 3de1288042 Fixed #11398 - Added a pre_syncdb signal 2013-05-23 01:09:22 -04:00
Claude Paroz 51998dffe7 Removed check for 0.15 version of gettext tools
gettext 0.15 has been released in July 2006.
2013-05-22 18:21:33 +02:00
Jorge Bastida 888c86dcf3 Fixed #20445 -- Raised original exception after command error 2013-05-20 18:59:37 +02:00
Marc Tamlyn 6d81d5d82e Merge pull request #1181 from aaugustin/better-api-to-disable-atomic-requests
Changed API to disable ATOMIC_REQUESTS per view.
2013-05-20 00:26:06 -07:00
Aymeric Augustin 6633eeb886 Changed API to disable ATOMIC_REQUESTS per view.
A decorator is easier to apply to CBVs. Backwards compatibility isn't an
issue here, except for people running on a recent clone of master.

Fixed a few minor problems in the transactions docs while I was there.
2013-05-19 19:53:16 +02: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
Aymeric Augustin cb86f707a0 Fixed #12747 -- Made reason phrases customizable. 2013-05-19 13:14:54 +02:00
Senko Rasic c44a2c40fe Fixed #18990 -- Loaddata now complains if fixture doesn't exist
If the fixture doesn't exist, loaddata will output a warning.

The fixture named "initial_data" is exceptional though; if it
doesn't exist, the warning is not emitted. This allows syncdb and
flush management commands to attempt to load it without causing
spurious warnings.

Thanks to Derega, ptone, dirigeant and d1ffuz0r for contributions
to the ticket.
2013-05-19 11:31:27 +02:00
Senko Rasic cc3b3ba93a Fixed #18990: Loaddata now complains if fixture doesn't exist
The fixture named "initial_data" is exceptional though; if it
doesn't exist, the error is not raised. This allows syncdb and
flush management commands to attempt to load it without causing
an error if it doesn't exist.
2013-05-19 10:56:09 +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
Łukasz Langa 64e11a68f1 Fixed #13285: populate_xheaders breaks caching 2013-05-18 17:03:43 +02:00
Jacob Burch 89955cc35f Fixed #9595 -- Allow non-expiring cache timeouts.
Also, streamline the use of 0 and None between cache backends.
2013-05-18 15:39:42 +02:00
Baptiste Mispelon 9012a9e200 Fixed #20422 -- Applied makemessage's --ignore patterns to full path
Fix makemessage's --ignore patterns being applied to the full path
instead of the file name. Thanks to nnseva for the report and the
original patch.
2013-05-18 10:40:16 +02:00
Andrew Godwin b31eea069c Merge branch 'master' into schema-alteration 2013-05-18 10:21:31 +02:00
Claude Paroz 838f28974e Fixed #20427 -- Moved a variable initialization in storage.py
This is fixing commit 4e70ad11d2. Thanks mattias at elements.nl
for the report and Baptiste Mispelon for identifying the faulty
commit.
2013-05-17 18:31:52 +02:00
Aymeric Augustin 9c487b5974 Replaced an antiquated pattern.
Thanks Lennart Regebro for pointing it out.
2013-05-17 18:08:58 +02:00
Daniel Lindsley 33793f7c3e Fixed #19934 - Use of Pillow is now preferred over PIL.
This starts the deprecation period for PIL (support to end in 1.8).
2013-05-14 19:32:04 -07:00
Tim Graham 2c62a509de Fixed #20136 - Fixed and expanded the docs for loaddata and model signals.
Thanks brandon@ and Anssi for the report.
2013-05-11 19:34:02 -04:00
Andrew Godwin cb4b0de49e Merge branch 'master' into schema-alteration 2013-05-10 12:55:30 +01:00
Alex Gaynor ea3a378c22 Added an HTTP status code to Django's WSGI application that was missing (reason unknown). 2013-05-08 12:45:31 -07:00
Claude Paroz de8aa3a9a9 Fixed #20256 -- Corrected startproject --template help text
Thanks n0nam3 for the patch.
2013-05-08 09:55:40 +02:00
Tai Lee 99a6f0e77c Fixed #20354 -- `makemessages` no longer crashes with `UnicodeDecodeError`
Handle the `UnicodeDecodeError` exception, send a warning to `stdout` with the
file name and location, and continue processing other files.
2013-05-07 21:22:05 +02:00
Aymeric Augustin 1267d2d9bc Fixed #20330 -- Normalized spelling of "web server".
Thanks Baptiste Mispelon for the report.
2013-04-29 19:40:43 +02:00
Aymeric Augustin 4ff682c1ba Fixed #18336 -- Doubled request_queue_size.
This reduces random failures to load static files with Google Chrome.
2013-04-28 10:47:07 +02:00
Andrew Godwin 7f3678dc4c Merge branch 'master' into schema-alteration
Conflicts:
	django/db/backends/__init__.py
	django/db/backends/mysql/base.py
	django/db/backends/oracle/base.py
	django/db/backends/oracle/creation.py
	django/db/backends/postgresql_psycopg2/base.py
	django/db/backends/sqlite3/base.py
	django/db/models/fields/related.py
2013-04-18 17:16:39 +01:00
Brendon Crawford cd1ca26702 Adds generators support for email backends that do not support it. 2013-04-03 19:42:31 -07:00
Julien Phalip 2f81a0ca65 Fixed #20169 -- Ensured that the WSGI request's path is correctly based on the `SCRIPT_NAME` environment parameter or the `FORCE_SCRIPT_NAME` setting, regardless of whether or not those have a trailing slash. Thanks to bmispelon for the review. 2013-04-01 12:04:44 -07:00
Claude Paroz dcf563071f Fixed #5014 -- Guessed max_digits and decimal_places for SQLite
Decimal is treated as float on SQLite, hence inspectdb can only
guess max_digits and decimal_places arguments.
2013-04-01 18:32:57 +02:00
Christoph Sieghart 465b01f065 Fixed #19998 -- Fixed --ignorenonexistent support for XML based fixtures. 2013-03-30 11:59:50 +01:00
Preston Holmes e79b857a07 Fixed #18985 -- ensure module level deprecations are displayed
Also don't compete with -W CLI option.

Thanks to Aymeric Augustin for the catch, and Claude Paroz for the patch.
2013-03-24 22:06:02 -07:00
Loic Bistuer 521765f63d Fixed #19541 -- Fixed BaseHandler to enable reversing URLs in response middlewares
and streamed responses with respect to per-request urlconf.
2013-03-25 03:19:19 +07:00
Anssi Kääriäinen 97774429ae Fixed #19385 again, now with real code changes
The commit of 266de5f9ae included only
tests, this time also code changes included...
2013-03-24 18:40:40 +02:00