1
0
mirror of https://github.com/django/django.git synced 2025-01-13 20:07:13 +00:00
Commit Graph

3964 Commits

Author SHA1 Message Date
Matt Robenolt
393c268e72 Fixed -- Simplified findstatic output when verbosity set to 0 2013-02-01 11:55:05 +01:00
Simon Charette
339944491c Renamed inspectdb field names for clarity 2013-02-01 09:16:29 +01:00
Claude Paroz
7bbd17bf20 Fixed -- Detected NullBooleanField when introspecting models
Thanks Tim Bowden for the report.
2013-01-31 20:55:00 +01:00
Claude Paroz
3c0a81aaf0 Fixed -- Fixed TimeField introspection on MySQL
Thanks Eugene Grachev for the report.
2013-01-31 20:41:57 +01:00
Claude Paroz
eb03fe1642 Added introspection tests for most of Django model fields 2013-01-31 20:41:57 +01:00
Ramiro Morales
7947c9e3a6 Deprecated undocumented warnings manipulation testing tools. 2013-01-31 14:57:45 -03:00
Aymeric Augustin
9a4a1ce323 Fixed -- Exception in timezone.override(None).
Thanks rafales.
2013-01-31 16:01:50 +01:00
Aymeric Augustin
89cb771be7 Fixed -- Completed deprecation of mimetype in favor of content_type.
Thanks Tim for the report and initial patch.
2013-01-31 13:54:40 +01:00
Aymeric Augustin
3895ebc734 Added file forgotten in 23e319d7. 2013-01-30 22:11:53 +01:00
Aymeric Augustin
23e319d729 Fixed -- Added content_type attribute to TemplateView.
Thanks Gavin Wahl.
2013-01-30 21:26:17 +01:00
Aymeric Augustin
3f1a0c0040 Fixed -- Made lazy plural translations usable.
Many thanks to Alexey Boriskin, Claude Paroz and Julien Phalip.
2013-01-30 20:28:16 +01:00
Ramiro Morales
47ddd6a408 Fixed -- Enhanced makemessages handling of `{# #}`-style template comments.
They are simply ignored now. This allows for a more correct behavior when
they are placed before translatable constructs on the same line.

Previously, the latter were wrongly ignored because the former were
preserved when converting template code to the internal Python-syntax
form later fed to xgettext but Python has no ``/* ... */``-style
comments.

