Commit Graph

260 Commits

Author SHA1 Message Date
Malcolm Tredinnick 72544950e1 Fixed #7163 -- Fixed a translation-sharing problem so that you can have en-gb
and en-us at the app-level, even though Django only has an "en" translation
(for example). Analysis and patch from ognjen.maric@gmail.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7857 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-07 01:57:05 +00:00
Malcolm Tredinnick 5deb4fcbb9 Revert [7849] and [7850]. Brain failure on my part.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7851 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-06 14:20:30 +00:00
Malcolm Tredinnick c2f753a8ba Started to work on the regex reverse-engineering phase.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-06 14:17:07 +00:00
Malcolm Tredinnick 6dd2b5468f Redo the changes in [7773] in a better way.
This removes some of the leaky abstraction problems (lifting WhereNode
internals into the Query class) from that commit and makes it possible for
extensions to WhereNode to have access to the field instances. It's also
backwards-compatible with pre-[7773] code, which is also better.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7835 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-04 06:42:58 +00:00
Jacob Kaplan-Moss d725cc9734 Fixed #2070: refactored Django's file upload capabilities.
A description of the new features can be found in the new [http://www.djangoproject.com/documentation/upload_handing/ upload handling documentation]; the executive summary is that Django will now happily handle uploads of large files without issues.

This changes the representation of uploaded files from dictionaries to bona fide objects; see BackwardsIncompatibleChanges for details.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-01 15:10:51 +00:00
Malcolm Tredinnick ca5918e8ff Fixed #6994 -- For fastcgi, set a more sensible default umask.
Also allow the umask value to be customised. Thanks, Antonis Christofides.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7800 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30 11:22:41 +00:00
Adrian Holovaty b7fea94096 Fixed #7542 -- Fixed bug in urlize where it was appending 'http://' to the link text. Thanks for the patch and tests, devin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7755 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 05:07:13 +00:00
Malcolm Tredinnick 915001ad0b Fixed #7109 -- Quote certain values before passing them for substitution in
Field.db_type().

This fixes a problem with using reserved words for field names in Oracle. Only
affects Oracle at the moment, but the same changes could easily be used by
other backends if they are required (requires changing creation.py, only).

This commit also reverts [7501] so that if the fix doesn't work, it will show
up in the tests (and if it does work, the tests will prevent us from breaking
it again).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7743 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 03:11:32 +00:00
Russell Keith-Magee 5da67a084a Fixed #7355 -- Modified urlize utility to handle https:// addresses. Thanks for the report and patch, clint.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-19 12:05:39 +00:00
Adrian Holovaty 02bbd9a9b2 Fixed #7228 -- Fixed our ETag header creation to meet the HTTP spec, by quoting it. Thanks, skjohn@us.ibm.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-16 04:13:04 +00:00
Russell Keith-Magee 0586239660 Refs #7297 -- Corrected some doctest strings internal to the utils.text module. Thanks, akaihola.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7581 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-06 14:09:20 +00:00
Malcolm Tredinnick 9c52d56f6f Merged the queryset-refactor branch into trunk.
This is a big internal change, but mostly backwards compatible with existing
code. Also adds a couple of new features.

Fixed #245, #1050, #1656, #1801, #2076, #2091, #2150, #2253, #2306, #2400, #2430, #2482, #2496, #2676, #2737, #2874, #2902, #2939, #3037, #3141, #3288, #3440, #3592, #3739, #4088, #4260, #4289, #4306, #4358, #4464, #4510, #4858, #5012, #5020, #5261, #5295, #5321, #5324, #5325, #5555, #5707, #5796, #5817, #5987, #6018, #6074, #6088, #6154, #6177, #6180, #6203, #6658


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7477 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-27 02:50:16 +00:00
Jacob Kaplan-Moss a752a3d419 Fixed #6687: added outlog/errlog options to runfcgi. Thanks, tamas.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7297 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-18 15:53:46 +00:00
Malcolm Tredinnick 4b9497c3f1 Fixed #6175 -- Use os._exit() instead of sys.exit() in child processes. Based
on a patch from Tyson Clugg.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7290 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-18 14:08:56 +00:00
Gary Wilson Jr d0032458a2 Fixed #6679 -- In `decorator_from_middleware`, don't unpack arguments when calling a middleware's
`process_view` method, thanks Gulopine.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7269 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-17 17:47:34 +00:00
Gary Wilson Jr dcdd9b3c63 Removed unused import, corrected a typo, and made some styling fixes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-08 03:55:47 +00:00
Malcolm Tredinnick efed04b634 Fixed #5603 -- Allow customization of the language cookie name. Thanks, moe.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-29 18:38:44 +00:00
Malcolm Tredinnick 2dbb08e5dc Fixed #5846 -- Bullet-proofed the default timezone encoding test.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7184 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-29 17:13:20 +00:00
Gary Wilson Jr 5ca0b9203b Fixed #5701 -- Fixed decorators to take the name, attributes, and docstring of the function they decorate by adding a modified version of the `functools.wraps` function from Python 2.5. `wraps` has been altered to work with Django's `curry` function and with Python 2.3, which doesn't allow assignment of a function's `__name__` attribute. This fixes severaly annoyances, such as the online documentation for template filters served by the admin app. This change is backwards incompatible if, for some reason, you were relying on the name of a Django decorator instead of the function it decorates.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-25 06:02:35 +00:00
Malcolm Tredinnick 54546f23f0 Fixed #6627 -- Made dict.clear() work for SortedDicts.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7140 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-21 21:27:44 +00:00
Malcolm Tredinnick e7b2ad8020 Fixed #6611 -- When copying a SortedDict, make a new copy of the keys list.
Thanks, Jeremy Dunck.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7129 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-18 23:08:51 +00:00
Adrian Holovaty 8b3f36029f Made a bunch of small doc rewordings from changes over the past couple of weeks
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7122 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-16 05:15:09 +00:00
Malcolm Tredinnick 0a3c8f03e0 Fixed #6409 -- Unbreak compound locale name parsing (e.g. zh-cn).
This was inadvertently broken back in [6608]. Slightly backwards-incompatible:
people specifying "es_AR" in their LANGUAGES list will need to change that to
"es-ar". Thanks, simonb and Ramiro Morales for making the effort to fix this.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-06 01:04:30 +00:00
Malcolm Tredinnick 0c4ea9b922 Fixed #6279, #6514 -- Fixed some HTML escaping problems in the urlize filter.
Based on a patch from SmileyChris with some test additions from Rob Hudson.
Thanks, both.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7079 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-03 08:54:26 +00:00
Malcolm Tredinnick 8926a10fea Fixed #6303 -- Handle missing language specification in feed generation. Thanks, david.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7066 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-03 03:23:10 +00:00
Malcolm Tredinnick 8b29767f3f Fixed #6301 -- Added '*' to the characters not converted by iri_to_uri(), as
pointed out by samidh.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7064 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-03 02:21:51 +00:00
Malcolm Tredinnick 2542b94fb2 Fixed #6465 -- Tweaked MergeDict.getlist() to work with Django's MultiValueDict class. Thanks, Matt McClanahan.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7062 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-03 02:02:41 +00:00
Gary Wilson Jr a944613b3a Minor style fixes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6911 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-11 05:49:11 +00:00
Adrian Holovaty 72a5c03dee Removed comma splices in max_length DeprecationWarning and elsewhere in the module
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6872 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-04 05:56:30 +00:00
Malcolm Tredinnick bd400a368d Fixed #5657 -- Use string.ascii_letters instead of ascii.letters in the urlize
filter to ensure consistent (and correct) results no matter what the server's
locale setting might be. Thanks, Andrew Stoneman.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6856 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-03 00:41:42 +00:00
Malcolm Tredinnick 2e62b84acc Fixed #6071 -- Fixed another infinite recursion problem in SafeString and
SafeUnicode. Thanks, Trey Long.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6845 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 20:17:10 +00:00
Gary Wilson Jr 1921554b2b Changed use of `maxlength` to issue a `DeprecationWarning` instead of `PendingDeprecationWarning`, refs #2101.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6825 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02 01:47:42 +00:00
Malcolm Tredinnick b2dbbd5bbc Fixed #6021 -- Removed some brain damage from SafeString. Not quite sure what I
was smoking there. Thanks, Jan Rademaker.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6807 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-01 20:08:45 +00:00
Adrian Holovaty c5a4541f10 Edited docstring changes from [6714]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6800 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-01 19:22:05 +00:00
Malcolm Tredinnick caa0523cb8 Fixed #6050 -- Handled edge-case of duplicate keys being passed when
initialising SortedDict. Patch from Collin Grady and SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6751 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 20:09:54 +00:00
Malcolm Tredinnick f3c15225fc Fixed #6023 -- Fixed daylight savings determination for years beyond 2038 on
32-bit systems (modulo the fact that the system timezone libraries might not be
accurate that far out; at least we don't crash now). Thanks, SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6749 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 19:39:46 +00:00
Malcolm Tredinnick f2f6e70b08 Fixed #5813 -- Taught the CacheMiddleware to respect any max-age HTTP header
when setting the expiry time. Thanks, SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6736 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 16:57:18 +00:00
Gary Wilson Jr c7181ec0ff Made `MultiValueDict`'s `get` and `getlist` method docstrings more descriptive.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-25 18:14:18 +00:00
Gary Wilson Jr 891cc5df92 Minor styling fix in `DotExpandedDict.__init__`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6713 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-25 18:11:44 +00:00
Gary Wilson Jr 303d22b0d2 Changed several hardcoding of `dict` method calls in `django.utils.datastructures.py` to use `super` instead.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6712 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-25 18:10:45 +00:00
Gary Wilson Jr 8df3d2b467 In `MergeDict` class, changed variable names to not clash with `dict` builtin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6711 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-25 18:07:57 +00:00
Gary Wilson Jr 1607acee40 Fixed #5978 -- Gave `LOCALE_PATHS` a default setting of an empty tuple and removed some code that was checking for its existance in settings before accessing it.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-19 05:59:58 +00:00
Gary Wilson Jr 66576c285a Some minor changes to the `patch_vary_headers` function:
* Replaced a for loop with a list comprehension.
 * Used a set instead of a dict with dummy values.
 * Used a bit more readable variable names.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6698 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-19 04:00:41 +00:00
Gary Wilson Jr 34cc21983c Removed `vary_delim_re` in `django/utils/cache.py` in favor of existing `cc_delim_re` since the latter is more correct in parsing the header (allows whitespace before and after comma separators instead of just after). As a bonus, tests added for `patch_vary_headers()`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6696 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-19 03:12:19 +00:00
Malcolm Tredinnick ce73298e26 Fixed #5960 -- Fixed some Python 2.3 incompatibilities.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6685 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-17 12:58:06 +00:00
Malcolm Tredinnick 4585b4d6c2 Fixed some missed auto-escaping and URL quoting cases in the urlize filter.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6683 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-17 12:12:40 +00:00
Malcolm Tredinnick 64c0bf8677 Translating safe strings should return a safe result.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-17 12:11:54 +00:00
Malcolm Tredinnick 356662cf74 Implemented auto-escaping of variable output in templates. Fully controllable by template authors and it's possible to write filters and templates that simulataneously work in both auto-escaped and non-auto-escaped environments if you need to. Fixed #2359
See documentation in templates.txt and templates_python.txt for how everything
works.

Backwards incompatible if you're inserting raw HTML output via template variables.

Based on an original design from Simon Willison and with debugging help from Michael Radziej.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6671 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-14 12:58:53 +00:00
Gary Wilson Jr 5e8be6978e Simplified `SortedDict.__deepcopy__` now that the its constructor can take a sequence of tuples.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6669 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-12 03:12:47 +00:00
Malcolm Tredinnick 3f1ce2e602 Fixed #5640 -- Added some extra error reporting when smart_unicode() or
force_unicode() raise a UnicodeDecodeError. This should at least help people
identify which is the bad piece of data they passed in. About the best we can
do here.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6649 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-04 03:37:04 +00:00