Commit Graph

8511 Commits

Author SHA1 Message Date
Claude Paroz 34ee7d9875 Updated deprecated test assertions 2013-01-08 19:08:15 +01:00
Anssi Kääriäinen 23ca3a0194 Fixed #16759 -- 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 #19441.
2013-01-07 17:54:30 +01:00
Anssi Kääriäinen a2396a4c8f Fixed #19173 -- 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 a843539af2 Fixed #12914 -- Use yaml faster C implementation when available
Thanks Beuc for the report and the initial patch.
2013-01-05 18:04:00 +01:00
Claude Paroz b740da3504 Fixed #19192 -- 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 850630b4b7 Replaced deprecated sslerror by ssl.SSLError
The exact conditions on which this exception is raised are not
known, but this replacement is the best guess we can do at this
point.
2013-01-03 22:16:43 +01:00
mpaolini 6248833d9e Added documentation for the 'db' argument of the post-syncdb signal. 2013-01-03 22:04:55 +01:00
Claude Paroz ffa50ca352 Fixed #19382 -- 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 #19134 -- 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
Claude Paroz 84ea85fb90 Updated comment about PostGIS bug 2035
PostGIS 2.0.2 has been released on December 3rd 2012, with the
fix included.
2013-01-03 17:37:44 +01:00
Simon Charette 3fc43c964e Fixed #19545 -- Make sure media/is_multipart work with empty formsets 2013-01-03 15:16:23 +01:00
Aymeric Augustin a051a9d929 Fixed PR 478 -- Removed superfluous try/except block. 2013-01-02 22:46:36 +01:00
Aymeric Augustin 07fbc6ae0e Fixed #19547 -- 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
Claude Paroz 884f77bd15 Removed unusable parameters to empty_form property 2013-01-01 21:00:52 +01:00
Florian Apolloner c5ce0e8a68 Updated our six module to follow upstream changes.
This includes fixes for the java/jython detection and a new license header.

Thanks to Thomas Bartelmess for the report.
2013-01-01 16:21:32 +01:00
Florian Apolloner 7cb0cd5aff Replaced six.reraise with a simple raise. 2013-01-01 13:20:36 +01:00
Florian Apolloner a4a4b139cd Replaced e.message with e.args[0] in 3aa4b8165d. 2013-01-01 13:14:55 +01:00
Florian Apolloner 009235b138 Merge pull request #182 from kspi/patch-1
Correct Lithuanian short date format.
2013-01-01 04:08:25 -08:00
Florian Apolloner cf7afeb2d1 Fixed a NameError in geoip/libgeoip if the GeoIP library is not found.
Thx to Bouke Haarsma for the report.
2013-01-01 12:24:02 +01:00
Anton Baklanov 3aa4b8165d Fixed #19457 -- 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 #19519 again -- Regression in LiveServerTestCase after fd1279a4. 2013-01-01 10:14:11 +01:00
Ramiro Morales 3570ff734e Fixed #17078 -- Made shell use std IPython startup.
This allows for a behavior more in line with what is expected by Ipython
users, e.g. the user namespace is initialized from config files, startup
files.

Thanks Benjamin Ragan-Kelley from the IPython dev team for the patch.
2012-12-31 19:40:02 -03:00
Julien Phalip 9180146d21 Fixed #19453 -- 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 #19519 -- Fired request_finished in the WSGI iterable's close(). 2012-12-31 12:47:34 +01:00
Aymeric Augustin a53c474026 Fixed #16241 -- Ensured the WSGI iterable's close() is always called.
Thanks Graham Dumpleton for the report.
2012-12-31 12:45:20 +01:00
Claude Paroz d11038acb2 Fixed #19537 -- 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 #19505.
2012-12-30 21:33:21 -08:00
Anssi Kääriäinen f80a1934cd Fixed GIS regression in get_default_columns()
I changed the normal compiler's get_default_columns() but didn't change
the copy-pasted code in GIS compiler's get_default_columns().

Refs #19385
2012-12-30 12:10:15 +02:00
Anssi Kääriäinen ce3c71faf1 Minor improvement to proxy model handling
Refs #19385
2012-12-30 11:20:27 +02:00
Anssi Kääriäinen 807eff7439 Made use of PathInfo.direct flag in trim_joins
Refs #19385
2012-12-30 11:20:13 +02:00
Anssi Kääriäinen 68985db482 Added Query.join_parent_model()
This simplifies especially compiler.py a lot, where almost the same
code was repeated multiple times.

