Ramiro Morales
8459eac031
Move management helper function to new utils module.
...
This allows us to iremove an inter-command import.
2013-02-26 22:07:22 -03:00
Ramiro Morales
dfa9324966
Don't use os.system() in compilemessages.
...
Fixes #19584 .
This implies stop storing file path command line arguments in envvars as
a security measure to start relying on with Popen's shell=False instead,
and addition of an 'utils' module.
Thanks kmichel_wgs for the report.
2013-02-26 21:31:53 -03:00
Claude Paroz
87cc3da814
Merged contrib translations from 1.5 branch
2013-02-26 21:51:06 +01:00
Claude Paroz
6ca475d540
Merged core translations from 1.5 branch
2013-02-26 21:51:06 +01:00
Łukasz Langa
6a057e1595
Fixed #18191 -- Don't consider Accept-Language redundantly in cache key.
...
Thanks to choongmin for the original patch.
2013-02-25 16:10:57 -07:00
Aymeric Augustin
e76147a83a
Fixed #19634 -- Added proper __hash__ methods.
...
Classes overriding __eq__ need a __hash__ such that equal objects have
the same hash.
Thanks akaariai for the report and regebro for the patch.
2013-02-25 23:05:20 +01:00
Aymeric Augustin
f1255a3c09
Fixed #18144 -- Restored compatibility with SHA1 hashes with empty salt.
...
Thanks dahool for the report and initial version of the patch.
2013-02-25 20:21:58 +01:00
Carl Meyer
906dc8522a
Fixed #19854 -- Turn Django's own Selenium tests off by default.
2013-02-25 10:14:42 -07:00
Carl Meyer
87e8dfaa47
Switching to autoescape is not a change in syntax.
2013-02-25 00:43:03 -07:00
Carl Meyer
3ded2aef71
Remove leading underscore from a function that's all growed up now.
...
This function is now the de facto standard function for rendering values in a
template, and is imported by two other built-in template modules. It shouldn't
have a leading underscore.
2013-02-25 00:33:29 -07:00
Claude Paroz
5eebb49c69
Fixed #19908 -- Added missing import in forms.py
...
Thanks loic84 for the report.
2013-02-24 22:59:15 +01:00
Julien Phalip
a8449d4362
Merge pull request #824 from ambv/languagecode
2013-02-24 12:56:14 -08:00
Julien Phalip
438ce4ec55
Fixed some docstrings that were raising Sphinx warnings when running the admindocs tests.
2013-02-24 12:03:24 -08:00
Florian Apolloner
b88bf9f125
Fixed python 3 support. Refs #17320
2013-02-24 18:35:08 +01:00
Aymeric Augustin
e3e0f49ece
Merge pull request #834 from vdboor/issue_19906_list_classes
...
Added column-<field_name> classes to the admin list
2013-02-24 08:58:57 -08:00
Diederik van der Boor
b7ba4fc408
Add column-<field_name> classes to the admin list
...
This simplifies CSS styling to set column widths.
2013-02-24 17:50:23 +01:00
Florian Apolloner
5e52dc2ade
Merge pull request #828 from zerok/tickets/17320
...
Fixed #17320 -- Added whitespace validation to Site.domain field
2013-02-24 08:39:27 -08:00
Simon Charette
6b03179e12
Fixed #19688 -- Allow model subclassing with a custom metaclass using six.with_metaclass
2013-02-24 17:32:34 +01:00
Christopher Medrela
636c45fc58
Fixed #19890 -- ifchanged templatetag rendered its content twice
...
The content of ifchanged template tag was rendered twice: first time, to
compare it with the previous value and the second time, to return the
rendered output.
2013-02-24 16:49:28 +01:00
Horst Gutmann
c729461479
Fixed #17320 -- Added whitespace validation to the Site.domain field
2013-02-24 16:40:51 +01:00
Diederik van der Boor
8503120c10
Fixed #15849 -- Made IfChanged node thread safe.
...
Previously, the ifchanged node stored state on `self._last_seen`,
thereby giving undesired results when the node is reused by another
thread at the same time (e.g. globally caching a Template object).
Thanks to akaihola for the report and Diederik van der Boor and
Bas Peschier for the patch.
2013-02-24 16:06:55 +01:00
Zbigniew Siciarz
0a8402eb05
Test case and docs for custom context data in feeds
...
Thanks Paul Winkler for the initial patch. (Ref #18112 ).
2013-02-24 08:33:20 -06:00
Florian Apolloner
4506ae0497
Merge pull request #717 from slurms/ticket_19746
...
Fixed #19746 -- Allow deserialization of pk-less data
2013-02-24 06:31:14 -08:00
Aymeric Augustin
bc787f6a32
Loaded cycle and firstof from future in built-in templates. Refs #17906 .
...
This was missing from f49e9a517f
.
2013-02-24 15:16:45 +01:00
Łukasz Langa
8c8f94fe9d
Fixes #19763 - LocaleMiddleware should check for supported languages in settings.LANGUAGE_CODE
2013-02-24 14:43:45 +01:00
Tomek Paczkowski
99edbe0e27
Fixed #19253 -- Extracted template cache key building logic
...
Introduced a public function
django.core.cache.utils.make_template_fragment_key
Thanks @chrismedrela for fruitful cooperation.
2013-02-24 14:32:45 +01:00
Joeri Bekker
b9cc61021a
Fixed #9084 - Best approach for an OS to atomically rename the session file.
2013-02-24 14:21:40 +01:00
Aymeric Augustin
7106a1e594
Merge pull request #819 from erikr/master
...
Fixed #16302 -- Ensured contrib.comments is IPv6 capable.
2013-02-24 05:02:00 -08:00
Erik Romijn
ade992c61e
Fixed #16302 -- Ensure contrib.comments is IPv6 capable
...
Changed the ip_address field for Comment to GenericIPAddressField. Added
instructions to the release notes on how to update the schema of existing
databases.
2013-02-24 13:58:38 +01:00
Bas Peschier
5a9b2bce24
Fixed #19810 -- MemcachedCache now uses pickle.HIGHEST_PROTOCOL
2013-02-24 13:56:15 +01:00
Honza Král
d7e835f76d
Merge pull request #820 from viciu/11295
...
Fixed #11295 : If ModelAdmin.queryset returns a filtered QS don't require a 2nd count call
2013-02-24 04:35:27 -08:00
Aymeric Augustin
a44531ae15
Fixed #18862 -- Honored script prefix in FlatPage.get_absolute_url.
2013-02-24 13:27:13 +01:00
Aymeric Augustin
4b01ee7a50
URL-encoded URLs in FlatPage.get_absolute_url.
2013-02-24 13:27:13 +01:00
Wiktor Kolodziej
f07a5f0a21
Fixed #11295 : If ModelAdmin.queryset returns a filtered QS don't require a 2nd count call
...
Original patch rewritten, added tests and get_filters_params method for ChangeList class.
Thanks Alex for the report.
2013-02-24 13:23:23 +01:00
Honza Král
e4e1287590
Merge pull request #817 from rybaktomasz/ticket_5568
...
Fixes #5568 -- DROP INDEX subcommand
2013-02-24 04:02:26 -08:00
Honza Kral
cbb9f629b8
Revert "fixes #19263" - Fails if not SQLite
...
This reverts commit 2b76f19f2b
.
2013-02-24 12:38:32 +01:00
Tomasz Rybak
d7429defe6
Add sqldropindexes to manage
...
Change patch from https://code.djangoproject.com/ticket/5568
to work on modern Django.
Add special case for MySQL which has different syntax for DROP INDEX.
Add unit tests for the new functionality.
2013-02-24 12:38:28 +01:00
George Song
44164c5c30
Fixed #19896 -- Committed after clearing cache in the database.
2013-02-24 12:15:02 +01:00
Florian Apolloner
f56ca3f0e6
Fixed the usage of the deprecated assertEquals.
2013-02-24 11:15:17 +01:00
Preston Holmes
22d82a7742
Fixed #15198 -- pass request to AuthenticationForm
...
Thanks to Ciantic for the report, claudep and slurms for initial work
2013-02-23 15:28:49 -08:00
Preston Holmes
9d2c0a0ae6
Removed superfluous cookie check from auth login.
...
This is ensured through the CSRF protection of the view
2013-02-23 15:28:49 -08:00
Honza Král
fc38d6a92b
Merge pull request #813 from HiddenData/ticket-19263
...
fixes #19263 - EmptyResultSet in subquery causes incorrect SQL
2013-02-23 15:05:24 -08:00
Marcin Biernat
2b76f19f2b
fixes #19263
2013-02-23 23:53:46 +01:00
Honza Král
692902b227
Merge pull request #778 from viciu/19609
...
Fixed #19609 : admin Inlines doesn't display help_text for readonly fields
2013-02-23 14:34:57 -08:00
Honza Kral
ef1e6ef1eb
Merge branch 'ticket19872' of https://github.com/oinopion/django
2013-02-23 23:32:09 +01:00
Honza Kral
2b48fcc607
Fixed #18491 -- deleting a proxy doesn't show warning about cascade deletes
2013-02-23 23:20:34 +01:00
Tomek Paczkowski
b88abd6840
Fixed #19872
...
Made cached_property to behave as property when accessed via class.
2013-02-23 23:20:00 +01:00
Aleksandra Sendecka
32a7ab2148
Fixed #19526
...
CSS specifications governs that syntax is case insensitive.
This modifies CachedFilesMixin to support that.
2013-02-23 23:05:22 +01:00
Klaas van Schelven
1c11ee6345
Fixed #18829 -- Fixed ModelChoiceIterator length
...
Thanks facundo.olano at gmail.com for the report and thikonom for
the initial patch.
2013-02-23 22:27:07 +01:00
Hernan Lozano
7e6ad76b24
Fixed #19282 -- Restored ability to pass Decimals to intcomma filter
2013-02-23 21:48:22 +01:00
Honza Král
10026c2ad0
Merge pull request #804 from oinopion/ticket18162
...
Fixes #18162 -- Specifying choices to Field overrides any form_class argument
2013-02-23 12:45:39 -08:00
Grzegorz Nosek
2cd0edaa47
Fixed 19895 -- Made second iteration over invalid queryset raise an exception too
...
When iteration over a queryset raised an exception, the result cache
remained initialized with an empty list, so subsequent iterations returned
an empty list instead of raising an exception
2013-02-23 14:35:27 -06:00
Łukasz Langa
539900f117
Fixes #17866 : Vary: Accept-Language header when language prefix used
2013-02-23 19:41:33 +01:00
Claude Paroz
98ab8e8876
Fixed #19698 -- Cleared sites cache with signals
...
Thanks ddavies at nomensa.com for the report and the patch and
serdaroncode for reviewing the patch.
2013-02-23 19:31:17 +01:00
Honza Král
0a341ab40d
Merge pull request #791 from khalas/ticket_19811
...
Changed %r to %s in get_language_info error message
2013-02-23 10:16:23 -08:00
Tomek Paczkowski
b6f4a92ff4
Proposed fix for #18162 .
2013-02-23 19:01:38 +01:00
Konrad Hałas
48dc0cbf2a
Changed %r to %s in get_language_info error message.
2013-02-23 18:54:54 +01:00
Florian Apolloner
5ae0c933a8
Fixed errors introduced in 21f333bcef
. Refs #17751
2013-02-23 18:43:34 +01:00
Claude Paroz
cc53d9b30b
Fixed #15877 -- Improved exception when ModelForm has no model class
...
Thanks theaspect at gmail.com for the report and volrath for the
patch.
2013-02-23 18:32:29 +01:00
Wiktor Kolodziej
67dd54dc84
Fixed #19609 : admin Inlines doesn't display help_text for readonly fields
...
Refactoring: field was renamed to field_name, since flatten_fieldsets returns field name, not field.
Original patch from Marc Aymerich Gubern
2013-02-23 18:24:32 +01:00
Zbigniew Siciarz
1cd2f51eb4
Added test runner option to skip Selenium tests ( #19854 ).
2013-02-23 17:45:26 +01:00
Lennart Regebro
687d2e967d
Fixed #19827 -- Kept stacktrace in defaulttags exception reraising
...
Thanks Kronuz for the report and the initial patch.
2013-02-23 17:43:17 +01:00
Honza Král
0ad76843b5
Merge pull request #777 from khalas/ticket_19811
...
Fixed #19811 - Added language code fallback in get_language_info
2013-02-23 08:30:27 -08:00
Honza Král
129d2e8f85
Merge pull request #775 from HiddenData/ticket-18899
...
Fixed #18899 -- FileSystemStorage.save should support any file-like objects
2013-02-23 08:04:41 -08:00
Konrad Hałas
6bd6a56896
Fixed #19811 - Added language code fallback in get_language_info.
2013-02-23 17:02:07 +01:00
Mathijs de Bruin
8c1cc4b3b0
Fixed regression introduced in 146ed13a
.
...
As override_settings was used after the initialization of the session backend,
we need to use a new session backend here.
2013-02-23 16:53:31 +01:00
Aymeric Augustin
5278776a88
Merge pull request #751 from bmispelon/ticket-6271
2013-02-23 07:47:58 -08:00
Marcin Biernat
664855b74e
#18899 FileSystemStorage.save should support any file-like objects
2013-02-23 16:40:50 +01:00
Vladimir A Filonov
f49e9a517f
Fixed #17906 - Autoescaping {% cycle %} and {% firstof %} templatetags.
...
This commit adds "future" version of these two tags with auto-escaping
enabled.
2013-02-23 16:16:39 +01:00
Tomek Paczkowski
3dddbc0f23
Fixed #19816 : pre-evaluate queryset on m2m set
...
In ReverseManyRelatedObjectsDescriptor.__set__, evaluate possible
queryset to avoid problems when clear() would touch data this queryset
returns.
2013-02-23 15:50:33 +01:00
Baptiste Mispelon
069280a689
Used token.split_contents() for tokenisation in template tags accepting variables.
...
Fixed #6271 , #18260 .
2013-02-23 15:15:30 +01:00
Jannis Leidel
6bbf4e57c8
Fixed embarrassing typo in last commit.
2013-02-23 14:59:51 +01:00
Florian Apolloner
67c39a64e0
Merge pull request #759 from erikr/master
...
Fix #17751 : Added stripping of whitespace for IPAddressField/GenericIPAddressField
2013-02-23 05:58:48 -08:00
Erik Romijn
21f333bcef
Fix #17751 : Added stripping of whitespace for IPAddressField/GenericIPAddressField
2013-02-23 14:44:57 +01:00
fako
2db9cbe97c
Removes document_root argument from django.contrib.staticfiles.views.serve
...
This argument can be removed, because the new way of finding static files doesn't take document_root into account at all.
2013-02-23 14:38:13 +01:00
Jannis Leidel
c12891e8cd
Fixed #19850 -- Use configured staticfiles storage to find the URL of a static file in the admin.
2013-02-23 14:36:51 +01:00
Horst Gutmann
2f4a4703e1
Fixed #19758 -- Avoided leaking email existence through the password reset form.
2013-02-23 14:31:21 +01:00
Klaas van Schelven
91c9470664
Method "save" in BaseModelFormSet is marked as alters_data
...
Fixes #17663
2013-02-23 13:01:28 +01:00
Claude Paroz
7ec2a21be1
Fixed #19686 -- Added HTML5 number input type
...
Thanks Simon Charette for his help on the patch. Refs #16630 .
2013-02-23 10:18:08 +01:00
Claude Paroz
e5a8df06be
Fixed #19846 -- Optimized a dict of lists in BlockContext class
...
Thanks Curtis Maloney for the report and the patch.
2013-02-22 23:55:11 +01:00
Anssi Kääriäinen
ce094e570e
Fixed Oracle regression in last_executed_query() with unicode strings
...
The regression was likely caused by the fix in #19606 which adjusted
Oracle's unicode detection, though it seems this would have been an
issue in some configurations even before.
2013-02-23 00:27:39 +02:00
Anssi Kääriäinen
09fcb70c80
Fixed empty strings + to_field regression on Oracle
...
Querying the reverse side of nullable to_field relation, where both
sides can contain null values resulted in incorrect results. The reason
was not detecting '' as NULL.
Refs #17541
2013-02-23 00:05:31 +02:00
Baptiste Mispelon
f13bfbec70
Fixed #19882 -- Smarter tokenizing of {% for %} tag arguments.
2013-02-22 19:19:33 +01:00
Aymeric Augustin
5488437ab6
Factored code and added a missing docstring.
2013-02-21 21:26:40 +01:00
Anssi Kääriäinen
3c6318e831
Fixed #19870 -- Regression in select_related in inheritance cases
...
There was a regression in case two models inherited the same parent,
and one contained a foreign key to other. When select_related travelled
the foreign key the other model reused the parent join made by the
first model. This was likely caused by Query.join_parent_model()
addition in commit 68985db482
.
Thanks to Trac alias loic84 for report & tests.
2013-02-21 12:01:23 +02:00
Anssi Kääriäinen
50677b29af
Made a couple of selenium tests wait for page loaded
...
The admin_widgets tests were issuing click() to the browser but
didn't wait for the effects of those clicks. This caused the resulting
request to be processed concurrently with the test case. When using
in-memory SQLite this caused weird failures.
Also added wait_page_loaded() to admin selenium tests for code
reuse.
Fixed #19856
2013-02-20 23:56:57 +02:00
Anssi Kääriäinen
10f9ba046f
Cleaned up join promotion in query.combine() with OR
...
Refs #19849
2013-02-20 21:45:36 +02:00
Anssi Kääriäinen
edf93127bf
Removed join() promote kwarg
...
The join promote=True was over-aggressive in select_related handling.
After that was removed, the only other user was query.combine(). That
use case is very easy to handle locally, so there is no more need for
the join(promote=True) flag.
Refs #19849 .
2013-02-20 21:43:44 +02:00
Anssi Kääriäinen
3fef304ff2
Refactored negated IS NULL handling
...
This one cleaned up add_filter() negated filter generation. As a side
effect split_exclude() was cleaned up, too.
Refs #19849
2013-02-20 21:34:01 +02:00
Alex Gaynor
b55cde054e
Added a db_constraint option to ForeignKeys.
...
This controls whether or not a database level cosntraint is created. This is useful in a few specialized circumstances, but in general should not be used!
2013-02-20 11:27:32 -08:00
Claude Paroz
cb5545ea2d
Fixed #19598 -- Fixed jQuery tagName retrieving
...
Thanks rj at rudiculous.net for the report.
2013-02-20 14:16:00 +01:00
Claude Paroz
4246fe6006
Replaced the obsolete toggle event handling JS function
...
The toggle(func1, func2) event handling function has been removed
in jQuery 1.9.
2013-02-20 13:54:59 +01:00
Claude Paroz
8bbca211b6
Fixed #14571 -- Updated embedded jQuery from 1.4.2 to 1.9.1
...
Thanks dArignac for the initial patch.
2013-02-20 13:52:15 +01:00
Alex Gaynor
fd3a066ae3
This function is unused and should have been removed a few releases ago.
2013-02-19 18:05:02 -08:00
Aymeric Augustin
35c991aa06
Added a default limit to the maximum number of forms in a formset.
...
This is a security fix. Disclosure and advisory coming shortly.
2013-02-19 11:23:30 -07:00
Carl Meyer
1f39eafd60
Checked object permissions on admin history view.
...
This is a security fix. Disclosure and advisory coming shortly.
Patch by Russell Keith-Magee.
2013-02-19 11:23:30 -07:00
Carl Meyer
c6d69c12ea
Restrict the XML deserializer to prevent network and entity-expansion DoS attacks.
...
This is a security fix. Disclosure and advisory coming shortly.
2013-02-19 11:23:30 -07:00
Carl Meyer
d51fb74360
Added a new required ALLOWED_HOSTS setting for HTTP host header validation.
...
This is a security fix; disclosure and advisory coming shortly.
2013-02-19 11:23:29 -07:00
Aymeric Augustin
ebabd77291
Ensured a connection is established when checking the database version.
...
Fixed a test broken by 21765c0a
. Refs #18135 .
2013-02-19 10:51:24 +01:00
Aymeric Augustin
9a3988ca5a
Implemented Oracle version as a cached property.
2013-02-19 10:50:22 +01:00