Commit Graph

2718 Commits

Author SHA1 Message Date
Malcolm Tredinnick a5e960db48 Fixed #5933 -- Updated Polish translation from Jarek Zgoda.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6676 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-15 09:17:53 +00:00
Malcolm Tredinnick b58c55fc80 Fixed #5944 -- Added safe string markings to admin error messages in one place
that was missed.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6675 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-14 22:58:24 +00:00
Malcolm Tredinnick bdb0b903c2 Content coming via {{ block.super }} is always going to be correctly escaped
already. We mark it as safe so that template authors don't need to.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6673 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-14 21:07:27 +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 babfe78494 Fixed #4787, #5913 -- Updating the queryset on a `ModelChoiceField` or `ModelMultipleChoiceField` now updates its widget's choices. The clean methods for `ModelChoiceField` and `ModelMultipleChoiceField` were changed to only allow choices in the specified queryset (instead of allowing all choices returned by the queryset model's default manager).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6670 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-13 14:36:29 +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
Gary Wilson Jr a4907be38e Fixed #5918 -- Removed `SortedDictFromList` since `SortedDict` now can do everything `SortedDictFromList` could do. Since `SortedDict`'s `copy` method doesn't return a deepcopy as `SortedDictFromList`'s `copy` method did, you will need to update your code if you were relying on `SortedDictFromList.copy` to return a deepcopy by using the `deepcopy` function from the `copy` module.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6668 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-11 04:44:20 +00:00
Malcolm Tredinnick 33206720f0 Fixed #5876 -- Updated Catalan translation from Marc Garcia.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6666 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-11 04:40:06 +00:00
Malcolm Tredinnick eec71cfc6d Fixed #5914 -- Updated Hebrew translation from Meir Kriheli.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6665 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-11 04:39:35 +00:00
Malcolm Tredinnick da23c7bcfe Fixed #5900 -- Updated traditional Chinese translation. Thanks, terryh.tp@gmail.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6664 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-11 04:38:53 +00:00
Malcolm Tredinnick 5a8af0738f Fixed #5687 -- Updated Swedish translation. A bit of a group effort from Dmitri
Fedortchenko, Ludvig Ericson and the django-se team.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6663 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-11 04:38:19 +00:00
Malcolm Tredinnick 3ee3d6b5f3 Fixed #5898 -- Changed a few response processing paths to make things harder to get wrong and easier to get right. Previous behaviour wasn't buggy, but it was harder to use than necessary.
We now have automatic HEAD processing always (previously required ConditionalGetMiddleware), middleware benefits from the Location header rewrite, so they can use relative URLs as well, and responses with response codes 1xx, 204 or 304 will always have their content removed, in accordance with the HTTP spec (so it's much harder to indavertently deliver invalid responses).

Based on a patch and diagnosis from regexbot@gmail.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6662 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-11 03:55:44 +00:00
Malcolm Tredinnick 30848dfe34 When using assertRedirect(), allow the caller to specify relative URLs and
automatically fill in the hostname and scheme (host can be passed in, if
different from the default).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6661 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-11 03:54:21 +00:00
Luke Plant 8c9b65429a Fixed bug in /admin/doc/views/ caused by [6658]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-09 15:27:49 +00:00
Luke Plant 8eeb9feab0 Fixed #4376 -- login_required now works with bound methods. Thanks, Steven Bethard.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6658 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-07 22:45:07 +00:00
Malcolm Tredinnick ea100b607a Added the small changes necessary to make creating custom model fields easier.
Also includes some tests for this.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6651 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-05 13:59:42 +00:00
Malcolm Tredinnick 595e75e8dd Fixed #5729 -- For MySQL (only), always delay the creation of foreign key
references, for all tables, until after the table has been created. This means
that when using the InnoDB storage engine, true foreign key constraints are
created (inline "REFERENCES" are ignored by InnoDB, unfortunately).

Fully backwards compatible.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6650 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-04 05:05:24 +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
Gary Wilson Jr 72b7a33929 `floatformat` template filter docstring changes:
* Split example cases.
 * Corrected use with negative arguments (quotes are needed).
 * Added another example of a number that has decimal places that include a non-zero digit and that ends with zeros.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6646 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-04 02:27:17 +00:00
Gary Wilson Jr 99697d9bec Added examples to the `pluralize` template filter's docstring.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6643 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-04 02:08:04 +00:00
Malcolm Tredinnick 2184248c05 For readability, use _() as an alias to mark translatable strings.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6642 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-04 02:08:02 +00:00
Gary Wilson Jr 4e8864a882 Style and import fixes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6641 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-04 02:05:56 +00:00
Gary Wilson Jr 0e59bf42cf Fixed #5869 -- Corrected documentation for `now` template tag's "r" format character. Thanks, xavier.morel@masklinn.net.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6640 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-04 01:14:58 +00:00
Gary Wilson Jr 2a48fc5007 Made use of `itertools.cycle` for the `cycle` template tag.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6636 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-03 02:04:59 +00:00
Gary Wilson Jr 5997cb8ad4 Removed unused variable.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6635 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-31 04:04:07 +00:00
Gary Wilson Jr 8c442f21dc Fixed #5816 -- Fixed a regression from [6333] that generates incorrect cookie "expires" dates when using a locale other than English. Introduced `http_date` and `cookie_date` utility functions. Thanks for the report Michael Lemaire. Thanks for the patch Karen Tracey and `SmileyChris`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6634 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-31 03:59:40 +00:00
Gary Wilson Jr a7a6a1b75d Fixed imports, indention, and a long line.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6628 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-29 23:55:08 +00:00
Gary Wilson Jr 48ce8456cb Style fixes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6627 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-29 23:52:17 +00:00
Gary Wilson Jr d453eda388 Corrected a typo and made some style fixes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6626 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-28 22:32:25 +00:00
Gary Wilson Jr 26ea06b0ab Fixed #3457 -- Allow overridding of error messages for newforms Fields.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-28 05:40:26 +00:00
Gary Wilson Jr 6e44f4dee8 Removed duplicate decimal import.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6623 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-28 03:38:08 +00:00
Gary Wilson Jr 1a3bca2b84 Wrapped some long lines and orginized imports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6622 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-27 16:09:52 +00:00
Gary Wilson Jr 62c574e765 Fixed #5824 -- For the `startapp` command, pass the true project name to the `copy_helper` function instead of the name of the project's parent directory.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6621 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-27 16:05:59 +00:00
Gary Wilson Jr 2dfad61fcc Added to docstring of `setup_environ` about what the function returns.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6620 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-27 16:03:24 +00:00
Malcolm Tredinnick 212aa32e2a Fixed #5798 -- Added a missing translation marker. Thanks, maru.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6617 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-27 04:34:50 +00:00
Malcolm Tredinnick 471616aae9 Fixed #5799 -- Apparently it's not enough to have all the right letters in a
word; the Spanish people also want them in the right order. So fixed a typo in
the Spanish translation. Thanks, maru.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6616 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-27 04:26:44 +00:00
Jacob Kaplan-Moss 842a771e05 i18n security fix. Details will be posted shortly to the Django mailing lists and the official weblog.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6608 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-26 19:52:42 +00:00
Adrian Holovaty c599de2ac6 Added a BaseDatabaseOperations.last_executed_query() hook, which allows a database backend to specify how to get the last-executed query on a given cursor. Implemented it for the psycopg2 backend. This means that for psycopg2, the SQL statements in django.db.connection.queries will now reflect the exact SQL as sent to the server, instead of a naive and misleading string-interpolated version
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6601 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-23 19:00:31 +00:00
Malcolm Tredinnick 17301f2fa0 Removed a bunch of DOS line endings. Somehow I didn't convert this correctly in
[6580].


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6598 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-23 13:12:04 +00:00
Malcolm Tredinnick 003b3c1a17 Fixed #5794 -- Be more robust when rendering a DateTimeInput widget. Thanks,
MikeH.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6594 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-22 13:13:12 +00:00
Malcolm Tredinnick dbd1cb9083 Fixed #5183 -- Added __deepcopy__, pop() and popitem() to SortedDict. Based on
a patch from David Blewett.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6593 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-22 00:52:54 +00:00
Malcolm Tredinnick 375a6d78cb Fixed #3496 -- Handle the case of missing (and hence '0') Content-Length header
in a POST to the wsgi handler. Based on a patch from Mikko Ohtamaa.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6592 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 23:52:08 +00:00
Malcolm Tredinnick 0ffeb3a42f Fixed "django-admin.py --version" so that it doesn't print the version string
twice.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6591 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 22:06:52 +00:00
Malcolm Tredinnick 8e87587e89 Fixed #3265 -- Made it a validation error to have field names with trailing
underscores. Allowing these would enable peopleto write ambiguous queryset
filters (plus makes parsing filters much harder).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 21:53:18 +00:00
Malcolm Tredinnick ef454b8a14 Fixed a bug in the db cache backend introduced in [6572].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6589 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 19:19:32 +00:00
Malcolm Tredinnick bab4fdc9fd Fixed #5560 -- Improved the way we create __str__ and __unicode__ methods in
lazy() objects. This fixes things for Jython and makes the code more readable,
even for CPython. Thanks, Leo Soto.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6587 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 18:35:31 +00:00
Malcolm Tredinnick 2adcb3f250 Fixed #5664 -- Added a Jython workaround for some assumptions in the signal
dispatch code. Thanks, Leo Soto.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6586 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 18:26:24 +00:00
Malcolm Tredinnick fcbde3cbe5 Fixed #5712 -- Added more robustness to source code display in the debug view. Our behaviour is a bit more PEP 263 compliant now, too. Thanks, Thomas Güttler.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6585 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 18:15:01 +00:00
Malcolm Tredinnick a1496b054a Fixed #5732 -- Catch all possible errors when importing a URLConf file. This
leads to error messages that contain the name of the problem file (useful when
the problem is part of an include() import).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6584 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 17:51:06 +00:00
Malcolm Tredinnick 3ec6568e64 Modified the test harness to respect the LANGUAGE_CODE setting. Also changed
Django's own test runner to always use 'en' for LANGUAGE_CODE when testing
core. Fixed #4709


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6583 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21 17:26:32 +00:00