Also, special comments directed to translators are now only taken in
account when they are located at the end of a line. e.g.::

  {# Translators: ignored #}{% trans "Literal A" %}{# Translators: valid, associated with "Literal B" below #}
  {% trans "Literal B" %}

Behavior of ``{% comment %}...{% endcomment %}``tags remains unchanged.

Thanks juneih at redpill-linpro dot com for the report and Claude for
his work on the issue.
2013-01-29 19:13:23 -03:00
Tim Graham
ee26797cff Fixed typos in docs and comments 2013-01-29 10:55:55 -07:00
Claude Paroz
f7394d2c32 Added HTML5 url input type
Refs .
2013-01-28 22:11:00 +01:00
Claude Paroz
4f16376274 Added HTML5 email input type
Refs .
2013-01-28 22:10:50 +01:00
Aymeric Augustin
c47fa3b481 Fixed -- Supported 'self' foreign keys in inspectdb.
Thanks Georgy Kutsurua for the report and Simon Charette for the patch.
2013-01-28 10:21:07 +01:00
Aymeric Augustin
f46d7314b5 Fixed -- Introspection of recursive foreign keys under SQLite.
Thanks Simon Charette.
2013-01-28 10:17:56 +01:00
Claude Paroz
4b3f7110ae Fixed -- Ensured strptime receive proper string type
strptime generates an UnicodeEncodeError when using a non-ascii
unicode string on Python 2.
2013-01-26 20:53:09 +01:00
Aymeric Augustin
6605ac331a Fixed -- Used a non-ambiguous representation of SQL queries
when a correct representation cannot be obtained.
2013-01-26 17:51:44 +01:00
Aymeric Augustin
55416e235d Fixed -- assertRegexpMatches is deprecated in Python 3.3. 2013-01-26 13:47:11 +01:00
Aymeric Augustin
424eb67867 Fixed validation of email addresses when the local part contains an @.
See also BaseUserManager.normalize_email -- it uses rsplit.

Refs .
2013-01-26 12:20:57 +01:00
Claude Paroz
ebb504db69 Moved has_changed logic from widget to form field
Refs . Thanks Aymeric Augustin for the suggestion.
2013-01-25 20:50:46 +01:00
Ramiro Morales
ce27fb198d Revert "Patch by Claude for #16084."
This reverts commit 2babab0bb3.
2013-01-25 13:58:37 -03:00
Ramiro Morales
2babab0bb3 Patch by Claude for . 2013-01-25 13:23:33 -03:00
Claude Paroz
b9c8bbf372 Fixed -- Ensured proper stderr output for Command.run_from_argv
Thanks Stefan Koegl for the report and Simon Charette for the review.
2013-01-25 14:56:41 +01:00
Ramiro Morales
57d439e2d4 More i18n makemessages tests tweaks. 2013-01-24 07:51:14 -03:00
Claude Paroz
9893fa12b7 Fixed -- The startproject command should validate the name earlier
Thanks Łukasz Rekucki for the report and the patch.
2013-01-24 09:26:13 +01:00
Nick Sandford
93e79b45bc Fixed -- Added widgets argument to inlineformset_factory and modelformset_factory 2013-01-24 08:58:17 +01:00
Ramiro Morales
456f9b9847 Simplified a i18n test. 2013-01-21 23:22:18 -03:00
Claude Paroz
8ce1e392fa Fixed error introduced when testing patch for 013db6ba85
Shame on me.
2013-01-21 22:42:47 +01:00
Claude Paroz
013db6ba85 Fixed -- Allowed admin fieldsets to contain lists
Thanks Ricardo di Virgilio for the report, Mateus Gondim for the
patch and Nick Sandford for the review.
2013-01-21 22:34:36 +01:00
Claude Paroz
c6e0dedbdb Fixed -- Ensured AdminEmailHandler fails silently
Thanks lsaffre for the report. Refs .
2013-01-21 20:32:36 +01:00
Anssi Kääriäinen
7aa538357c Cleaned up testing models.py added for earliest()
The main cleanup was removal of non-necessary __unicode__ method. The
tests didn't break on py3 as the string representation was never used
in the tests.

Refs . Thanks to Simon Charette for spotting this issue.
2013-01-20 08:53:45 +02:00
Nick Sandford
fe54377dae Fixed -- Added a .earliest() method to QuerySet
Thanks a lot to everybody participating in developing this feature.
The patch was developed by multiple people, at least Trac aliases
tonnzor, jimmysong, Fandekasp and slurms.

Stylistic changes added by committer.
2013-01-20 06:39:35 +02:00
Craig Blaszczyk
6158c79dbe Made (make|compile)messages commands accept multiple locales at once.
Thanks Craig Blaszczyk for the initial patch. Refs .
2013-01-17 00:53:17 -03:00
Ramiro Morales
295650bd01 Simplified i18n commands tests. 2013-01-17 00:35:46 -03:00
Ramiro Morales
248aee1606 Modified makemessages so it creates .pot files once per invocation.
It creates a `locale/django.pot` file once instead of one
`locale/<locale_code>/django.pot` file for every locale involved.

Thanks Michal Čihař for the report and patch.
2013-01-16 20:48:06 -03:00
Ramiro Morales
eee865257a Fixed -- Added makemessages option to not remove .pot files.
Thanks airstrike for the report and initial patch, Julien for an
enhanced patch and Jannis for reviewing.
2013-01-16 20:29:06 -03:00
Aymeric Augustin
50a985b09b Fixed -- Split broken link emails out of common middleware. 2013-01-15 17:41:45 +01:00
Alex Gaynor
984e91e28f Removed some uses of the deprecated assertEquals 2013-01-15 07:51:33 -08:00
David Cramer
a7ed09d13d Improve test to ensure that post_delete was actually called 2013-01-14 13:34:55 -08:00
David Cramer
6045efa029 Move signal disconnect into finally block 2013-01-14 13:15:47 -08:00
David Cramer
272de9eb6b Send post_delete signals immediately
In a normal relational construct, if you're listening for an event
that signals a child was deleted, you dont expect that the parent
was deleted already.

This change ensures that post_delete signals are fired immediately
after objects are deleted in the graph.
2013-01-14 13:15:47 -08:00
Claude Paroz
0171ba65db Fixed -- Implemented missing get_key_columns in PostgreSQL backend 2013-01-12 21:46:08 +01:00
Claude Paroz
bcdb4898ca Fixed -- Made i18n_patterns redirect work with non-slash-ending paths
Thanks Daniel Gerzo for the report and the initial patch.
2013-01-11 21:27:51 +01:00
Claude Paroz
f08e739bc2 Fixed -- Fixed loading cookie value as a dict
This regression was introduced by the 'unicode_literals' patch.
2013-01-11 21:09:33 +01:00
Claude Paroz
4e2e8f39d1 Fixed -- Validate email addresses with localhost as domain 2013-01-11 20:45:46 +01:00
Nick Sandford
eb6c107624 Fixed -- Raised an explicit exception for aggregates on date/time fields in sqlite3
Thanks lsaffre for the report and Chris Medrela for the initial
patch.
2013-01-11 18:10:28 +01:00
Claude Paroz
2e55cf580e Adapted test assertion against yaml dump
Fixes  (again).
2013-01-11 17:52:53 +01:00
Loic Raucy
62f842e2e5 Fixed -- ensure unique html ids with CheckboxSelectMultiple widgets
ID check is now done the same way as MultipleHiddenInput.
2013-01-09 16:06:56 -08:00
Florian Apolloner
ce580dd8ea Fixed lockups in jenkins, refs . 2013-01-09 23:32:51 +01:00
Claude Paroz
e6949373b0 Skipped deprecation warning test on Python 2.6
Refs . On Python 2.6, DeprecationWarnings are visible by
default.
2013-01-09 20:02:09 +01:00
Preston Holmes
cfa70d0c94 Fixed - ensure that deprecation warnings are shown during tests
refs 
2013-01-09 08:19:22 -08:00
Anssi Kääriäinen
55da775ce1 Fixed -- Fixed non-saved/nullable fk querying 2013-01-08 21:02:38 +02:00
Claude Paroz
34ee7d9875 Updated deprecated test assertions 2013-01-08 19:08:15 +01:00
Anssi Kääriäinen
23ca3a0194 Fixed -- Remove use of __deepcopy__ in qs.clone()
The original problem was that queryset cloning was really expensive
when filtering with F() clauses. The __deepcopy__ went too deep copying
_meta attributes of the models used. To fix this the use of
__deepcopy__ in qs cloning was removed.

This commit results in some speed improvements across the djangobench
benchmark suite. Most query_* tests are 20-30% faster, save() is 50%
faster and finally complex filtering situations can see 2x to order
of magnitude improvments.

Thanks to Suor, Alex and lrekucki for valuable feedback.
2013-01-08 19:17:13 +02:00
Claude Paroz
c698c55966 Created special PostgreSQL text indexes when unique is True
Refs .
2013-01-07 17:54:30 +01:00
Anssi Kääriäinen
69a46c5ca7 Tests for various emptyqs tickets
The tickets are either about different signature between qs.none() and
qs or problems with subclass types (either EmptyQS overrided the custom
qs class, or EmptyQS was overridden by another class - values() did
this).

Fixed , fixed , fixed , fixed 
2013-01-06 19:18:29 +02:00
Anssi Kääriäinen
a2396a4c8f Fixed -- Made EmptyQuerySet a marker class only
The guarantee that no queries will be made when accessing results is
done by new EmptyWhere class which is used for query.where and having.

Thanks to Simon Charette for reviewing and valuable suggestions.
2013-01-06 19:18:28 +02:00
Claude Paroz
b740da3504 Fixed -- Allowed running tests with dummy db backend
Thanks Simon Charette for the initial patch, and Jan Bednařík for
his work on the ticket.
2013-01-04 13:55:20 +01:00
Claude Paroz
ffa50ca352 Fixed -- Stopped smtp backend raising exception when already closed
Thanks Sebastian Noack for the report and the initial patch.
2013-01-03 20:41:45 +01:00
Claude Paroz
1b3f832ab7 Fixed -- Allowed closing smtp backend when the server is stopped
Thanks Sebastian Noack for the report and the initial patch.
2013-01-03 18:49:00 +01:00
Simon Charette
3fc43c964e Fixed -- Make sure media/is_multipart work with empty formsets 2013-01-03 15:16:23 +01:00
Aymeric Augustin
a7b7efe78d Minor fixes in the known_related_objects tests.
* Fixed JSON indentation.
* Avoided relying on implicit ordering.
2013-01-02 22:21:46 +01:00
Aymeric Augustin
07fbc6ae0e Fixed -- Caching of related instances.
When &'ing or |'ing querysets, wrong values could be cached, and crashes
could happen.

Thanks Marc Tamlyn for figuring out the problem and writing the patch.
2013-01-02 22:21:46 +01:00
Aymeric Augustin
feb41c3246 Modernized middleware tests.
* Used override_settings consistently -- changes to DEBUG could leak.
* Took advantage of assertRaisesRegexp.
* Fixed indentation -- some code was indented at 2 spaces.
2013-01-01 23:00:34 +01:00
Anton Baklanov
3aa4b8165d Fixed -- ImageField size detection failed for some files.
This was caused by PIL raising a zlib truncated stream error since we fed
the parser with chunks instead of the whole image.
2013-01-01 11:54:56 +01:00
Aymeric Augustin
bacb097ac3 Fixed again -- Regression in LiveServerTestCase after fd1279a4. 2013-01-01 10:14:11 +01:00
Julien Phalip
9180146d21 Fixed -- Ensured that the decorated function's arguments are obfuscated in the @sensitive_variables decorator's frame, in case the variables associated with those arguments were meant to be obfuscated from the decorated function's frame.
Thanks to vzima for the report.
2012-12-31 09:34:08 -08:00
Aymeric Augustin
acc5396e6d Fixed -- Fired request_finished in the WSGI iterable's close(). 2012-12-31 12:47:34 +01:00
Claude Paroz
d11038acb2 Fixed -- Made CheckboxInput._has_changed handle 'False' string
Thanks dibrovsd@gmail.com for the report.
2012-12-31 10:18:59 +01:00
Julien Phalip
cee40c7d79 Added further flexibility to ModelAdmin for controlling post-save redirections.
Refs .
2012-12-30 21:33:21 -08:00
Aymeric Augustin
4e5369a596 Silenced warnings in the tests of deprecated features. 2012-12-29 22:32:07 +01:00
Aymeric Augustin
ef017a5f00 Advanced pending deprecation warnings.
Also added stacklevel argument, fixed .
2012-12-29 21:59:07 +01:00
Aymeric Augustin
2ecf56ea3f Removed legacy ways of calling cache_page. 2012-12-29 21:59:07 +01:00
Aymeric Augustin
9f9a4cdecd Removed truncate_words and truncate_html_words. 2012-12-29 21:59:07 +01:00
Aymeric Augustin
4a6490a4a0 Removed HttpRequest.raw_post_data. 2012-12-29 21:59:07 +01:00
Aymeric Augustin
d1c72d9e01 Removed django.core.management.setup_environ and execute_manager. 2012-12-29 21:59:07 +01:00
Aymeric Augustin
f27a4ee327 Removed django.contrib.localflavor.
Each localflavor lives on as a separate app.
2012-12-29 21:59:06 +01:00
Aymeric Augustin
052271168b Removed django.contrib.databrowse.
RIP -- you served us well.
2012-12-29 21:58:12 +01:00
Aymeric Augustin
02f3daadd6 Removed interpolation of post_url_continue in the admin. 2012-12-29 21:58:12 +01:00
Aymeric Augustin
fb9f1b9bfb Removed backwards-compatibility shim for .
Also unit-tested django.utils.log.RequireDebugTrue for consistency.
2012-12-29 21:58:12 +01:00
Anssi Kääriäinen
13a2b11425 Avoided having an indexed TextField installed unless using postgres
An index on TextField results in a warning message when running tests
on MySQL or SQLite, and the test using the TextField was PostgreSQL
only in any case.
2012-12-29 16:30:17 +02:00
Anssi Kääriäinen
ba4331f177 Fixed autopk issue in tests 2012-12-29 16:25:24 +02:00
Aymeric Augustin
e9c24bef74 Fix -- Incorrect caching of parents of unsaved model instances.
Thanks qcwxezdas for the report. Refs .
2012-12-28 23:34:54 +01:00
Aymeric Augustin
db278c3bf9 Fixed -- Reverted dcd4383107 and 05d333ba3b.
Refs , .

Thanks Russell for the report.
2012-12-27 09:37:57 +01:00
Ramiro Morales
ad769efa85 Expanded tests added when fixing .
To make sure changes in 35d1cd0 don't break anything. Refs .
2012-12-24 17:48:48 -03:00
Aymeric Augustin
1c8be95a86 Prevented caching of streaming responses.
The test introduced in 4b278131 accidentally passed because of a
limitation of Python < 3.3.

Refs , .
2012-12-24 20:28:07 +01:00
Julien Phalip
35d1cd0b28 Fixed -- A more flexible implementation for customizable admin redirect urls.
Work by Julien Phalip.

Refs , , . See also 0b908b92a2.
2012-12-24 15:44:19 -03:00
Aymeric Augustin
e8f07f0378 Fixed a randomly failing test under Python 3.
Refs .
2012-12-24 11:25:58 +01:00
Luke Plant
1ae64e96c1 Fixed a dependence on set-ordering in tests 2012-12-24 01:33:44 +00:00
Luke Plant
c31c2c92b8 Made admin generated changelist URLs independent of dict ordering 2012-12-24 01:33:24 +00:00
Ian Clelland
b9fc70141a Don't rely on dictionary ordering in tests 2012-12-24 00:45:58 +00:00
Ian Clelland
585aa11d23 Use HTML parser to compare html snippets 2012-12-24 00:26:09 +00:00
Ian Clelland
8d35fd4c32 Use new TestCase methods for equality comparisons 2012-12-24 00:24:14 +00:00
Aymeric Augustin
1e4a27d087 Fixed -- Decoded request.path correctly on Python 3.
Thanks aliva for the report and claudep for the feedback.
2012-12-22 13:32:39 +01:00
Anssi Kääriäinen
d407164c04 Fixed -- Join promotion in disjunction cases
The added promotion logic is based on promoting any joins used in only
some of the childs of an OR clause unless the join existed before the
OR clause addition.
2012-12-20 21:45:15 +02:00
Anssi Kääriäinen
3dcd435a0e Fixed -- Solved a regression in join reuse
The ORM didn't reuse joins for direct foreign key traversals when using
chained filters. For example:
    qs.filter(fk__somefield=1).filter(fk__somefield=2))
