Commit Graph

3476 Commits

Author SHA1 Message Date
Josh Smeaton fa182e8ae8 Fixed #18465 -- Set date formats correctly on Oracle
Correctly configure NLS_SESSION_PARAMETERS to format Date and DateTime
on Oracle backend.

Thanks to Josh Smeaton for report & patch.
2012-06-26 19:39:14 +03:00
Claude Paroz 05d333ba3b Fixed #18515 -- Conditionally regenerated filename in FileField validation
When a FileField value has been saved, a new validation should not
regenerate a new filename when checking the length. Refs #9893.
2012-06-26 18:18:44 +02:00
Anssi Kääriäinen b6c356b7bb Fixed #17485 -- Made defer work with select_related
This commit tackles a couple of issues. First, in certain cases there
were some mixups if field.attname or field.name should be deferred.
Field.attname is now always used.

Another issue tackled is a case where field is both deferred by
.only(), and selected by select_related. This case is now an error.

A lot of thanks to koniiiik (Michal Petrucha) for the patch, and
to Andrei Antoukh for review.
2012-06-26 18:08:42 +03:00
Claude Paroz 4b722b31e1 Fixed #16317 -- Fixed dumpdata for self-referencing models and natural keys
Thanks aldaran for the patch.
2012-06-24 19:54:56 +02:00
Alex Gaynor e0fce8706d Switch to using context managers for acquiring and releasing locks. 2012-06-23 08:11:15 -07:00
Dmitry Medvinsky d4da08375b Fixed #18454 -- Added ability to pass a list of signals to `receiver`.
Added ability to use receiver decorator in the following way:

    @receiver([post_save, post_delete], sender=MyModel)
    def signals_receiver(sender, **kwargs):
        ...
2012-06-23 16:31:16 +02:00
Luke Plant a54a8bab0c Fixed #17776 - DoesNotExist is not picklable
Thanks to ambv for the report
2012-06-22 13:28:15 +01:00
Claude Paroz f08fa5b555 Removed unneeded u prefixes 2012-06-19 17:37:28 +02:00
Chris Beaven c57ba67331 Fixed #14502 again -- saner verbatim closing token
Previously, the closing token for the verbatim tag was specified as the
first argument of the opening token. As pointed out by Jannis, this is
a rather major departure from the core tag standard.

The new method reflects how you can give a specific closing name to
{% block %} tags.
2012-06-19 10:49:33 +12:00
Claude Paroz fe873e2765 Fixed #12140 -- Fixed http.urlencode result for empty lists
Thanks aneil for the report and the initial patch.
2012-06-14 11:32:40 +02:00
Claude Paroz a2022dae7f Removed escaping test of query content
As the content of last_executed_query() is not under Django's control
for most backends, it is useless to test too specific aspects of it.
2012-06-13 13:37:22 +02:00
Anssi Kääriäinen 86c20e39eb Fixed connection.queries encoding handling on Oracle
In addition, removed a possibly problematic .filter() call from
backends.test_query_encoding test. It is possible the .filter could
cause collation problems on MySQL, and as it wasn't absolutely needed
for the test it seemed better to get rid of the call.