Refs #19385
2012-12-30 11:19:35 +02:00
Anssi Kääriäinen 4511aeb6b8 Moved join path generation to Field
Refs #19385
2012-12-30 11:19:19 +02:00
Anssi Kääriäinen 9ef3cab40b Made sure join_field is always available in .join()
Refs #19385
2012-12-30 11:18:25 +02:00
Aymeric Augustin a7b7d6320c Merge pull request #595 from bmispelon/patch-1
Fixed a typo in WidthRatioNode.
2012-12-29 13:39:52 -08:00
Aymeric Augustin 0b09b1a7ca Merge pull request #609 from mitar/patch-3
Fixed typo in collectstatic output.
2012-12-29 13:35:52 -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 #18127.
2012-12-29 21:59:07 +01:00
Aymeric Augustin 130829334c Removed csrf_response_exempt and csrf_view_exempt. 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 e00d1b6dc6 Removed obsolete compatibility functions for old Pythons. 2012-12-29 21:59:07 +01:00
Aymeric Augustin 5d5e1f5afa Removed support is_safe and needs_autoescape as function attributes. 2012-12-29 21:59:07 +01:00
Aymeric Augustin 641acf76e7 Removed IGNORABLE_404_STARTS/ENDS settings. 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 59351247bd Removed django.core.cache.backends.memcached.CacheClass. 2012-12-29 21:59:07 +01:00
Aymeric Augustin ebd2598596 Removed django.contrib.markup. 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 b2d20e9826 Removed legacy shortcut for importing GeoIP. 2012-12-29 21:58:12 +01:00
Aymeric Augustin d4ea02b992 Removed the legacy form wizard. 2012-12-29 21:58:12 +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 59ddb79e90 Removed django.conf.urls.defaults. 2012-12-29 21:58:12 +01:00
Aymeric Augustin fb9f1b9bfb Removed backwards-compatibility shim for #16288.
Also unit-tested django.utils.log.RequireDebugTrue for consistency.
2012-12-29 21:58:12 +01:00
Aymeric Augustin e9c24bef74 Fix #19524 -- Incorrect caching of parents of unsaved model instances.
Thanks qcwxezdas for the report. Refs #13839.
2012-12-28 23:34:54 +01:00
Mitar cb98806101 Update django/contrib/staticfiles/management/commands/collectstatic.py
Fixed small output error.
2012-12-27 20:37:12 +01:00
Aymeric Augustin db278c3bf9 Fixed #19525 -- Reverted dcd4383107 and 05d333ba3b.
Refs #9893, #18515.

Thanks Russell for the report.
2012-12-27 09:37:57 +01:00
Claude Paroz 0907d3c6f5 Fixed #16408 -- Re-fixed value conversion with Spatialite backend 2012-12-26 12:45:41 +01: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 #17758, #7581.
2012-12-24 20:28:07 +01:00
Julien Phalip 35d1cd0b28 Fixed #19505 -- A more flexible implementation for customizable admin redirect urls.
Work by Julien Phalip.