produced two joins.

As a bonus, reverse onetoone filters can now reuse joins correctly

The regression was caused by the join() method refactor in commit
68847135bc

Thanks for Simon Charette for spotting some issues with the first draft
of the patch.
2012-12-20 21:27:00 +02:00
Russell Keith-Magee
c04c03daa3 Fixed -- Ensure that swappable model references are case insensitive.
This is necessary because get_model() checks are case insensitive, and if the swapable check isn't, the
swappable logic gets tied up in knots with models that are partially swapped out.

Thanks to chris@cogdon.org for the report and extensive analysis, and Preston for his work on the draft patch.
2012-12-20 16:10:19 +08:00
Patryk Zawadzki
3989ce52ef Fixed -- Made models with __iter__ usable in ModelMultipleChoiceField
Thanks to Patryk Zawadzki for the patch.
2012-12-19 22:51:12 +02:00
Claude Paroz
55972ee5c7 Fixed -- Created PostgreSQL varchar index when unique=True
Thanks Dylan Verheul for the report and Anssi Kääriäinen for the
review.
2012-12-18 09:56:30 +01:00
Anssi Kääriäinen
85712a5355 Made sure connections are actually closed in backends tests 2012-12-16 23:26:16 +02:00
Claude Paroz
ed711c4bd5 Fixed -- Improved import error message in contrib.comments
Thanks Valentin Lorentz for the report and the suggested fix.
2012-12-16 21:12:45 +01:00
Anssi Kääriäinen
69597e5bcc Fixed -- Refactored sql.Query.setup_joins()
This is a rather large refactoring. The "lookup traversal" code was
splitted out from the setup_joins. There is now names_to_path() method
which does the lookup traveling, the actual work of setup_joins() is
calling names_to_path() and then adding the joins found into the query.