Refs #18461.
2012-06-13 14:16:34 +03:00
Claude Paroz e9ef9776d1 Fixed #18461 -- Ensured that last_executed_query returns Unicode
Thanks Anssi Kääriäinen for the review.
2012-06-13 12:04:46 +02:00
Claude Paroz a7ef802fa4 Added missing encoding prefix in localflavor test 2012-06-12 14:25:51 +02:00
Claude Paroz 35f9c2c07a Cleaned up locale-related encoding issues 2012-06-12 14:23:41 +02:00
Claude Paroz 3dd5d726d1 Fixed #18463 -- Forced type() argument to be a byte string 2012-06-11 22:14:06 +02:00
Claude Paroz fc40a6504b Fixed #17159 -- Validated returned number of next|previous_page_number
Thanks mehta.apurva at gmail.com for the report and the initial patch
and neaf for the complete patch.
2012-06-09 17:55:24 +02:00
Claude Paroz ef906b1632 Removed test of connection features before setting up databases 2012-06-09 17:22:24 +02:00
Claude Paroz ad47364dd3 Reverted 905e33f, now that DatabaseFeatures does not need confirm
Connection.features does not need to be confirmed any more, after
commit aa42357, rendering obsolete the workaround when using
TEST_MIRROR (Refs #16885, #17760).
2012-06-09 17:05:54 +02:00
Claude Paroz aa423575e7 Fixed #17760 -- Implemented callable database features as cached properties
This does remove the requirement to call features.confirm() method
before checking the properties.
Thanks cdestiger and Ramiro Morales for their work on the patch.
2012-06-09 15:59:52 +02:00
Anssi Kääriäinen 484fcd34a4 Fixed #16418 -- Made generic views work with ModelForms
Generic views assumed any object's _meta will be model Options. This
is not true for ModelForms for example. Took isinstance(obj, Model)
in use instead.
2012-06-09 01:12:14 +03:00
Aymeric Augustin 23d230f058 Merge pull request #123 from apollo13/ticket18381
Fixed #18381 -- Stopped escaping object ids

when passing them to the contenttypes.shortcut view.

Thanks apollo13 for the patch and dhepper for the review.
2012-06-08 01:48:41 -07:00
Daniel Hepper 0ae727beda Fixed #18433 -- Fixed "View on Site" link in inline admin for models with custom PK 2012-06-07 21:08:36 +02:00
Jann Kleen 1a412dda62 Fixed #18432 -- Prevented the ForeignKey field from creating an invalid query when chained. Thanks, Jann Kleen. 2012-06-07 18:49:19 +02:00
Claude Paroz 4a103086d5 Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
2012-06-07 18:08:47 +02:00
Florian Apolloner e1643e3535 Don't escape object ids when passing to the contenttypes.shortcut view.
This commit also changes the string pk to string_pk instead of id, to test
if the admin uses .pk throughout the codebase.
2012-06-07 17:52:12 +02:00
Claude Paroz 6492e8e5e6 Added more precise assertions on two fixture tests. 2012-06-07 14:37:37 +02:00
Claude Paroz 6fd1950a4e Fixed #10200 -- Raised CommandError when errors happen in loaddata. 2012-06-07 10:32:10 +02:00
Aymeric Augustin 4464bbba15 Fixed #14502 -- Added a verbatim template tag.
Thanks SmileyChris for the patch.
2012-06-07 09:59:14 +02:00
Claude Paroz 2c57809a56 Prevented TestNoInitialDataLoading to pollute other tests (Refs #15926)
Tests were still failing with MySQL. It seems a rollback is solving
the issue.
2012-06-06 15:47:48 +02:00
Luke Plant 4fea46a030 Fixed #18309 - Prefetch related does not work for fkey to multitable inherited model
Thanks to milosu for the report, tests and initial patch.
2012-06-06 14:17:32 +01:00
Claude Paroz f0664dc8ae Made TestNoInitialDataLoading pass with MySQL (Refs #15926) 2012-06-06 13:54:40 +02:00
Honza Kral fedac99c85 Fixed #15926 -- Added option --no-initial-data to syncdb and flush.
Thanks msiedlarek, jpaugh64 and vlinhart!
2012-06-05 16:46:15 +02:00
Julien Phalip f699641161 Fixed #17138 -- Made the sensitive_variables decorator work with object methods. 2012-06-03 23:44:13 -07:00
Honza Kral a89034a2d8 Changed FilePathField tests to use it's own directory with test files.
In previous version it used /django/forms/ which was fragile - for some
users .pyc files were not generated and this tests failed.
2012-06-03 22:54:34 +02:00
Honza Kral 71d9a2a7fe Unittest2 style assertTrue instead of assert_ 2012-06-03 22:31:49 +02:00
Honza Kral f823ae3b3e Fixed incorrect assert in test_filepathfield_folders 2012-06-03 21:46:14 +02:00
Claude Paroz 566ac30eb9 Fixed override_settings usage in test_client_regress 2012-06-02 19:50:24 +02:00
Claude Paroz ade44b8d40 Fixed settings override in mail regression tests
self.settings_override from test subclasses were overwriting parent
attribute.
2012-06-02 19:44:15 +02:00
Ramiro Morales d4648a3446 Removed debugging code added in last commit. 2012-06-01 21:50:06 -03:00
Ramiro Morales 72130385bf Made inspectdb tests deal with a smaller generated models.py file.
Implemented this by adding a stealth table_name_filter option for the
command.
2012-06-01 21:46:07 -03:00
Julien Phalip f6fc83c975 Fixed #18409 -- Made RegexField work with unicode characters. 2012-05-31 11:45:35 -07:00
Claude Paroz ea4e0aad9e Cleaned up test_client_regress tests 2012-05-31 17:43:21 +02:00
Claude Paroz 4553f51155 Moved test_client_regress tests from models.py to tests.py 2012-05-31 17:21:13 +02:00
Claude Paroz 0dc904979d Fixed #18407 -- Made model field's to_python methods fully accept unicode.
When generating error message in to_python, any unicode string
containing non-ascii characters triggered a UnicodeEncodeError for
most field types.
2012-05-31 16:46:07 +02:00
Claude Paroz 473c272246 Rewrote test_error_messages with helper test utility. 2012-05-31 16:24:37 +02:00
Claude Paroz 2626ea4a74 Fixed #14681 -- Do not set mode to None on file-like objects.
gzip.GzipFile does not support files with mode set to None.
2012-05-31 10:02:35 +02:00
Julien Phalip 432339a72c Fixed #18393 -- Prevented blocktrans to crash when a variable name is badly formatted. 2012-05-28 11:03:34 -07:00
Claude Paroz a535040bfa Used call_command stdout parameter to capture output in staticfiles tests. 2012-05-28 11:55:38 +02:00
Claude Paroz c3b56c7cdd Used call_command in i18n compilation tests.
Now that call_command does not raise SystemExit any more, we can
use call_command again for testing compilemessages.
2012-05-27 23:11:27 +02:00
Claude Paroz cc4b4d9fd3 Used CommandError in createcachetable command.
Raising CommandError whenever a management command meets an error
condition is the standard way to handle errors in commands.
2012-05-27 23:03:21 +02:00
Claude Paroz f2b6763ad7 Fixed #18387 -- Do not call sys.exit during call_command.
Moved sys.exit(1) so as failing management commands reach it
only when running from command line.
2012-05-27 20:38:47 +02:00
Michael Newman 4423757c0c Fixed #18135 -- Close connection used for db version checking
On MySQL when checking the server version, a new connection could be
created but never closed. This could result in open connections on
server startup.
2012-05-27 18:45:08 +03:00
Anssi Kääriäinen a8a81aae20 Fixed #18343 -- Cleaned up deferred model implementation
Generic cleanup and dead code removal in deferred model field loading
and model.__reduce__().

Also fixed an issue where if an inherited model with a parent field
chain parent_ptr_id -> id would be deferred loaded, then accessing
the id field caused caused a database query, even if the id field's
value is already loaded in the parent_ptr_id field.
2012-05-27 18:11:13 +03:00
Claude Paroz 7a4233b69c Removed a duplicate test in fixtures_regress.
test_abort_loaddata_on_error was exactly the same test as
test_empty (error is tested in test_error_message).
2012-05-26 16:42:28 +02:00
Claude Paroz 3b5083bee5 Fixed #5423 -- Made dumpdata output one row at a time.
This should prevent storing all rows in memory when big sets of
data are dumped.
See ticket for heroic contributors.
2012-05-26 11:43:37 +02:00
Claude Paroz edfa95c22f Specified when open should use binary mode.
Thanks Vinaj Sajip for the help of his django3 branch.
2012-05-25 20:43:43 +02:00
Aymeric Augustin e73838b6dd Fixed #17371 -- Made the test client more flexible
The OPTIONS, PUT and DELETE methods no longer apply arbitrary
data encoding (in the query string or in the request body).
2012-05-25 19:03:15 +02:00
Anssi Kääriäinen 323b414441 Added tests for nested exclude/negate queries 2012-05-25 14:10:45 +03:00
Anssi Kääriäinen 8c72aa2379 Fixed qs.order_by() join promotion for already existing joins
When order_by causes new joins to be added to the query, the joins must
be LEFT OUTER joins for nullable relations, otherwise the order_by
could cause the results to be altered. This commit fixes the logic to
only promote new joins, previously all joins in the order_by lookup
path were promoted.

Thanks to Bruno Desthuilliers for spotting this corner case.
2012-05-24 18:42:06 +03:00
Aymeric Augustin 1e6c3368f2 Fixed #18177 -- Cached known related instances.
This was recently fixed for one-to-one relations; this patch adds
support for foreign keys. Thanks kaiser.yann for the report and
the initial version of the patch.
2012-05-24 13:25:01 +02:00
Aymeric Augustin 3b2993ed04 Fixed #18353 -- Inconsistency in date-based CBVs. 2012-05-24 13:02:19 +02:00
Anssi Kääriäinen 0df4593f0e Fixed #18319 -- Added 'supports_sequence_reset' DB feature
Added a new feature to allow 3rd party backends to skip tests which
test sequence resetting.

Thanks to manfre for report and patch.
2012-05-22 23:51:05 +03:00
Anssi Kääriäinen 8ee1a664f9 Fixed #18318 -- Changed some tests to be 3rd party DB friendly
Thanks to manfre for report and patch.
2012-05-22 23:33:42 +03:00
Anssi Kääriäinen 459c3b67b7 Fixed #18317 -- Removed db specific raw SQL function from tests
A test in model_fields used LEN() in raw SQL. This function is not
available on some 3rd party backends. I removed this function and
ensured that the test works correctly (breaks pre e9bbdb39de) with
the change.
2012-05-22 23:16:24 +03:00
Anssi Kääriäinen d5c7f9efc3 Fixed #18304 -- Optimized save() when update_can_self_select=False
Databases with update_can_self_select = False (MySQL for example)
generated non-necessary queries when saving a multitable inherited
model, and when the save resulted in update.
2012-05-22 20:59:33 +03:00
Aymeric Augustin 03f86a5adb Fixed #18354 -- Performance issue in CBV.
Prevented repeating a query twice when the model isn't ordered by
-date_field (in Meta), allow_empty is False and pagination isn't
enabled.
2012-05-20 13:18:42 +02:00
Claude Paroz 38408f8007 Marked bytestrings with b prefix. Refs #18269
This is a preparation for unicode literals general usage in
Django (Python 3 compatibility).
2012-05-19 17:43:34 +02:00
Claude Paroz 822d6d6dab Fixed #18325 -- Wrapped self.stdout/stderr in OutputWrapper class 2012-05-19 13:51:54 +02:00
Claude Paroz 45f55a9fcc Fixed broken ES localflavor test after 4774875. 2012-05-18 13:45:42 +02:00
Claude Paroz 7549de841c Fixed #18334 -- Fixed detection of supports_stddev backend feature.
Thanks to Michael Manfre for the report and Anssi Kääriäinen for the
review.
2012-05-18 12:12:45 +02:00
Aymeric Augustin ab268e1848 Added a test for DayArchiveView. Refs #17192. 2012-05-17 17:53:19 +02:00
Aymeric Augustin dcd4383107 Fixed #9893 -- Validated the length of file names
after the full file name is generated by the storage class.

Thanks Refefer for the report, carsongee for the patch, and
everyone else involved in the discussion.
2012-05-17 16:02:05 +02:00
Aymeric Augustin c4996df16c Fixed #17449 -- Added OPTIONS to generic views.
Thanks estebistec for the report and patch.
2012-05-17 13:54:51 +02:00
Aymeric Augustin 009e237cf0 Fixed #17535 -- Optimized list generic views.
When allow_empty is False, prevented the view from loading
the entire queryset in memory when pagination is enabled.
2012-05-17 13:34:53 +02:00
Claude Paroz 006c2b8fc1 Fixed #18326 -- Stripped ending chars in LiveServerViews tests.
Ending chars might be different depending on git crlf setting.
Thanks Michael Manfre for the report and the patch.
2012-05-17 11:10:48 +02:00
Jannis Leidel 5f75ac91df Fixed #17896 -- Added file_hash method to CachedStaticFilesStorage to be able to customize the way the hashed name of a file is created. Thanks to mkai for the initial patch. 2012-05-16 13:21:50 +02:00
Aymeric Augustin fcb09b5746 Fixed #10890: added prev/next_week in the context
of per-week date-based generic views. Thanks ee_lars for the report.
2012-05-14 22:40:45 +02:00
Claude Paroz bbb12581db Replaced im_func and im_self by __func__ and __self__.
The new names are Python 3 compatible.
2012-05-12 22:35:21 +02:00
Claude Paroz 33ffd28d76 Added missing relative imports in test files. 2012-05-12 19:58:32 +02:00
Anssi Kääriäinen de79d23ce0 Avoided test failure on MySQL by skipping a failing test
MySQL generates an extra query in inheritance cases when doing an update.
This results in a test failure when checking for number of queries in
update_only_fields tests. Added a skip temporarily to avoid this test
failure. Refs #18304.
2012-05-12 12:03:46 +03:00
Andrei Antoukh 365853da01 Fixed #4102 -- Allow update of specific fields in model.save()
Added the ability to update only part of the model's fields in
model.save() by introducing a new kwarg "update_fields". Thanks
to all the numerous reviewers and commenters in the ticket
2012-05-12 10:29:41 +03:00
Aymeric Augustin 46648b641d Fixed #17798 -- Tweaked the CA localflavor.
Thanks shelldweller.
2012-05-10 22:19:01 +02:00
Claude Paroz 169b1a404c Replaced foo.next() by next(foo).
This new syntax for next() has been introduced in Python 2.6 and is
compatible with Python 3.
2012-05-10 20:15:49 +02:00
Anssi Kääriäinen c2e1ecb4b1 Fix proxy model Query.remove_inherited_models()
Fixed #18248 -- proxy models were added to included_inherited_models
in sql.query.Query. The variable is meant to be used for multitable
inheritance only. This mistake caused problems in situations where
proxy model's query was reused.
2012-05-09 20:33:31 +03:00
Simon Charette 5cbfb48b92 Made model fields comparable to other objects
Fixed #17851 -- Added __lt__ and @total_ordering to models.Field,
made sure these work correctly on other objects than Field, too.
2012-05-07 20:08:20 +03:00
Claude Paroz d7dfab59ea Replaced cStringIO.StringIO by io.BytesIO.
Also replaced StringIO.StringIO by BytesIO in some other appropriate
places. StringIO is not available in Python 3.
2012-05-05 21:41:44 +02:00
Claude Paroz 208e26b39c Commented on a line that inadvertantly slipped in commit 865cd35c
Ignoring __pycache__ directories fixes #17393 and prepare testing
with Python 3.
2012-05-05 16:45:02 +02:00
Claude Paroz 865cd35c9b Made more extensive usage of context managers with open. 2012-05-05 14:06:36 +02:00
Claude Paroz 11a5355517 Inserted more simplefilter calls to be sure warnings are emitted.
Thanks to Florian Apolloner for suggesting the patch.
2012-05-03 21:31:23 +02:00
Claude Paroz 00c0d3c44e Made warning assertions work with or without -Wall python switch 2012-05-03 20:18:05 +02:00
Claude Paroz 10cf3c6427 Used catch_warnings instead of save/restore methods. Refs #17049. 2012-05-03 18:30:07 +02:00
Ramiro Morales ea28bc2688 Removed unused file from i18n regression tests. 2012-05-03 12:00:36 -03:00
Claude Paroz b52672d778 Replaced deprecated TestCase methods. Refs #17049. 2012-05-03 16:39:16 +02:00
Aymeric Augustin e84f79f051 Fixed #18042 -- Advanced deprecation warnings.
Thanks Ramiro for the patch.
2012-05-03 15:27:01 +02:00
Karen Tracey b86a00187d Merge pull request #28 from akaariai/ticket_18163
Ticket 18163 - use faster password hasher in tests.
2012-05-02 16:06:00 -07:00
Aymeric Augustin 435081fd22 Fixed tests for date-based generic views. 2012-05-01 22:23:17 +02:00
Aymeric Augustin 46b082e05c Fixed #17742 -- Handled aware datetimes in DateField
Converted aware datetimes to the default time zone before using them
in the context of a DateField.
2012-05-01 11:29:55 +02:00
Anssi Kääriäinen 0819957eda Use faster password hasher in sqlite tests
Fixed #18163
2012-04-30 22:10:27 +03:00
Anssi Kääriäinen 8fad77da95 Ensured tests pass using custom PASSWORD_HASHERS. 2012-04-30 22:10:27 +03:00
Aymeric Augustin ddfc7c2530 Fixed #4746 -- Allowed spaces around filter separator. 2012-04-30 21:01:06 +02:00
Aymeric Augustin 78ba9670af Fixed #18217 -- Time zone support in generic views
Introduced a distinct implementation depending on the type of the
date field (DateField or DateTimeField), and applied appropriate
conversions is the latter case, when time zone support is enabled.
2012-04-30 20:48:19 +02:00
Claude Paroz 596cb9c7e2 Replaced print statement by print function (forward compatibility syntax). 2012-04-30 20:45:03 +02:00
Anssi Kääriäinen 4b11762f7d Fixed SortedDict.__copy__()
Fixed #18175 -- Calling SortedDict.__copy__() resulted in changes to
the original dictionary. The reason was likely related to subclassing
dict.

Thanks to linovia for report and patch.
2012-04-30 17:19:55 +03:00
Anssi Kääriäinen a18e43c5bb Made get_indexes() consistent across backends.
Fixed #15933, #18082 -- the get_indexes() method introspection was
done inconsitently depending on the backend. For example SQLite
included all the columns in the table in the returned dictionary,
while MySQL introspected also multicolumn indexes.

All backends return now consistenly only single-column indexes.

Thanks to andi for the MySQL report, and ikelly for comments on
Oracle's get_indexes() changes.
2012-04-30 14:30:29 +03:00
Claude Paroz 3904b74a3f Fixed #18013 -- Use the new 'as' syntax for exceptions.
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29 20:57:15 +02:00
Aymeric Augustin cec6bd5a59 Fixed #18023 -- Removed bundled simplejson.
And started the deprecation path for django.utils.simplejson.

Thanks Alex Ogier, Clueless, and other contributors for their
work on the patch.
2012-04-29 19:58:00 +02:00
Anssi Kääriäinen ee0a7c741e Fixed an Oracle-specific test case failure
Made a test checking ORM-generated query string case-insensitive.
2012-04-29 19:48:43 +03:00
Anssi Kääriäinen 584e2c0337 Prevent Oracle from changing field.null to True
Fixed #17957 -- when using Oracle and character fields, the fields
were set null = True to ease the handling of empty strings. This
caused problems when using multiple databases from different vendors,
or when the character field happened to be also a primary key.

The handling was changed so that NOT NULL is not emitted on Oracle
even if field.null = False, and field.null is not touched otherwise.

Thanks to bhuztez for the report, ramiro for triaging & comments,
ikelly for the patch and alex for reviewing.
2012-04-29 19:25:46 +03:00
Alex Gaynor e75bd7e51c Merge pull request #22 from aviraldg/test_17967
Added regression test for #17967.  Thanks to aviraldg for the patch!
2012-04-29 09:08:12 -07:00
Aviral Dasgupta 0525f6d8bd Fixed some style issues in previous commit. 2012-04-29 21:31:09 +05:30
Aymeric Augustin a15cfb2e45 Simplified timezones tests with settings_changed.
All relevant state is now properly reset whenever TIME_ZONE or USE_TZ
are changed in tests.
2012-04-29 16:03:46 +02:00
Aymeric Augustin 3e8b40f479 Fixed #17992 -- Added a public API for localtime.
Thanks Bradley Ayers for the report.
2012-04-29 15:37:23 +02:00
Anssi Kääriäinen 5aa51fa999 Simplified QuerySet field.null handling
QuerySet had previously some complex logic for dealing with nullable
fields in negated add_filter() calls. It seems the logic is leftover
from a time where the WhereNode wasn't as intelligent in handling
field__in=[] conditions.

Thanks to aaugustin for comments on the patch.
2012-04-29 16:27:25 +03:00
Aymeric Augustin 9350d1d59c Fixed #17976 -- Made forms.BooleanField pickleable.
This was a regression in Django 1.4.
Thanks bronger for the report and claudep for the patch.
2012-04-29 14:25:06 +02:00
Aviral Dasgupta d12d55ec26 Added regression test for #17967. 2012-04-29 17:26:22 +05:30
Aymeric Augustin 02a5b41db4 Fixed #18224 -- Changed the dev version number.
Following the move from SVN to git.
2012-04-29 13:40:10 +02:00
Aymeric Augustin 905bd7fb44 Fixed #13196 -- Formatting in admin changelists.
Handled values returned by functions more like field values.
In particular, localized dates, times and datetimes properly,
and converted datetimes to the current timezone.
2012-04-29 11:51:12 +02:00
Anssi Kääriäinen 527cce80dc Made table_names() output sorted.
Fixed #18218 -- previously Django's introspection table_names() and
get_table_list() methods did not sort the output consistently. This
resulted in random order of inspected models.

This commit also removed all external usages of get_table_list().
table_names() should be used instead.

Thanks to claudep for patch and report.
2012-04-29 02:11:55 +03:00
Aymeric Augustin 10cade8fac Removed a svn-specific hack from a test. 2012-04-28 15:19:04 +02:00
Claude Paroz ddc5d59c6a Fixed #15076 -- Quoted ForeignKey target class names in inspectdb when class is defined below.
Thanks saschwarz for the report, jeff@deserettechnology.com for the initial patch and Ramiro Morales for the review. 


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17942 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-27 06:56:31 +00:00
Claude Paroz 8aca3d1cc2 Removed unneeded deprecation warning silencing in test suite.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17940 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-26 18:06:17 +00:00
Claude Paroz a6b2a15348 Removed deprecated gender check in cz localflavor. Refs #14593.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17939 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-26 17:48:50 +00:00
Claude Paroz 1858e47672 Fixed #18033 -- Removed function-based generic views, as per official deprecation timeline. Rest in peace! Thanks Anssi Kääriäinen for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17937 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-25 19:17:47 +00:00
Claude Paroz 921d7f08b9 Removed some leftover references to old-syntax ssi template tag tests. Refs #18037.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17935 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-24 21:08:13 +00:00
Claude Paroz eb351ac9cb Fixed #18037 -- Changed behaviour of url and ssi template tags to the new syntax, as per official deprecation timeline. Thanks Ramiro Morales and Jannis Leidel for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17934 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-24 19:55:52 +00:00
Anssi Kääriäinen c4e62eff90 Fixed #17653 -- Changed MySQL backend to raise a ValueError if zero is used as an AutoField value.
Thanks to Sylvain Lebon for the report, krzysiumed for the patch and charettes and claudep for reviews.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17933 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-24 18:03:14 +00:00
Anssi Kääriäinen 612247b3a0 Fixed #16961 -- Skipped resetting AUTO_INCREMENT fields for MySQL if the server version is greater than 5.0.12. This allows for much faster testing.
Thanks to aigarius for the report and claudep and ramiro for review.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17932 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-24 16:47:31 +00:00
Claude Paroz 03a442c8ad Fixed #17954 -- Fixed dependency checking for test databases. Thanks Łukasz Rekucki for the report and the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17931 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-24 16:05:47 +00:00
Alex Gaynor e7d648d8cb Ignore .svn directories in the folders test from [17925]. This is what happens when you use git-svn.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17926 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-22 15:07:36 +00:00
Alex Gaynor 3c5ff9d703 Fixed #5893 -- Added a flag to FilePathField to allow listing folders, in addition to regular files. Thank you to Brian Rosner, for encouraging me to first contribute to Django 4 years ago.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17925 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-22 14:44:08 +00:00
Anssi Kääriäinen 53fb45c6d8 Fixed #17615 -- Corrected unique field validation when using multitable inheritance. The validation used wrong pk value if the parent and child model had different pk fields. Thanks ungenio for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17920 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-20 17:34:29 +00:00
Anssi Kääriäinen d5b93d3281 Fixed #10494 -- Added kwargs to QuerySet.get() error message in the case no objects were found.
Thanks brondsem for the report, Szymon Pyzalski for the patch and oinopion for review.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17917 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-20 11:09:32 +00:00
Claude Paroz 0e01023897 Converted more test assertions to assert[Not]Contains.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17910 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-14 13:35:25 +00:00
Claude Paroz 2cd516002d Fixed #18002 -- Fixed typo in attribute name in ReverseSingleRelatedObjectDescriptor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17904 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-12 20:23:41 +00:00
Claude Paroz 5a4d7e63ce Fixed #18027 -- Removed an HTMLParser test that doesn't raise any more in recent Python versions. Thanks Arfever and Anssi Kaariainen for the report and the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17900 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-11 21:25:22 +00:00
Aymeric Augustin 632b6a1a73 Fixed #17439 -- Prevented spurious queries for missing objects after prefetch_related has run.
That affects nullable foreign key, nullable one-to-one, and reverse one-to-one relations.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17899 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-11 21:11:22 +00:00
Claude Paroz e2548ec2a9 Fixed #18071 -- Ignored case sensitivity in urlize utility. Thanks luke@creaturecreative.com and adamzap for the report and the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-11 17:49:22 +00:00
Aymeric Augustin 93240b7d90 Fixed #17229 -- Allow 'True', 'False' and 'None' to resolve to the corresponding Python objects in templates.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17894 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-10 20:49:45 +00:00
Aymeric Augustin 28e5b66518 Fixed #18087 -- Prevented date-based generic views from loading entire tables in memory when pagination is enabled.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17893 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-10 20:05:46 +00:00
Aymeric Augustin b90d4e5b74 Made the caching of related and reverse related objects consistent in OneToOneFields. Fixed #13839. Refs #17439.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17890 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-10 12:29:25 +00:00
Aymeric Augustin 1f11069aa5 Fixed #18090 -- Applied filters when running prefetch_related backwards through a one-to-one relation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17888 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-10 06:04:53 +00:00
Carl Meyer f195f1ed24 Fixed #18083 -- Fixed cascade deletion with proxy model of concrete subclass. Thanks Simon Charette for report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-09 22:41:20 +00:00
Julien Phalip 6f7aa51b2c Fixed #17864 -- Added Hong Kong localflavor. Thanks to mrkschan and Adrien Lemaire.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17886 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-09 17:25:02 +00:00
Claude Paroz 883c38c499 Fixed #17848 -- Added setting_changed signal for cases when TEMPLATE_CONTEXT_PROCESSORS is overriden in tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-09 13:24:57 +00:00
Julien Phalip a0b55f30a8 Fixed #18086 -- Restored '-pk' as the default order in the admin changelist. This rectifies a slight change in behavior introduced in Django 1.4 and r17635.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17881 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-09 04:28:32 +00:00
Julien Phalip 93d1fdb130 Fixed #17877 -- Ensured that extra WHERE clauses get correctly ANDed when they contain OR operations. Thanks to Marek Brzóska for the report, to eleather for the test case and to Adrien Lemaire for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17880 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-09 00:43:08 +00:00
Claude Paroz 5c53e30607 Fixed #18035 -- Removed deprecated AdminMediaHandler, as per official deprecation timeline. Thanks Jannis Leidel and Ramiro Morales for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17879 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-08 21:13:32 +00:00
Claude Paroz 8dd04fd84b Fixed #15683 -- Prevented escaped string to be needlessly marked safe twice in force_escape filter. Thanks tyrion for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17876 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-07 15:16:11 +00:00
Claude Paroz 8663bc1103 Fixed #16074 -- Added ContextMixin to class-based generic views to handle get_context_data. Thanks emyller, Luke Plant, Preston Holmes for working on the ticket and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17875 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-06 21:24:33 +00:00
Claude Paroz 5c954136ea Fixed #15644 -- Improved Django File wrapper to support more file-like objects. Thanks nickname123 and Michael Palumbo for working on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17871 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-05 15:44:04 +00:00
Claude Paroz 38115ea742 Fixed #17938 -- Made explicit object ordering in LiveServerDatabase test assertion. Thanks Nate Bragg for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17869 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-05 14:06:06 +00:00
Ramiro Morales b41ebcf1b9 Fixed #18040 -- Removed so-called project-level locale trees from the list of paths the translation loading process takes in account.
Deprecated in Django 1.3. Removed completely for Django 1.5.

Thanks Claude for the review.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 22:24:24 +00:00
Claude Paroz 2d01c9de69 Removed some more useless code related to the verify_exists removal.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17856 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 18:27:17 +00:00
Julien Phalip c39e1cff99 Fixed #17972 -- Ensured that admin filters on a foreign key respect the `to_field` attribute. This fixes a regression introduced in [14674] and Django 1.3. Thanks to graveyboat and Karen Tracey for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17854 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 18:22:12 +00:00
Claude Paroz 6d9227bb0f Removed some more imports/warnings useless after recent removals.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 15:20:57 +00:00
Aymeric Augustin 37c8bc89f2 Removed deprecated tests missed in r17839.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17848 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 13:58:03 +00:00
Aymeric Augustin 9ed6e08ff9 Removed deprecated URLField.verify_exists.
The deprecation schedule was slightly accelerated because of possible security ramifications.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@17847 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 13:55:03 +00:00
Aymeric Augustin 800e3941c5 Extended TrailingSlashURLTests to cover STATIC_URL as well as MEDIA_URL.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17846 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 13:11:02 +00:00
Aymeric Augustin fbfaa35fb0 Required that the MEDIA_URL and STATIC_URL settings end with a slash, per the deprecation timeline.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17845 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 13:01:59 +00:00
Aymeric Augustin d38690796c Removed the deprecated reset and sqlreset management commands.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17842 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 12:38:11 +00:00
Aymeric Augustin c7229c681e Removed deprecated DjangoTestRunner.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17840 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 12:22:52 +00:00
Claude Paroz a1ffb02107 Fixed #18029 -- Removed mod_python as of deprecation process. Thanks Aymeric Augustin for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17835 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 10:34:11 +00:00
Claude Paroz 23d3459761 Fixed #17965 -- Definitely dropped support for Python 2.5. Thanks jonash for the initial patch and Aymeric Augustin for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17834 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 08:24:29 +00:00
Aymeric Augustin 4fe87c370d Removed some Python < 2.6 compatibility code. Refs #17965.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17830 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30 09:20:04 +00:00
Aymeric Augustin eb163f37cb Use the class decorator syntax available in Python >= 2.6. Refs #17965.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17829 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30 09:08:29 +00:00
Claude Paroz 9383a2761c Removed with_statement imports, useless in Python >= 2.6. Refs #17965. Thanks jonash for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30 08:02:08 +00:00
Claude Paroz 159d1be656 Fixed #11150 -- Removed dependency on cStringIO in ImageField validation. Thanks vvd for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17825 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-29 16:49:59 +00:00
Aymeric Augustin e78d6b406b Reverted parts of r16963 to fix a regression on the creation of permissions on proxy models. Refs #17904. Thanks koenb for the report and claudep for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17776 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-22 08:49:48 +00:00
Aymeric Augustin 1e28567e0d Fixed #17937 -- Avoided an error in the timeuntil filter when it receives a date object. Thanks Dmitry Guyvoronsky for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17774 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-22 07:29:39 +00:00
Jannis Leidel 4219e2b7f8 Fixed #17920 -- Actually pass the full path of a newly created project or app in the template context as mentioned in the startproject docs. Many thanks to Preston Holmes for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-21 22:29:32 +00:00
Aymeric Augustin 358c5a1c2a Fixed #17932 -- Tweaked the admin_changelist tests because Oracle doesn't like columns named 'number'.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17767 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-19 12:52:15 +00:00
Aymeric Augustin c8e2f7591d Fixed #17931 -- Accepted aware datetimes to set cookies expiry dates. Thanks jaddison for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17766 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-18 20:58:22 +00:00
Claude Paroz c7cc4cfb9e Fixed #16138 -- Made FormMixin get_initial return a copy of the 'initial' class variable. Thanks hanson2010, wilfred@potatolondon.com and agriffis for their work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17765 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-17 22:31:03 +00:00
Julien Phalip 1ff9be1144 Fixed #17828 -- Ensured that when a list filter's `queryset()` method fails, it does so loudly instead of getting swallowed by a `IncorrectLookupParameters` exception. This also properly fixes #16705, which hadn't been addressed correctly in [16705].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17763 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-17 21:45:36 +00:00
Claude Paroz f0b9bb2ef9 Do not unconditionally add extra_tests when testing geodjango.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17761 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-17 17:44:42 +00:00
Carl Meyer e57bedee78 Fixed #17909 - ensure GeoDjango tests have the templates they need. Thanks Nate Bragg for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17757 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-17 04:39:23 +00:00
Carl Meyer ddd53dafb5 Fixed #17918 - Handle proxy models correctly when sorting deletions for databases without deferred constraints. Thanks Nate Bragg for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17756 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-17 01:24:39 +00:00
Carl Meyer edcaf8b7ff Reorganized proxy-delete tests for easier addition of new tests. Refs #16128.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17755 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-16 23:27:40 +00:00
Julien Phalip a395e531de Ensured that some staticfiles tests get properly cleaned up on teardown. Thanks to Claude Paroz for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17747 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-16 00:29:11 +00:00
Julien Phalip ea9d96739f Added a `with_statement` import to a test for Python 2.5 compatibility.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17746 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-15 18:55:08 +00:00
Luke Plant b018128ea5 Fixed #17838 - prefetch_related fails for GenericForeignKeys when related object id is not a CharField/TextField
Thanks to mkai for the report and debugging, and tmitchell and Przemek
Lewandowski for their work on the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17744 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-15 15:06:57 +00:00
Ramiro Morales a935e83443 Reverted r16386 because it replaced a brittle method with another not less
arbitrary method when the test client checks for the presence of the bundled
session backends+session middleware combination.

We will revisit the issue soon, probably to make these checks even less strict.

Refs #7836, #16605

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-15 02:46:07 +00:00
Ramiro Morales eb9eaa6d71 Tweaked tests from r17702 to run only when using sqlite3 DB(s).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17733 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-14 10:58:23 +00:00
Aymeric Augustin 43cb17bbe5 Added cleanup code to the proxy_model_inheritance tests. Refs #12286, #16329.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17712 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-14 08:40:35 +00:00
Aymeric Augustin 4b14546215 Fixed #17895 -- Made override_settings send the setting_changed signal both when a setting is overridden and when it's restored.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17708 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-13 23:02:31 +00:00
Ramiro Morales 69b96f824d Fixed #16329 -- Fixed detection of transaction-handling capabilities when all test databases are sqlite3, in-memory.
Thanks canassa for the report and agriffis (#17762) and lrekucki (in #17758) for their contribution to the fix.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17702 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-13 17:52:48 +00:00
Claude Paroz dd13596944 Fixed #17768 -- Add a comment about an expected failure in generic_views tests
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17700 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-13 16:33:56 +00:00
Aymeric Augustin aa900c39a8 Fixed #17882 -- Reopened the database connection when a test changes time zone settings. Thanks brodie for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-13 06:59:04 +00:00
Jannis Leidel f7daa38a00 Fixed #10498 (again) -- Made sure the improvements done in r17641 have a smaller impact on speed. Thanks to Anssi Kääriäinen for the patch and Jonas Obrist for reviewing.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17698 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-13 03:48:20 +00:00
Jannis Leidel 0ee801e360 Fixed #17857 -- Stopped CachedStaticFilesStorage from creating absolute URLs unnecessarily. Thanks, tgecho.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17697 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-13 03:48:11 +00:00
Jannis Leidel 7487c74020 Fixed #17865 -- Strip whitespaces from the paths when using the CachedStaticFilesStorage backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17696 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-13 03:48:03 +00:00
Karen Tracey d174216587 Refs #17876: enhanced new test to actually test underlying function, not just ensure trying to use it does not raise an exception. Thanks Przemek Lewandowski.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17695 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-13 01:01:22 +00:00
Karen Tracey 9d98b9eb4b Fix #17876: Corrected an exception (regression) raised where select_realted and only is used on a proxy model. Thanks milosu and charettes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17692 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-12 22:33:18 +00:00
Jannis Leidel 3a5f9cd1ae Fixed #17861 -- Took care of special characters when creating the staticfiles storage cache keys. Many thanks to Preston Holmes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17688 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-12 20:28:09 +00:00
Adrian Holovaty dd246a62c7 Edited some docs and docstrings until [17685]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17686 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-12 20:05:48 +00:00
Karen Tracey 20c69c5e51 Fix #17879: Corrected regression in python (inherited by yaml and json) serializer that prevented serializing model instances with null FK ref to a model when serializing with natural keys. Thanks danfairs and tmitchell.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17685 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-12 19:41:31 +00:00
Ramiro Morales 4cd9b4bb50 Fixed #17327 (again) -- Moved createsuperuser tests added in r17665.
In their new location they won't cause multi-db-related errors when
users run contrib.auh tests together with their application tests.

Thanks brianriley for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17676 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-10 17:36:41 +00:00
Ramiro Morales ecc8208f88 Removed executable bits from some files that don't need them.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17673 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-09 12:13:31 +00:00
Aymeric Augustin bf0abe0ea6 Fixed #17830 -- Modified list_filter on DateTimeFields to account for the new time zone support. Thanks Glenn Washburn for the report and Jannis Leidel for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17670 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-05 12:27:19 +00:00
Aymeric Augustin f95141abcc Added change forgotten in r17668.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17669 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-05 10:30:00 +00:00
Julien Phalip 399aa72330 Enabled the existing admin Selenium tests to be run with Internet Explorer. Note that some tweaks had to be made, in particular as IE7 has limited capabilities regarding CSS selectors.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17666 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-05 08:13:09 +00:00
Carl Meyer 7e92ad8506 Fixed #16128 - Correctly cascade-delete proxy models as if they were the concrete model class. Thanks xkennyx for the report, and Aymeric Augustin, Claude Paroz, Adam Nelson, jaap3, and Anssi Kääriäinen for work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17664 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-05 03:41:01 +00:00
Karen Tracey 20b021e506 Fix staticfiles_tests.TestCollectionCachedStorage.test_post_processing so it passes on Windows.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17652 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-04 16:47:28 +00:00
Julien Phalip 794fe19e19 Made the Selenium tests for the admin horizontal/vertical filter widgets a bit more thorough.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17649 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-04 04:50:58 +00:00
Julien Phalip 4dca9d166a Added more thorough Selenium tests for the admin horizontal/vertical filter widgets.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17648 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-04 01:20:03 +00:00
Jannis Leidel dd441701ce Fixed #17717 (again) -- Used the new API for concrete models added in r17573. Many thanks to Simon Charette and Anssi Kääriäinen.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17643 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-03 21:34:51 +00:00
Jannis Leidel c988397279 Fixed #10498 -- Fixed using ugettext_lazy values when creating model instances. Thanks to Claude Paroz and Jonas Obrist.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17641 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-03 19:02:49 +00:00
Jannis Leidel dc49e6143a Fixed #17717 -- Fixed serialization of proxy models. Thanks, Anssi Kääriäinen.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17640 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-03 17:50:18 +00:00
Aymeric Augustin 48840cc9d1 Fixed a typo in r17638.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17639 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-03 17:41:32 +00:00
Ramiro Morales 3b2c53ac69 Modified a test added in r17508 to not run under Oracle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17638 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-03 17:16:43 +00:00
Julien Phalip d636150e53 Fixed #17198 -- Ensured that a deterministic order is used across all database backends for displaying the admin change list's results. Many thanks to Luke Plant for the report and general approach, to everyone involved in the design discussions, and to Carl Meyer for the patch review. Refs #16819.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17635 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-03 02:13:35 +00:00
Jannis Leidel 126d9e1b49 Fixed #17817 -- Modified LocalMiddleware to use full URLs when redirecting to i18n URLs. Thanks to Paul for keeping an eye on the standards.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17633 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 22:35:26 +00:00
Adrian Holovaty 2ade1e916f Edited stuff from [17543] to [17629]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17630 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 17:16:52 +00:00
Jannis Leidel 4887a8de17 Fixed #16842 -- Modified the RedirectView to correctly handle query strings with percent symbols. Thanks, accuser, jamey@minilop.net and Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 16:55:56 +00:00
Jannis Leidel e88a65660f Fixed #17806 -- Fixed off-by-n error in the CachedStaticFilesStorage that prevented it from finding files in nested directories. Many thanks to lpetre.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17622 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 11:29:14 +00:00
Jannis Leidel 746987f916 Fixed #17734 -- Made sure to only redirect translated URLs if they can actually be resolved to prevent unwanted redirects. Many thanks to Orne Brocaar and Anssi Kääriäinen for input.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17621 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 11:07:36 +00:00
Paul McMillan fe7ccdc5be Fixed test cases that generate their own settings file.
Now they include SECRET_KEY.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17615 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 03:42:20 +00:00
Jannis Leidel df1e505d9f Added a default SECRET_KEY setting to the default test sesttings (refs #17800).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17614 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-02 00:05:13 +00:00
Jannis Leidel 1c33c0a02a Fixed #17737 -- Stopped the collectstatic management command from copying the wrong file in repeated runs. Thanks, pigletto.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17612 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-01 23:02:38 +00:00
Luke Plant 3db5b0e485 Fixed #17696 - Queryset prefetch_related() ignores using()
Thanks to simon29 for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17605 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-01 00:57:01 +00:00
Luke Plant de9942a667 Fixed #17668 - prefetch_related does not work in in_bulk
Thanks to gurets for the report, and akaariai for the initial patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-28 19:34:04 +00:00
Aymeric Augustin ce88b57b9a Fixed #17755 -- Ensured datetime objects that bypass the model layer (for instance, in raw SQL queries) are converted to UTC before sending them to the database when time zone support is enabled. Thanks Anssi for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17596 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-27 21:15:25 +00:00
Ramiro Morales 4bbacd2663 Modified tests introduced in r15452 to not run 31 test cases twice. Thanks Julien for discovering this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17592 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-27 13:29:56 +00:00
Julien Phalip f2de5f4cab Added some Selenium tests for the admin's filter_horizontal and filter_vertical widgets. Ref #13614, #15220.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17579 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-23 08:07:07 +00:00
Aymeric Augustin 8b53616198 Fixed #17728 -- When filtering an annotation, ensured the values used in the filter are properly converted to their database representation. This bug was particularly visible with timezone-aware DateTimeFields. Thanks gg for the report and Carl for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17576 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-22 19:40:27 +00:00
Julien Phalip a65eed3942 Enabled the admin selenium tests to run on Chrome.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17574 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-22 07:14:10 +00:00
Carl Meyer 354c84d277 Fixed #17678 -- Corrected setup of _meta.proxy_for_model and added _meta.concrete_model. Thanks Anssi Kääriäinen.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17573 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-22 05:26:50 +00:00
Chris Beaven 3ac0961e1e Don't let ALLOWED_INCLUDE_ROOTS be accidentally set to a string rather than a tuple. Thanks to Florian Apolloner for pointing this out.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17571 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-22 00:42:19 +00:00
Chris Beaven 0e54c23caf Fixed #17660 -- Standardize extends tag token parsing
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17568 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-21 02:59:05 +00:00
Julien Phalip f0c2228709 Fixed #13068 (again) -- Corrected the admin stacked inline template to allow prepopulated fields to work (Thanks Stanislas Guerra for the report). Also fixed a regression introduced in [16953] where prepopulated fields wouldn't be recognized any more due to the additional "field-" CSS class name prefix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17562 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-19 16:42:12 +00:00
Jannis Leidel 7dd0ceba2e Fixed #17720 -- Stopped the LocaleMiddleware from overeagerly using the request path for language activation if it's actually not wanted. Thanks to Anssi Kääriäinen for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17547 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-18 13:37:30 +00:00
Aymeric Augustin 52b06e29c7 Prevented the generic views from automatically creating a HEAD method when there is no GET. Reverts r16105, refs #17449.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17545 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-18 09:50:03 +00:00
Jannis Leidel 758a0cd0f1 Fixed #17689 -- Stopped the CachedStaticFilesStorage from trying to hash paths that aren't files.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17535 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-16 14:40:32 +00:00
Alex Gaynor b9b3e9f0ef Use Python's changed comparisons, which makes this a bit more readable.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17526 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-16 01:10:21 +00:00
Paul McMillan 6072e108e2 Fixed #17693. Input validation and tests for base36 conversion utils. Thanks Keryn Knight for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17525 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-16 00:58:49 +00:00
Aymeric Augustin 2000f375cd Fixed #17675 -- Changed the implementation of the {% regroup %} template tag to use the context properly when resolving expressions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17522 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-14 21:29:50 +00:00
Jannis Leidel 4f1ac8f5f1 Minor bugfixing of the staticfiles app following upstream development in django-staticfiles.
- Create the files to ignore during the tests dynamically (.hidden and backup~)
- Refactored the post_processing method of the CachedFilesMixin storage mixin to be less time consuming.
- Refactored handling of fragments in the post_process method.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17519 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-13 10:51:17 +00:00
Jannis Leidel 1c9c29b5b2 Fixed AdminEmailHandler to format the subject message correctly when arguments are passed.
This bug was hidden before r17480 as it basically didn't take the arguments into account. Refs #14973.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17512 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-12 12:19:02 +00:00
Ramiro Morales 98b4572ef7 Fixed #15216 -- Made return type of an internal DB introspection method consistent.
Thanks arthur AT milliways DOT fr for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 22:12:49 +00:00
Ramiro Morales a411242e94 Fixed #17676 -- Fixed introspection of column names that start with digit(s).
Thanks Gandalfar for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17509 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 20:53:48 +00:00
Ramiro Morales ccc0e122d4 Fixed #7783 -- Made introspection of nullable columns more robust with Postgres.
Thanks bthomas AT ncorcle DOT com for the report and initial patch, and
Claude Paroz for the final, complete patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17508 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 20:05:50 +00:00
Julien Phalip 130e7ab617 Fixed #17256 -- Ensured that content types get cached when retrieved by natural key. Thanks, defaultwombat and charettes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17502 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 09:55:54 +00:00
Julien Phalip 995f7a16a8 Fixed #17281 -- Prevented `AdminErrorHandler` from silently failing if the log message contains newlines. Thanks to Russell Keith-Magee for the report and to Bartolome Sanchez Salado and Marcin Wróbel for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17501 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 09:31:18 +00:00
Paul McMillan a77679dfaa Fixes #16827. Adds a length check to CSRF tokens before applying the santizing regex. Thanks to jedie for the report and zsiciarz for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17500 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 04:18:15 +00:00
Paul McMillan 4768f39c95 Fix the other test for #15237.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17495 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 00:05:57 +00:00
Paul McMillan 114b655247 Fixed #15237 (again). RSS feeds now include proper character encoding in the mimetype. Thanks shadow for the report and Michal Rzechonek for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17494 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-10 23:45:22 +00:00
Carl Meyer 0ce6636102 Fixed #17277 - Wrap IOErrors raised due to client disconnect in a specific IOError subclass so they can be distinguished from more serious errors. Thanks David Lowe.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17493 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-10 22:51:07 +00:00
Aymeric Augustin 8be356ea99 Fixed #17640 -- Avoided a DeprecationWarning in the test suite. Thanks zsiciarz and claudep.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17492 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-10 11:31:47 +00:00
Jannis Leidel e41647a522 Fixed a SyntaxError in the middleware tests introduced in r17471.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17488 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-10 01:13:45 +00:00