Refs #8001, #18310, #19505. See also 0b908b92a2.
2012-12-24 15:44:19 -03:00
Florian Apolloner 4a71b84266 Fixed #19204 -- Replaced python2-style exception syntax.
Thanks to garrison for the report and patch.
2012-12-24 14:05:36 +01:00
Luke Plant 8bc410b445 Fixed HTML comparisons of class="foo bar" and class="bar foo" in tests
Refs #17758
2012-12-24 02:11:32 +00:00
Luke Plant c31c2c92b8 Made admin generated changelist URLs independent of dict ordering 2012-12-24 01:33:24 +00:00
Ian Clelland 6b9f130278 Sort HTML attributes on generated forms 2012-12-24 00:47:17 +00:00
Ian Clelland 8d35fd4c32 Use new TestCase methods for equality comparisons 2012-12-24 00:24:14 +00:00
Ian Clelland 089d9ca1df Add assertJSONEqual method to TestCase 2012-12-24 00:18:50 +00:00
Ian Clelland dc704516c2 Add assertInHTML method to TestCase 2012-12-24 00:15:36 +00:00
Claude Paroz 0dc3fc954f Fixed #19509 -- Fixed crypt/bcrypt non-ascii password encoding
Also systematically added non-ascii passwords in hashers test suite.
Thanks Vaal for the report.
2012-12-22 16:04:10 +01:00
Aymeric Augustin 1e4a27d087 Fixed #19468 -- 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
Aymeric Augustin d9a0b6ab36 Fixed #19487 -- Used str in the test client's WSGI environ.
This regression was introduced by the unicode_literals patch. The WSGI
spec mandates that environ contains native strings.
2012-12-22 10:38:27 +01:00
Claude Paroz e277301c2c Fixed #19387 -- Preserved SafeData status in contrib.messages
Thanks Anton Baklanov for the report and the patch.
2012-12-21 10:09:32 +01:00
Anssi Kääriäinen 4007c8f6eb Fixed a regression in distinct_on
Caused by regression fix for #19500.
2012-12-20 22:50:06 +02:00
Anssi Kääriäinen d407164c04 Fixed #18854 -- 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 #19500 -- 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 #19401 -- 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 #18172 -- Made models with __iter__ usable in ModelMultipleChoiceField
Thanks to Patryk Zawadzki for the patch.
2012-12-19 22:51:12 +02:00
Tim Graham 6534a95ac3 Fixed #19470 - Clarified widthratio example.
Thanks orblivion for the suggestion.
2012-12-18 08:20:01 -05:00
Claude Paroz 55972ee5c7 Fixed #19441 -- 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 c64b57d166 Replaced '__' with LOOKUP_SEP in sql/query.py
Thanks to Simon Charette for report.
2012-12-17 21:15:01 +02:00
Baptiste Mispelon ac8eb82abb Fixed typo in WidthRatioNode's error. 2012-12-17 10:35:36 +01:00
Aymeric Augustin bbabfdccce Fixed #19485 -- Python 3 compatibility for c2a6b2a4.
Refs #9589.
2012-12-17 09:46:26 +01:00
Anssi Kääriäinen 12a96bfa26 Fixed #19197 -- fixed convert_values() for nullable numeric fields
Cleaned up the implementation of base convert_values() a little, and
made sure it accepts None as a value for numeric fields.

There are no tests attached. The reason is that not all of the
convert_values() accept None as a value for numeric fields (for example
sqlite3.convert_values()).

The reason the base convert_values() needs to accept None is that this
situation might arise in custom compilers for 3rd party backends. It
is easy to keep the convert_values() working, so lets do that.
2012-12-16 23:26:16 +02:00
Claude Paroz ed711c4bd5 Fixed #19483 -- 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 704ee33f50 Fixed #16679 -- Use caching to speed up signal sending 2012-12-16 21:46:02 +02:00
Tim Graham 507c081484 Fixed #18718 - Documented django.utils.encoding.filepath_to_uri 2012-12-16 14:39:37 -05:00
Anssi Kääriäinen 69597e5bcc Fixed #10790 -- 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 #10790
which was join trimming in null filter cases.
2012-12-16 17:23:26 +02:00
Anssi Kääriäinen f811649710 Fixed #18816 -- Removed "trim" argument from add_filter()
The trim argument was used by split_exclude() only to trim the last
join from the given lookup. It is cleaner to just trim the last part
from the lookup in split_exclude() directly so that there is no need
to burden add_filter() with the logic needed for only split_exclude().
2012-12-16 16:56:28 +02:00
Anssi Kääriäinen d7b49f5b0d Fixed #19469 -- Removed opts.get_ordered_objects() and related code
The code was dead-code since 2006.
2012-12-16 16:22:09 +02:00
Russell Keith-Magee 9facca28b6 Corrected tests depending on the error message on the AuthenticationForm.
Refs #19368, and the fix introduced in 27f8129d64.
2012-12-16 07:18:45 +08:00
Russell Keith-Magee 27f8129d64 Fixed #19368 -- Ensured that login error messages adapt to changes in the User model.
Thanks to un33k for the report.
2012-12-15 22:44:47 +08:00
Russell Keith-Magee 47e1df896b Fixed #19412 -- Added PermissionsMixin to the auth.User heirarchy.
This makes it easier to make a ModelBackend-compliant (with regards to
permissions) User model.