As a side effect it was possible to remove the "process_extra"
functionality used by genric relations. This never worked for left
joins. Now the extra restriction is appended directly to the join
condition instead of the where clause.

To generate the extra condition we need to have the join field
available in the compiler. This has the side-effect that we need more
ugly code in Query.__getstate__ and __setstate__ as Field objects
aren't pickleable.

The join trimming code got a big change - now we trim all direct joins
and never trim reverse joins. This also fixes the problem in 
which was join trimming in null filter cases.
2012-12-16 17:23:26 +02:00
Russell Keith-Magee
9facca28b6 Corrected tests depending on the error message on the AuthenticationForm.
Refs , and the fix introduced in 27f8129d64.
2012-12-16 07:18:45 +08:00
Anssi Kääriäinen
7eba5fbc02 Fixed a couple of stale tests caused by patch for
Commit was 088d3bc2f8
2012-12-13 15:02:08 +02:00
Anssi Kääriäinen
088d3bc2f8 Fixed -- Made assertQuerysetEqual detect undefined ordering
If there are more than one values to compare against and the qs isn't
ordered then assertQuerysetEqual will raise a ValueError.
2012-12-13 13:33:11 +02:00
Claude Paroz
6ed6a18a03 Fixed -- Provided better error message for get_object_or_404
Thanks Kit Sunde for the report and Brian Holdefehr for the initial
patch.
2012-12-12 22:05:00 +01:00
Florian Apolloner
7e97f4f510 Fixed an order dependant test failure. 2012-12-11 16:25:47 +01:00
Florian Apolloner
1eb0da1c5b Fixed a test failure in the comment tests. 2012-12-10 23:34:51 +01:00
Florian Apolloner
27560924ec Fixed a security issue in get_host.
Full disclosure and new release forthcoming.
2012-12-10 22:11:40 +01:00
Florian Apolloner
a2f2a39956 Fixed -- Ensured that redirects can't be poisoned by malicious users. 2012-12-10 22:11:39 +01:00
Claude Paroz
0cdfa76e68 Amended an SQL test fixture to not include an id value
Some backends might need special handling for auto-increment values.
This was introduced in 5fa5621f57. Thanks Michael Manfre for spotting
the issue.
2012-12-10 17:49:04 +01:00
Aymeric Augustin
49519328b4 Fixed -- Improved error for old-style url tags with dashes.
Thanks dloewenherz for the report.
2012-12-09 16:17:56 +01:00
Claude Paroz
8248d14029 Removed US localflavor-specific tests from core
Also fixes .
2012-12-08 21:07:59 +01:00
Claude Paroz
04e6542b5a Fixed -- Prevented ModelAdmin sharing widgets due to formfield_overrides
Thanks joebuyer at manycycles.com for the report and Simon Charette
for the review.
2012-12-08 12:41:11 +01:00
Claude Paroz
c91667338a Fixed -- Allow non-ASCII chars in filesystem paths
Thanks kujiu for the report and Aymeric Augustin for the review.
2012-12-08 11:13:52 +01:00
Andreas Hug
66dfcc10b3 Fixed -- Make BaseFormSet.is_valid call its underlying forms' is_valid
Thanks Simon Charette for the report and the initial patch.
2012-12-06 20:00:56 +01:00
Claude Paroz
34dcf51e06 Fixed -- Fixed saving ContentFile in filesystem storage
This was not working properly when ContentFile was initialized with
an unicode string.
Thanks Alexey Boriskin for the report and the test.
2012-12-06 17:14:44 +01:00
Marc Aymerich
553838a285 Fixed -- Applied linebreaksbr to read-only fields in inlines
Applied to inlines what ec9d6b1122 did for main fieldsets.
2012-12-06 09:52:02 +01:00
Anssi Kääriäinen
632cf32b43 Fixed -- Oracle specific failure in tests
The failure was caused by using None as a choice for a CharField. To
avoid Oracle's "" <-> NULL handling the field type was changed to
IntegerField.
2012-12-04 22:49:02 +02:00
Julien Phalip
c196e01100 Fixed the admin_filters tests for Postgres. 2012-12-04 10:36:56 -08:00
Claude Paroz
795ac7deda Fixed -- Ensured get_success_url returns a non-lazy URL 2012-12-04 13:22:42 +01:00
Andrew Godwin
501c7a221c Merge pull request from tominsam/master
Fixed : urlize template filter raises exception in some cases
2012-12-04 02:18:10 -08:00
Ramiro Morales
b64d30405a Fixed -- Made values accepted for two customizable admin templates consistent.
Thanks and at cloverfastfood dot com for the report.
2012-12-04 01:13:01 -03:00
Sebastián Magrí
88e1715639 Fixed -- Ensured that the admin's SimpleListFilter options can be displayed as selected even if the lookup's first element is not a string. 2012-12-03 11:53:15 -08:00
Claude Paroz
5fa5621f57 Fixed -- Fixed multi-line commands in initial SQL files
Thanks Aymeric Augustin for detecting this regression.
2012-12-03 20:47:08 +01:00
Tom Insam
161cafb6f6 another failing test case for square brackets. 2012-12-03 12:11:32 +00:00
Aymeric Augustin
baae4b8187 Fixed -- Crash on binary files in project templates.
Thanks gw 2012 at tnode com for the report.
2012-12-03 10:45:18 +01:00
Julien Phalip
2e2c4968f6 Fixed -- Added some CSS class names to the admin index pages to facilitate per-app or per-model style customizations. Thanks to scytale for the report and to H0ff1 and thiderman for their work on the patch. 2012-12-02 20:54:34 -08:00
Claude Paroz
349c4c37f8 Fixed -- Add ISO input formats to all formats 2012-12-01 14:05:52 +01:00
Claude Paroz
0eeae15056 Fixed -- Do not assume usermodel.pk == usermodel.id
Thanks markteisman at hotmail.com for the report.
2012-11-29 21:45:43 +01:00
Anssi Kääriäinen
163b471e9e Converted a couple of assertEquals -> assertEqual 2012-11-28 23:44:50 +02:00
Tai Lee
6ebf115206 Fixed -- Made `defer()` work with reverse relations
Reverse o2o fields are now usable with defer.
2012-11-28 18:17:10 +02:00
Danilo Bargen
c10aaa70a4 Fixed -- Made date filter properly handle midnight value 2012-11-27 21:24:16 +01:00
Anssi Kääriäinen
64f6e0370a Made some tests behave nicer re connection handling 2012-11-27 19:47:20 +02:00
Aymeric Augustin
2ea80b94d7 Fixed -- Detected invalid use of @python_2_unicode_compatible.
Thanks m3wolf for the report and akaariai for reproducing the problem.
2012-11-27 09:45:37 +01:00
Edward Tjörnhammar
29d59a879e Fixed -- Ensure that admin readonly fields' display values are shown in change forms when the raw value is None. 2012-11-25 23:13:30 +01:00
Julien Phalip
ae206d78f6 Fixed -- Added a get_list_filter() method to ModelAdmin. Thanks to rasca for the suggestion and to mateusgondim for the patch. 2012-11-25 20:39:23 +01:00
Claude Paroz
f26b956e80 Fixed test failure following capitalization fix in 2f035a972 2012-11-25 19:54:38 +01:00
Aymeric Augustin
7644800070 Change exception type to reduce confusion.
TemplateSyntaxError is expected at compile time, not at run time.