Thanks to cdestigter for the report about the relationship between
ModelBackend and permissions, and to the many users on django-dev that
contributed to the discussion about mixins.
2012-12-15 22:44:47 +08:00
Ramiro Morales 730c0d2e72 Fixed a couple of docstring typos. 2012-12-15 10:22:22 -03:00
Ramiro Morales c2a6b2a43f Fixed #9589 -- Made development web server more robust in the presence of a wider variety of code errors.
Thanks goes to contributor with Trac user 'berto' for the patch.
2012-12-15 10:17:25 -03:00
Aymeric Augustin a001f3c31e Fixed #2304 -- Documented TRANSACTIONS_MANAGED. 2012-12-14 21:15:48 +01:00
Anssi Kääriäinen 088d3bc2f8 Fixed #19462 -- 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 #19432 -- 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 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 #18856 -- Ensured that redirects can't be poisoned by malicious users. 2012-12-10 22:11:39 +01:00
Aymeric Augustin be9f2919e0 Edited the middleware doc for completeness, clarity, and consistency. 2012-12-09 22:30:01 +01:00
Aymeric Augustin 49519328b4 Fixed #19392 -- Improved error for old-style url tags with dashes.
Thanks dloewenherz for the report.
2012-12-09 16:17:56 +01:00
Claude Paroz 35492f8fc4 Fixed #19439 -- Removed unused template tag library in change_password.html
Thanks ppetrid for the report.
2012-12-08 12:52:09 +01:00
Claude Paroz 04e6542b5a Fixed #19423 -- 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 6140795150 Fixed a string detection in ogrinspect.py 2012-12-08 12:19:39 +01:00
Claude Paroz c91667338a Fixed #19357 -- 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 #18574 -- 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 #19367 -- 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 #19429 -- 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
Ramiro Morales 45f00dbb93 Minor idiomatic and docstring edits in ar localflavor. 2012-12-04 19:48:39 -03:00
Claude Paroz 795ac7deda Fixed #19378 -- Ensured get_success_url returns a non-lazy URL 2012-12-04 13:22:42 +01:00
Andrew Godwin 501c7a221c Merge pull request #573 from tominsam/master
Fixed #19070: urlize template filter raises exception in some cases
2012-12-04 02:18:10 -08:00
Ramiro Morales b64d30405a Fixed #18697 -- 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 #19318 -- 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 #19416 -- Fixed multi-line commands in initial SQL files
Thanks Aymeric Augustin for detecting this regression.
2012-12-03 20:47:08 +01:00
Preston Holmes 6d27547d20 Merge pull request #569 from orblivion/master
Fixed typo in ValuesQuerySet._as_sql docstring
2012-12-03 08:51:40 -08:00
Tom Insam 74809fdcc7 cope with unsplittable urls in smarl_urlquote. 2012-12-03 12:13:24 +00:00
Aymeric Augustin baae4b8187 Fixed #19397 -- 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 #17050 -- 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
orblivion 0ff1d4fa49 Typeo in ValuesQuerySet._as_sql docstring 2012-12-01 18:55:26 -08:00
Claude Paroz 90d3af380e Fixed #19015 -- Removed ISO formats from localized formats.py
ISO formats are automatically appended to the list of input
formats. Kept only when it is specified in first position, as it
has a special meaning in localize_input.
Thanks Bojan Mihelac for the report.
2012-12-01 14:15:06 +01:00
Claude Paroz 349c4c37f8 Fixed #19015 -- Add ISO input formats to all formats 2012-12-01 14:05:52 +01:00
Claude Paroz c0efbc7b53 Fixed #19347 -- Removed unused variable definition in FetchFromCacheMiddleware
Thanks gregplaysguitar at gmail.com for the report.
2012-12-01 13:52:26 +01:00
Claude Paroz a0cd6dd11e Fixed #19349 -- Fixed re-rendering of ReadOnlyPasswordHashWidget
Thanks tim.bowden at mapforge.com.au for the report, Andreas Hug
for the patch and Anton Baklanov for the review.
2012-12-01 12:22:43 +01:00
Preston Holmes 84a5294788 Added missing custom user skip decorator
PermissionDeniedBackendTest references User model.
2012-11-30 22:54:42 -08:00
Claude Paroz 0eeae15056 Fixed #19354 -- Do not assume usermodel.pk == usermodel.id
Thanks markteisman at hotmail.com for the report.
2012-11-29 21:45:43 +01:00
Aymeric Augustin d913a8b412 Fixed #19356 -- Increased session key entropy. 2012-11-29 16:36:43 +01:00
Ramiro Morales 514ce1d35f Fixed two docstring/comment typos. 2012-11-28 20:28:30 -03:00
Claude Paroz cc3c4a9d55 Fixed #19366 -- Prevented GEOSIndexError when comparing geometries
Thanks Craig de Stigter for the report and collaboration on the
patch.
2012-11-28 22:34:02 +01:00
Tai Lee 6ebf115206 Fixed #14694 -- 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 #19370 -- Made date filter properly handle midnight value 2012-11-27 21:24:16 +01:00
Anssi Kääriäinen d37483c533 Removed duplicate opts.pk_index() method 2012-11-27 21:54:46 +02:00
Anssi Kääriäinen 86644e065f Refactored gis/spatialite connection initialization
The connection state is now initialized in get_new_connection().
Refs #19274.
2012-11-27 19:47:22 +02:00
Anssi Kääriäinen 905ea9619b Made sure global settings are changed in test db creation
There was an assumption that changing connection.settings_dict changed
also the settings.DATABASES values. This assumption is now gone.
2012-11-27 19:47:20 +02:00
Anssi Kääriäinen 1893467784 Fixed #19274 -- Made db connection creation overridable in subclasses
Connection creation was done in db backend ._cursor() call. This
included taking a new connection if needed, initializing the session
state for the new connection and finally creating the connection.