Refs .
2012-11-25 19:51:42 +01:00
Aymeric Augustin
f89901dc05 Fixed two typos. 2012-11-25 19:31:53 +01:00
Claude Paroz
a5d47415f4 Enabled SimpleTestCase to be decorated by override_settings
Refs . Also fixed some test case classes which subclassed
the wrong parent.
2012-11-25 19:06:17 +01:00
Claude Paroz
9f7cefd505 Fixed -- Raised exception when unittest.TestCase is decorated with override_settings 2012-11-25 19:06:17 +01:00
Aymeric Augustin
d266919584 Fixed -- Raised an explicit exception for the old {% url %} syntax. 2012-11-24 22:10:51 +01:00
Aymeric Augustin
690cac3a34 Used a django.test.TestCase for compatibility with @override_settings.
These tests were silently skipped.
2012-11-24 22:10:51 +01:00
Anssi Kääriäinen
dc569c8801 Fixed ordering-related failure in m2m_through_regress tests 2012-11-24 16:03:21 +02:00
Chris Khoo
bf1871d874 Fixed -- Improved strip_tags utility
The previous pattern didn't properly addressed cases where '>'
was present inside quoted tag content.
2012-11-24 12:16:52 +01:00
Russell Keith-Magee
18d7c1ea3a Simplified the deletions performed by the swappable_models test.
This is required to allow the test to run without error under SQLite in the CI environment.
2012-11-24 15:07:50 +08:00
Russell Keith-Magee
c8985a8a73 Fixed -- Ensure that content types and permissions aren't created for swapped models.
Thanks to rizumu for the report.
2012-11-24 13:43:20 +08:00
Anssi Kääriäinen
0a0a0d66b3 Fixed -- SQLite bulk_insert of more than 500 single-field objs 2012-11-24 01:13:12 +02:00
Anssi Kääriäinen
a27582484c Fixed SQLite's collapsing of same-valued instances in bulk_create
SQLite used INSERT INTO tbl SELECT %s UNION SELECT %s, the problem
was that there should have been UNION ALL instead of UNION.

Refs 
2012-11-24 01:12:17 +02:00
Anssi Kääriäinen
90b86291d0 Fixed -- Removed dict-ordering dependency for F-expressions
F() expressions reuse joins like any lookup in a .filter() call -
reuse multijoins generated in the same .filter() call else generate
new joins. Also, lookups can now reuse joins generated by F().

This change is backwards incompatible, but it is required to prevent
dict randomization from generating different queries depending on
.filter() kwarg ordering. The new way is also more consistent in how
joins are reused.
2012-11-23 19:53:04 +02:00
Aymeric Augustin
2875b5dcab Tweak a test to avoid hitting a limit with SQLite.
Django cannot delete more than 999 objects at a time with SQLite.

Refs , .
2012-11-23 10:02:18 +01:00
Tim Graham
0e3690d230 Fixed - Warned against using models.permalink
Thanks dstufft for the draft patch.
2012-11-22 16:08:51 -05:00
Aymeric Augustin
a026e480da Fixed -- Made post_syncdb handlers multi-db aware.
Also reverted 8fb7a90026. Refs .
2012-11-22 20:53:59 +01:00
George Hickman
ea6b95dbec Fixed -- Set View args/kwargs/request before dispatch 2012-11-22 20:13:01 +01:00
Jannis Leidel
3fb83729b9 Merge branch 'ticket_19325' of https://github.com/hannesstruss/django into hannesstruss-ticket_19325 2012-11-22 10:05:08 +01:00
Julien Phalip
693b8a65ad Modified a staticfiles test to use a unicode character that has just one single representation. The previously used character (ş) has two different representations (u'\u015f' and u's\u0327'), which caused spurious failures when the tests were run across multiple platforms (e.g. on a Linux VM hosted on a Mac). 2012-11-21 09:52:09 +01:00
Claude Paroz
b781354ad1 Updated assertions in pagination test
assertEquals is a deprecated assertion alias.
2012-11-21 09:06:21 +01:00
Chris Beaven
48e8b5e944 Add orphans support to MultipleObjectMixin
Fixes 
2012-11-21 16:50:23 +13:00
Chris Beaven
fbfa654a15 Paginator._get_page hook
This allows for Paginator subclasses to easily override the Page class
that gets used.

Took the opportunity to also do some non-invasive PEP8 tidying of the
paginator module.
2012-11-21 15:19:44 +13:00
Hannes Struss
f9891f2087 Fixed - Made email backend of AdminEmailHandler configurable 2012-11-20 11:23:12 +01:00
Preston Holmes
edf7ad36fa Fixed -- Improved ModelAdmin.message_user API
Thanks to Lowe Thiderman for the patch and tests
2012-11-19 16:03:09 -08:00
Jannis Leidel
778b8bdcf4 Merge pull request from tomchristie/page-kwarg
Add 'page_kwarg' attribute to `MultipleObjectMixin`, removing hardcoded "page".
2012-11-17 12:27:01 -08:00
Claude Paroz
e0363c688d Fixed -- Fixed LogEntry unicode representation
Thanks niko at neagee.net for the report and Emil Stenstrom for
the patch.
2012-11-17 19:19:59 +01:00
Claude Paroz
2a67374b51 Fixed -- Fixed base64 uploads decoding
Thanks anthony at adsorbtion.org for the report, and johannesl for
bringing the patch up-to-date.
2012-11-17 17:25:21 +01:00
Claude Paroz
ec9d6b1122 Fixed -- Applied linebreaksbr to read-only fields in admin
Thanks shadow for the report, and Melevir and thiderman for the
patch.
2012-11-17 17:06:24 +01:00
Jannis Leidel
f79013843d Fixed typo introduced in 4a5e8087ac. 2012-11-17 16:00:19 +01:00
Jannis Leidel
233f86443c Merge pull request from gabrielhurley/reverse-prefix-special-chars
Fixed  -- Escaped special characters in reverse prefixes.
2012-11-17 06:49:18 -08:00
Jannis Leidel
4a5e8087ac Fixed -- Properly escape gettext context prefixes in the i18n JavaScript view template. 2012-11-17 15:37:30 +01:00
Preston Holmes
44046e8a38 Fixed -- made DeprecationWarnings loud
Capture warnings in Python >= 2.7 and route through
console handler, which is subject to DEBUG==True

Thanks to dstufft for the idea, and claudep for initial patch
2012-11-16 17:07:38 -08:00
Anssi Kääriäinen
71e14cf3aa Fixed -- Removed autofield raw SQL inserts from tests 2012-11-15 17:31:08 +02:00
Anssi Kääriäinen
f51e409a5f Fixed -- Improved select_related in inheritance situations
The select_related code got confused when it needed to travel a
reverse relation to a model which had different parent than the
originally travelled relation.

Thanks to Trac aliases shauncutts for report and ungenio for original
patch (committed patch is somewhat modified version of that).
2012-11-15 17:15:21 +02:00
Claude Paroz
550ddc66b4 Fixed -- Fixed gettext_lazy returned type on Python 2
Thanks tyrion for the report.
2012-11-14 10:50:15 +01:00
Claude Paroz
1620c27936 Fixed -- Fixed sending mail with unicode content on Python 3
Thanks alex_po for the report and Luke Plant for the analysis.
2012-11-14 10:43:33 +01:00
Aymeric Augustin
4c5cea7073 Merge pull request from mgrouchy/ticket_18582
Fixed  -- Added a no-op close to BaseCache
2012-11-11 07:18:45 -08:00
Claude Paroz
34162698cc Fixed -- Ensured settings.configure configures logging
Thanks Matt McDonald for the patch.
2012-11-10 12:05:58 +01:00
Sean Breant
4d817b3887 Fixed -- Support cookie pickling in SimpleTemplateResponse
Refs .
2012-11-09 21:07:53 +01:00
Claude Paroz
1b307d6c8f Fixed -- Delayed Queryset evaluation in paginators
Thanks trbs for the report and the patch.
2012-11-09 19:41:57 +01:00
Claude Paroz
45802e1248 Merged pagination tests
It is simpler/cleaner to have all pagination tests in a single file.
Refs .
2012-11-08 11:07:16 +01:00
Anssi Kääriäinen
cafb266954 Fixed -- MySQL again groups by PK only
Thanks to Christian Oudard for the report and tests.
2012-11-08 00:56:32 +02:00
Claude Paroz
79dd751b0b Fixed -- Made memcached backend handle negative incr/decr values
Thanks Michael Manfre for the report and initial patch and
Tobias McNulty for the review.
2012-11-06 12:22:42 +01:00
Claude Paroz
78f66691ee Fixed -- Prevented textareas to swallow first newline content
Browsers consider the first newline in textareas as some display
artifact, not real content. Hence they are not sending it back to
the server. If we want to keep initial newlines, we have to add one
when we render the textarea.
Thanks bastih for the report and initial patch.
2012-11-05 20:27:06 +01:00
Preston Holmes
6bd61194d4 Fixed py3 compatibility for 5a00a57aa5 2012-11-04 23:38:41 -08:00
Anton I. Sipos
fdea2621cd Fixed -- Fix broken test interactions in ModelForms tests
A test in Model Forms test was specifically referring to a fixed
primary key, which was now being used up in a newly committed.
This has been worked around by specifying a higher primary
key.
2012-11-04 18:43:11 -08:00
Alex Gaynor
4d766b3c9a Merge pull request from aisipos/ticket_18949
Fixed  -- Improve performance of model_to_dict with many-to-many
2012-11-04 15:57:45 -08:00
Anton I. Sipos
e44ab5bb4f Fixed -- Improve performance of model_to_dict with many-to-many
When calling model_to_dict, improve performance of the generated SQL by
using values_list to determine primary keys of many to many objects. Add
a specific test for this function, test_model_to_dict_many_to_many