To allow easier modifying of these steps in subclasses (for example to
support connection pools) the _cursor() now calls get_new_connection()
and init_connection_state() if there isn't an existing connection. This
was done for all non-gis core backends. In addition the parameters used
for taking a connection are now created by get_connection_params().

We should also do the same for gis backends and encourage 3rd party
backends to use the same pattern. The pattern is not enforced in code,
and as the backends are private API this will not be required by
documentation either.
2012-11-27 19:47:19 +02:00
Aymeric Augustin 2ea80b94d7 Fixed #19362 -- 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 #17911 -- 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
Aymeric Augustin 05dbc07c52 Merge pull request #476 from wraithan/patch-1
Indented comments consistently in project template
2012-11-25 12:04:52 -08:00
Aymeric Augustin e18968e0f2 Merge pull request #518 from vanschelven/patch-1
Fixed interpolation in a translated string.

Refs #14678.
2012-11-25 11:59:34 -08:00
Julien Phalip ae206d78f6 Fixed #17646 -- 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
Aymeric Augustin 7644800070 Change exception type to reduce confusion.
TemplateSyntaxError is expected at compile time, not at run time.

Refs #19280.
2012-11-25 19:51:42 +01:00
Claude Paroz a5d47415f4 Enabled SimpleTestCase to be decorated by override_settings
Refs #18417. Also fixed some test case classes which subclassed
the wrong parent.
2012-11-25 19:06:17 +01:00
Claude Paroz 9f7cefd505 Fixed #18417 -- Raised exception when unittest.TestCase is decorated with override_settings 2012-11-25 19:06:17 +01:00
Julien Phalip 612357f8ef Fixed #19355 -- Improved LiveServerThread's handling of exceptions. Thanks to flub for the report. 2012-11-25 12:55:23 +01:00
Aymeric Augustin 9d7130e066 Merge pull request #554 from zedr/master
Minor spelling error in a docstring
2012-11-24 13:47:09 -08:00
Aymeric Augustin d266919584 Fixed #19280 -- Raised an explicit exception for the old {% url %} syntax. 2012-11-24 22:10:51 +01:00
Vladimír Macek abd0e76d2d Fixed #19293 -- Updated Czech input formats
Thanks vzima for the report.
2012-11-24 19:18:54 +01:00
Jonatan Heyman 35a0fff28a Fixed #18722 -- Adjusted width of sortable columns in admin
Thanks Simon Charette for the report.
2012-11-24 17:12:59 +01:00
Claude Paroz a962bc7c45 Updated User manager when testing custom AUTH_USER_MODEL
This is giving more real test conditions when AUTH_USER_MODEL is
set with override_settings.
2012-11-24 16:00:00 +01:00
Anssi Kääriäinen 08b4a22293 Updated stale docstring of setup_joins 2012-11-24 16:26:05 +02:00
Chris Khoo bf1871d874 Fixed #19237 -- 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