Thanks to brian for the original report and suggested fix.
2012-11-04 15:52:05 -08:00
Preston Holmes
5a00a57aa5 Fixed -- include pagination error details in ListView 404
Thanks to seawolf for the patch
2012-11-04 15:52:00 -08:00
Mike Johnson
fcd3d4c68f model_split: Fixed - fixed error for abstract models with a split method 2012-11-04 13:43:54 -08:00
Alex Gaynor
4285571c5a Fixed -- it is now possible to specify multi-column indexes. Thanks to jgelens for the original patch. 2012-11-04 10:16:06 -08:00
Aymeric Augustin
973f539ab8 Fixed -- Avoided crash of CommonMiddleware on broken querystring 2012-11-03 21:28:33 +01:00
Gabriel Hurley
90e530978d Fixed -- Escaped special characters in reverse prefixes.
Ensured that special characters passed in to reverse via the
prefix argument are properly escaped so that calls to
django.utils.regex_helpers.normalize and/or string formatting
operations don't result in exceptions.

Thanks to toofishes for the error report.
2012-11-03 13:06:57 -07:00
Aymeric Augustin
095eca8dd8 Fixed -- Decoding of non-ASCII POST data on Python 3.
Thanks Claude Paroz.
2012-11-03 13:03:15 +01:00
Ulrich Petri
ac2052ebc8 Fixed -- Added a clickable link for URLFields in admin change list. 2012-11-03 11:57:33 +01:00
Tim Graham
feaf9f279a Fixed - Documented performance considerations for QuerySet.get()
Thanks mmcnickle for the patch.
2012-11-02 17:58:24 -04:00
Andrew Godwin
7f75460fd6 Fixed -- urlize filter no longer raises exceptions on 2.7
Thanks to claudep for the patch.
2012-10-31 10:58:14 +00:00
Anssi Kääriäinen
68847135bc Removed dupe_avoidance from sql/query and sql/compiler.py
The dupe avoidance logic was removed as it doesn't seem to do anything,
it is complicated, and it has nearly zero documentation.

The removal of dupe_avoidance allowed for refactoring of both the
implementation and signature of Query.join(). This refactoring cascades
again to some other parts. The most significant of them is the changes
in qs.combine(), and compiler.select_related_descent().
2012-10-31 08:19:44 +02:00
Claude Paroz
73245b3285 Prevented file_upload tests to leave files behind
Refs .
2012-10-30 22:27:55 +01:00
Claude Paroz
9a02851340 Fixed -- Reset default file storage with setting_changed signal 2012-10-30 22:23:28 +01:00
Claude Paroz
6de6988f99 Fixed -- Properly decode POSTs with non-utf-8 payload encoding
Thanks daniel at blogg.se for the report and Aymeric Augustin for
his assistance on the patch.
2012-10-30 09:00:32 +01:00
Claude Paroz
d30516e163 Prevented leftover files and dirs in admin_scripts tests 2012-10-29 19:08:07 +01:00
Luke Plant
4c4d08502c Fixed - prefetch_related fails with GenericRelation and varchar ID field
Thanks to okke@formsma.nl for the report, and carmandrew@gmail.com for the tests.
2012-10-29 14:31:54 +00:00
Claude Paroz
f1cc2be0c5 Fixed -- Empty DATABASES should default to dummy backend
Thanks delormemarco@gmail.com for the report.
2012-10-28 23:44:03 +01:00
Aymeric Augustin
b4420d9602 Fixed -- floatformat test passes under py3k
Thanks Russell for the report.
2012-10-28 19:57:03 +01:00
Anssi Kääriäinen
611c4d6f1c Fixed -- Ensured m2m.clear() works when using through+to_field
There was a potential data-loss issue involved -- when clearing
instance's m2m assignments it was possible some other instance's
m2m data was deleted instead.

This commit also improved None handling for to_field cases.
2012-10-28 17:31:35 +02:00
Anssi Kääriäinen
a5152bb646 Marked a test as expectedFailure on Oracle 2012-10-27 18:34:18 +03:00
Anssi Kääriäinen
2249bd275c Fixed Oracle failure for "%" in table name 2012-10-27 05:26:42 +03:00
Aymeric Augustin
789ea3342d Fixed comment_test tests under hash randomization.
Thanks clelland for the patch.
2012-10-26 22:47:45 +02:00
Aymeric Augustin
46d27a6b8d Fixed feedgenerator tests under hash randomization 2012-10-26 22:40:35 +02:00
Aymeric Augustin
195bc37f1d Fixed httpwrappers tests under hash randomization 2012-10-26 22:09:48 +02:00
Claude Paroz
be29329ccd Fixed -- Treated '0' value as True for checkbox inputs
Thanks Dan Fairs for the report and the initial patch.
2012-10-26 20:44:00 +02:00
Luke Plant
fabe9c9e5f Fixed test failure under Python 2.x introduced in 3e10d22df5 2012-10-26 02:45:15 +01:00
Luke Plant
3e10d22df5 Fixed test failures on Python 3.3 due to dict ordering assumptions.
Refs 
2012-10-26 02:13:09 +01:00
Luke Plant
c8508943a2 Fixed some test failures on Python 3.3 related to QueryDict
Refs .
2012-10-26 01:55:55 +01:00
Ian Clelland
bdcd2f6b10 Avoid dependence on exact Python exception messages 2012-10-26 01:40:33 +01:00
Ian Clelland
02dda22832 Don't use : as an invalid cookie character
Since http://bugs.python.org/issue2193 has been resolved in favour of
the colon in cookie names, we need to test invalid cookie removal using
a different character. "@" is still considered invalid by all sources.
2012-10-26 01:40:32 +01:00
Luke Plant
71734dfa72 Fixed - Python 3.3 fails unit test for duplicate bad cookies
Thanks to clelland for the report.
2012-10-26 00:50:25 +01:00
Luke Plant
f3a2bcdee9 Fixed - Boolean fields return 0 and 1 when loaded through select_related
Thanks to homm for the report and ramiro for the patch.
2012-10-26 00:25:59 +01:00
Aymeric Augustin
1d6b7f302a Fixed timezone tests when dict randomization is on
Refs .
2012-10-25 23:14:17 +02:00
Anssi Kääriäinen
7de439f32d Fixed -- Raise consistent error from qs.values().delete() 2012-10-25 17:16:56 +03:00
Anssi Kääriäinen
f64a5ef404 Fixed -- Fixed fast-path delete for modified SELECT clause cases
There was a bug introduced in  which caused fast-path deletes
implemented as "DELETE WHERE pk IN <subquery>" to fail if the SELECT
clause contained additional stuff (for example extra() and annotate()).

Thanks to Trac alias pressureman for spotting this regression.
2012-10-25 17:16:44 +03:00
Tom Christie
f824a95177 Test for ListView.page_kwarg 2012-10-25 13:19:53 +01:00
Aymeric Augustin
da56e1bac6 Fixed -- Refactored conversion to bytes in HttpResponse
Thanks mrmachine for the review.
2012-10-25 08:49:51 +02:00
Aymeric Augustin
82b3e6ffcb Fixed -- Made HttpResponse iterable once
response.content can be accessed many times as desired, and always
returns the same result.

iter(response) works only once and consumes the iterator.
2012-10-24 17:19:56 +02:00
Aymeric Augustin
495a8b8107 Fixed -- Provided repeatable content access
in HttpResponses instantiated with iterators.
2012-10-24 17:08:37 +02:00
Aymeric Augustin
83041ca802 Fixed a DeprecationWarning under Python 3. 2012-10-24 16:52:21 +02:00
Claude Paroz
9fd2f9c5f3 Fixed -- Always escape % inside blocktrans tag
Thanks vlinhart for the report and Łukasz Rekucki for the patch.
2012-10-23 18:49:22 +02:00
Carl Meyer
3541a10d49 Fixed -- Fixed diffsettings command broken in fix for .
Thanks Mario César for the report and draft patch.
2012-10-22 18:49:08 -06:00
Aymeric Augustin
ea57112d53 Reverted 6a64822bf4.
This commit caused every test that does two or more assertContains to
fail, because of . It also made HttpResponse non-pickleable.

Refs .
2012-10-23 00:11:17 +02:00
Aymeric Augustin
6a64822bf4 Fixed -- Repeated iteration of HttpResponse
Thanks teepark for the report and grahamd for his insights.
2012-10-22 22:52:36 +02:00
Claude Paroz
e70170c2cb Cleaned up i18n regression tests 2012-10-22 14:45:41 +02:00
Aymeric Augustin
5e629a015e Added tests for conditional_content_removal.
Refs . Thanks mrmachine.
2012-10-21 22:40:31 +02:00
Claude Paroz
22471a41ba Merge pull request from JanBednarik/ticket_19142
Fixed  -- Language codes can include numbers (RFC 3066)
2012-10-21 10:35:01 -07:00
Alex Gaynor
6b3d2bc981 Merge pull request from mitar/patch-2
Allow reversed iteration over SortedDict.
2012-10-20 20:39:49 -07:00
Jan Bednařík
e6b34193c5 Fixed -- Language codes can include numbers (RFC 3066). 2012-10-21 01:25:35 +02:00
Jan Bednařík
b87e2f46c8 Fixed -- Added missing methods to EmptyQuerySet.
Added values() and values_list() methods to EmptyQuerySet.
2012-10-21 00:19:38 +02:00
Aymeric Augustin
d7c6a57d60 Used @override_settings in several tests. 2012-10-20 23:22:46 +02:00
Aymeric Augustin
4b27813198 Fixed -- Added streaming responses.
Thanks mrmachine and everyone else involved on this long-standing ticket.
2012-10-20 20:05:11 +02:00
Claude Paroz
cfb3eb2e3d Used FakePayload in requests tests 2012-10-20 15:54:26 +02:00
Claude Paroz
dcbf08cce5 Fixed -- Improved FakePayload to support write, len and string input
Thanks Ondrej Slinták for the suggestion.
2012-10-20 15:36:24 +02:00
Claude Paroz
dfd4a71751 Fixed -- Restricted accepted content types in parsing POST data
Thanks paulegan for the report and Preston Holmes for the review.
2012-10-20 14:56:16 +02:00
Claude Paroz
681550ca6d Removed custom WSGIRequestHandler.get_environ
We probably historically customized it for good reasons, but
currently, the differences with upstream Python are not
significant any longer.
Also fixes  for which a test has been added.
2012-10-20 13:55:13 +02:00
Ramiro Morales
0b908b92a2 Fixed -- Made redirections after add/edit in admin customizable.
Also fixes .
2012-10-18 20:58:52 -03:00
Preston Holmes
4fb510fde4 Added missed poisoned host header tests 2012-10-18 11:10:46 -07:00
Claude Paroz
6b0a836c9c Fixed assertXMLEqual when first node was a comment 2012-10-15 23:05:40 +02:00
Mitar
2811e543c6 Added tests for reversed iteration over SortedDict. 2012-10-15 12:12:10 -07:00
Ludovic Delaveau
7a44dc555a Fixed - Forms generated from formsets use ErrorList instead of supplied error_class
Patch with tests from charettes, updated.
2012-10-13 15:28:20 +01:00
Adrian Holovaty
ffbc599f77 Removed country-specific localflavor tests.
They now live in separate django-contrib-XX packages.
2012-10-12 16:21:51 -05:00
Tim Graham
06f5da3d78 Fixed - Added a guide of code coverage to contributing docs.
Thanks Pedro Lima for the draft patch.
2012-10-11 06:11:52 -04:00