Commit Graph

998 Commits

Author SHA1 Message Date
Jacob Kaplan-Moss 3d577febc7 Fixed #7524: allow errors raised during import of a urlconf to bubble up.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8664 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28 16:14:13 +00:00
Jacob Kaplan-Moss ff420b4364 Fixed #8454: added a FILE_UPLOAD_PERMISSIONS setting to control the permissoin of files uploaded by the built-in file storage system. Thanks, dcwatson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8640 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 22:21:14 +00:00
Jacob Kaplan-Moss f58217cc02 Fixed #8455: a lack of permissions in `MEDIA_ROOT` no longer causes an infinite loop when saving files. Thanks, carljm.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8639 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 21:44:14 +00:00
Jacob Kaplan-Moss c33aeaa082 FIxed #8156: `UploadedFile.__repr__` now returns a string, a good `__repr__` should.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8636 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 20:53:02 +00:00
Jacob Kaplan-Moss 615ed20006 Fixed #7769: Added a couple missing file methods to `TemporaryUploadedFile`. Thanks, Mads Sülau Jørgensen.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8634 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 20:29:45 +00:00
Gary Wilson Jr c2ba59fc1d Removed oldforms, validators, and related code:
* Removed `Manipulator`, `AutomaticManipulator`, and related classes.
 * Removed oldforms specific bits from model fields:
   * Removed `validator_list` and `core` arguments from constructors.
   * Removed the methods:
     * `get_manipulator_field_names`
     * `get_manipulator_field_objs`
     * `get_manipulator_fields`
     * `get_manipulator_new_data`
     * `prepare_field_objs_and_params`
     * `get_follow`
   * Renamed `flatten_data` method to `value_to_string` for better alignment with its use by the serialization framework, which was the only remaining code using `flatten_data`.
 * Removed oldforms methods from `django.db.models.Options` class: `get_followed_related_objects`, `get_data_holders`, `get_follow`, and `has_field_type`.
 * Removed oldforms-admin specific options from `django.db.models.fields.related` classes: `num_in_admin`, `min_num_in_admin`, `max_num_in_admin`, `num_extra_on_change`, and `edit_inline`.
 * Serialization framework
   * `Serializer.get_string_value` now calls the model fields' renamed `value_to_string` methods.
   * Removed a special-casing of `models.DateTimeField` in `core.serializers.base.Serializer.get_string_value` that's handled by `django.db.models.fields.DateTimeField.value_to_string`.
 * Removed `django.core.validators`:
   * Moved `ValidationError` exception to `django.core.exceptions`.
   * For the couple places that were using validators, brought over the necessary code to maintain the same functionality.
 * Introduced a SlugField form field for validation and to compliment the SlugField model field (refs #8040).
 * Removed an oldforms-style model creation hack (refs #2160).

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8616 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 07:19:44 +00:00
Malcolm Tredinnick fcf059d539 Fixed #7084 -- Fixed the "makemessages" command to handle line endings
correctly on Windows (previous behaviour was to explode when encountering a
multi-line messages). Patch and testing from Ramiro Morales.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8576 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 07:43:59 +00:00
Malcolm Tredinnick 948a833eb7 Fixed #8490 -- Worked around a bug in flup 1.0.1 when working out the correct
path_info setting in the WSGI handler. Thanks, Mike Richardson.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 02:42:39 +00:00
Jacob Kaplan-Moss 7e06b69a3d Removed outdated "adminindex" command -- the same behavior is now far easier and better done in a template, or perhaps a custom `AdminSite.index` function. Refs #5500.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 18:53:18 +00:00
Malcolm Tredinnick 05e8c3ecd3 Fixed #8491 -- Allow settings.LOCALE_PATH to be any sequence, not just a tuple.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8527 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 03:26:37 +00:00
Malcolm Tredinnick 77bf14d581 Fixed #8259 -- Handle an error situation that we should never see, but still
occurs for some reason (be liberal in what you accept, and all that). Patch
from kevin.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8495 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 18:08:28 +00:00
Malcolm Tredinnick a9f0ae706a Fixed #8203 -- Fixed temporary file deleation on Windows and a couple of edge
cases on Unix-like systems. Patch from snaury. Testing and verification on
Windows, Mac and Linux from cgrady and ramikassab.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8493 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 17:56:02 +00:00
Malcolm Tredinnick 943c28a4c6 Fixed #7042 -- The management validation command nows alerts users to the
presence (and incorrectness) of unique=True on ManyToManyFields. This has never
worked and generates invalid SQL. Now it's raised as an explicit error during
validation. Thanks to clamothe for the patch.

Still needs a docs change to make this clear, but that goes to the docs
refactor branch.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8488 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 16:56:41 +00:00
Russell Keith-Magee 0f869f905e Fixed #7747: Altered EmailMessage such that messages with long subject lines don't use tabs in their continutation sequence. Tabs in subjects cause problems with Outlook and Thunderbird. Thanks to Mark Allison <mark.allison@maplecroft.com> for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8483 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 13:31:28 +00:00
Russell Keith-Magee e054295fed Fixed #8136: Added a signal emission when an error is raised handling an error. This was required for the test client to handle missing 404.html templates and errors in the 404.html template. Thanks to danfairs for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8464 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-22 13:59:41 +00:00
Malcolm Tredinnick e7769c36e9 Fixed #8410 -- Added a missing piece of value encoding for the memcached
backend. Patch from trbs.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8444 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-19 20:35:56 +00:00
Russell Keith-Magee f748fa2762 Fixed #7908: Added validation checks on attempts to create ForeignKey and M2M relations with abstract classes. Thanks to Rock Howard for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8442 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-19 14:17:24 +00:00
Malcolm Tredinnick c92b424e57 Fixed #8239 -- Google App Engine has a restricted "imp" module, which doesn't
include one of the methods we use when constructing management help commands.
So postpone the resolving of the method name until when we actually need it
(which isn't run as part of GAE). Patch from Guido van Rossum.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8425 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-17 17:35:33 +00:00
Malcolm Tredinnick 2d2396a384 Fixed #5133 -- Explicitly close memcached connections after each request
(similar to database connection management). We can't effectively manage the
lifecycle by pooling connections and recent versions of python-memcache can
lead to connection exhaustion in some quite reasonable setups.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8418 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-16 23:35:58 +00:00
Russell Keith-Magee 77c949289e Fixed #7285: Improved inspectdb handling of dashes in table and field names. Thanks to redalastor@gmail.com for the report and Justin Bronn for the first part of a fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8404 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-16 05:03:40 +00:00
Russell Keith-Magee eab705f623 Fixed #6935: Modified inspectdb to provide better handling for table names with spaces. Thanks to adamv for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8403 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-16 04:51:21 +00:00
Russell Keith-Magee 0345fec71b Fixes #7845: Removed a piece of stale code that was causing ./manage.py reset to fail with apps that don't have any models. Thanks to miracle2k for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8401 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-16 04:11:38 +00:00
Russell Keith-Magee 0c115f12d7 Fixed #7676 -- Modified serializer registration to be thread safe. Thanks to mrts for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8370 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 11:53:49 +00:00
Russell Keith-Magee 4edbb8b2ca Refs #8138 -- Added a stealth option to the loaddata command so that the use of transactions in loaddata can be disabled. This behavior isn't enabled as a commad line option because it doesn't make much sense, but it can be used when invoking loaddata from another script.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8336 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-13 14:36:40 +00:00
Russell Keith-Magee 05ef002048 Fixed #8246 -- Corrected the handling of settings files. Thanks to AdamG and chrj for their parallel reports and fixes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8323 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12 13:39:46 +00:00
Russell Keith-Magee 63ea57642d Fixed #8134 -- Corrected serialization of m2m fields with intermediate models. Thanks to Rock Howard for the report, and kire for the test case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8321 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12 12:58:33 +00:00
Jacob Kaplan-Moss 58cd4902a7 Fixed #4948, a race condition in file saving. Thanks to Martin von Löwis, who diagnosed the problem and pointed the way to a fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8306 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 16:51:18 +00:00
Russell Keith-Magee 9dc4ba875f Fixed #5461 -- Refactored the database backend code to use classes for the creation and introspection modules. Introduces a new validation module for DB-specific validation. This is a backwards incompatible change; see the wiki for details.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 12:11:25 +00:00
Gary Wilson Jr ef48a3e69c Fixed #7830 -- Removed all of the remaining, deprecated, non-oldforms features:
* Support for representing files as strings was removed. Use `django.core.files.base.ContentFile` instead.
 * Support for representing uploaded files as dictionaries was removed. Use `django.core.files.uploadedfile.SimpleUploadedFile` instead.
 * The `filename`, `file_name`, `file_size`, and `chuck` properties of `UploadedFile` were removed. Use the `name`, `name`, `size`, and `chunks` properties instead, respectively.
 * The `get_FIELD_filename`, `get_FIELD_url`, `get_FIELD_size`, and `save_FIELD_file` methods for Models with `FileField` fields were removed. Instead, use the `path`, `url`, and `size` attributes and `save` method on the field itself, respectively.
 * The `get_FIELD_width` and `get_FIELD_height` methods for Models with `ImageField` fields were removed. Use the `width` and `height` attributes on the field itself instead.
 * The dispatcher `connect`, `disconnect`, `send`, and `sendExact` functions were removed. Use the signal object's own `connect`, `disconnect`, `send`, and `send` methods instead, respectively.
 * The `form_for_model` and `form_for_instance` functions were removed. Use a `ModelForm` subclass instead.
 * Support for importing `django.newforms` was removed. Use `django.forms` instead.
 * Support for importing `django.utils.images` was removed. Use `django.core.files.images` instead.
 * Support for the `follow` argument in the `create_object` and `update_object` generic views was removed. Use the `django.forms` package and the new `form_class` argument instead.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8291 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-10 21:10:47 +00:00
Russell Keith-Magee ec7d8b7c61 Fixed #5943 -- Modified django-admin to behave like manage.py if settings are provided, either as --settings or DJANGO_SETTINGS_MODULE. Thanks to Joseph Kocherhans and Todd O'Bryan for their work on this ticket.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8282 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-10 08:42:49 +00:00
Malcolm Tredinnick f6670e1341 Added a return value to the add() method for caches. It's now possible to tell
if a call to add() ended up storing something in the cache.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8278 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-10 03:52:21 +00:00
Luke Plant 50e6928c5b Made NoReverseMatch exceptions more helpful. Thanks, mrts
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8272 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-09 18:06:51 +00:00
Jacob Kaplan-Moss 69d8ff31ac No, really: PermWrapper is not iterable. Fixes #8182.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8263 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-09 15:38:44 +00:00
Jacob Kaplan-Moss be5350f2d5 Fixed a couple imports in django.core.files.storage. Fixes #8188.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8262 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-09 15:16:47 +00:00
Jacob Kaplan-Moss 6f6024751c Don't import PIL until needed so that systems without PIL don't barf.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8249 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 21:57:25 +00:00
Jacob Kaplan-Moss 7899568e01 File storage refactoring, adding far more flexibility to Django's file handling. The new files.txt document has details of the new features.
This is a backwards-incompatible change; consult BackwardsIncompatibleChanges for details.

Fixes #3567, #3621, #4345, #5361, #5655, #7415.

Many thanks to Marty Alchin who did the vast majority of this work.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8244 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 20:59:02 +00:00
Jacob Kaplan-Moss 5fb9599086 Fixed #8100: Jython, apparently, is now a TTY.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8239 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 18:51:34 +00:00
Malcolm Tredinnick 3735f27660 Fixed #5463 -- Allow alternate file extensions on files that are translated.
Patch from Jannis Leidel.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8234 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 16:41:55 +00:00
Russell Keith-Magee 9dfad99257 Fixed #8120, #7997 -- Cleaned up the help messages displayed by django-admin so that the lax options aren't repeated, and the lax options are displayed when no subcommand is provided. Thanks to Scott Moonen <smoonen@andstuff.org> and trevor for the respective reports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8228 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 13:40:11 +00:00
Russell Keith-Magee 196b282775 Fixed #5825 -- Modified the custom command loader to allow for explicit specification of the project name, even if the project directory isn't in the python path. This brings custom command loading into alignment with application loading. Thanks to jdetaeye@frepple.com for the original report, and to abozanich for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8227 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 12:27:40 +00:00
Jacob Kaplan-Moss 34a3bd5225 Major refactoring of django.dispatch with an eye towards speed. The net result is that signals are up to 90% faster.
Though some attempts and backwards-compatibility were made, speed trumped compatibility. Thus, as usual, check BackwardsIncompatibleChanges for the complete list of backwards-incompatible changes.

Thanks to Jeremy Dunck and Keith Busell for the bulk of the work; some ideas from Brian Herring's previous work (refs #4561) were incorporated.

Documentation is, sigh, still forthcoming.

Fixes #6814 and #3951 (with the new dispatch_uid argument to connect).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-06 15:32:46 +00:00
Jacob Kaplan-Moss 98d8acf33f Fixed #7683: Try not to delete uploaded files before moving them, and don't wig out of someone else does. Patch from screeley and spaetz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8217 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-05 17:43:05 +00:00
Gary Wilson Jr c85c8f8891 Fixed #7919 -- md5 and sha modules are deprecated since Python 2.5, use hashlib module when available. Patch from Karen Tracey.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-02 05:56:57 +00:00
Gary Wilson Jr 351a3ca154 Removed several deprecated features for 1.0 (refs #7830):
* "simple" cache backend
 * `ObjectPaginator`
 * `edit_inline_type` argument for `ForeignKey` fields
 * `QOperator`, `QNot`, `QAnd` and `QOr`
 * `maxlength` argument 


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8191 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-02 04:56:11 +00:00
Russell Keith-Magee 7a87f5aeab Fixed #8053 -- Corrected a bug with reset and m2m intermediate tables. Thanks to d00gs for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-31 07:53:55 +00:00
Russell Keith-Magee 56bbe0aa46 Fixed #7990 -- Modified serializers to use StringIO, rather than cStringIO, due to potential unicode issues.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8151 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-30 10:40:37 +00:00
Russell Keith-Magee 174641b9b3 Fixed #6095 -- Added the ability to specify the model to use to manage a ManyToManyField. Thanks to Eric Florenzano for his excellent work on this patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8136 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-29 12:41:08 +00:00
Malcolm Tredinnick 548ac72207 Fixed #7589 -- Added a way for post-table-creation SQL modifications to be done for custom fields (needed by geo-django, but useful in other situations, too).
Patch from Justin Bronn.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8133 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-29 05:53:44 +00:00
Gary Wilson Jr 96cf3656c4 Fixed #6997 -- Corrected `num_pages` calculation when one item is in the object list and `allow_empty_first_page=False`, thanks to framos for the report. Also, made Page's `start_index()` return 0 if there are no items in the object list (previously it was returning 1, but now it is consistent with `end_index()`). As an added bonus, I threw in quite a few pagination tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8129 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-28 05:30:35 +00:00
Gary Wilson Jr 9a5301ccbc Made the Paginator class a bit more backwards compatible with the lecacy `ObjectPaginator` class by using the `ObjectPaginator`'s `_get_count` method. Instead of explicitly checking for an instance of `QuerySet`, this now allows any object with a `count()` or `__len__()` method defined to be passed to Paginator. For one, this is useful when you have custom `QuerySet`-like classes that implement a `count()` method but don't inherit from `QuerySet` explicitly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8121 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 23:01:55 +00:00
Malcolm Tredinnick 103d484807 Fixed #7658 -- Added some Windows-specific tempfile handling. The standard
stuff doesn't work with the way Django's file uploading code wants to operate.
Patch from Mike Axiak.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8096 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26 22:48:51 +00:00
Malcolm Tredinnick 66612ef529 Fixed #6413 -- Fixed a deadlock situation in the locmem culling implementation.
Thanks, Joe Holloway.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8090 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26 05:27:59 +00:00
Malcolm Tredinnick 319a31464d Fixed #7966 -- Send email if it has "bcc" recipients and no "to" recipients.
Patch from Zal.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8086 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26 04:10:52 +00:00
Malcolm Tredinnick 6f16b5bad2 Fixed #7967 -- Make sure the __contains__ method in the cache backends call the
right has_key() method for the subclass. Patch from Marty Alchin.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8084 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26 03:58:31 +00:00
Malcolm Tredinnick f49c5c23f9 Fixed #7574 -- Fixed the handling of lazy translation in email headers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8083 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26 03:37:25 +00:00
Malcolm Tredinnick 453a5bcd97 Fix #7910 -- Added a missing import used when "django-admin.py compilemessages"
is run from a bad root directory.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8079 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26 03:01:33 +00:00
Malcolm Tredinnick 7c33cc7f5e Fixed #7398 -- Allow for custom cache-backends to be used.
Based on a patch from Lau Bech Lauritzen and Brenton Simpson.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8075 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-25 18:51:32 +00:00
Adrian Holovaty 29f0e8182f Fixed #7847 -- Removed a whole bunch of unused imports from throughout the codebase. Thanks, julien
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8046 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-22 03:24:09 +00:00
Malcolm Tredinnick c236874c48 Fixed #7871 -- Added some more bullet-proofing in PATH_INFO determination,
since Django would like it to at least contain a '/' (rather than being an
empty string).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8032 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-21 22:13:56 +00:00
Malcolm Tredinnick bfcecbffd3 Changed/fixed the way Django handles SCRIPT_NAME and PATH_INFO (or
equivalents). Basically, URL resolving will only use the PATH_INFO and the
SCRIPT_NAME will be prepended by reverse() automatically. Allows for more
portable development and installation. Also exposes SCRIPT_NAME in the
HttpRequest instance.

There are a number of cases where things don't work completely transparently,
so mod_python and fastcgi users should read the relevant docs.

Fixed #285, #1516, #3414.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-21 07:57:10 +00:00
Malcolm Tredinnick 189c704ae6 Revert [7991] - [7993]. I was committing from the wrong branch. Sorry 'bout
that, folks. :-(


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7995 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 19:37:55 +00:00
Malcolm Tredinnick 99bbaa0090 Allow avoidance of the Apache mod_rewrite undo.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7992 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 19:32:12 +00:00
Malcolm Tredinnick b653cdcfb2 First part of setting request.path correctly.
Still needs:
    - testing
    - docs changes
    - some way of fixing reverse().


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7991 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 19:32:01 +00:00
Malcolm Tredinnick 795b6a1271 Fixed #7471 -- If the 400 response handler raises an exception, pass control to
the 500 handler (if that then raises an exception, it's just not your day).

Patch from Leah Culver.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7988 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 18:49:49 +00:00
Brian Rosner a19ed8aea3 Merged the newforms-admin branch into trunk.
This is a backward incompatible change. The admin contrib app has been
refactored. The newforms module has several improvements including FormSets
and Media definitions.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 23:54:34 +00:00
Adrian Holovaty df2b19cc17 Fixed #1443 -- Django's various bits now support dates before 1900. Thanks to SmileyChris, Chris Green, Fredrik Lundh and others for patches and design help
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7946 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-18 03:47:27 +00:00
Malcolm Tredinnick 57bb10e6c4 Refactored the HTTP 500 error response creation slightly. Provides the ability
for subclassing that piece of the processing path.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7928 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-15 19:17:49 +00:00
Jacob Kaplan-Moss 476d5f2c0d Fixed #7675: corrected TemporaryUploadedFile.temporary_file_path. Thanks, Florian Apolloner.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7908 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-12 20:43:52 +00:00
Russell Keith-Magee b038abe1fe Fixed #7421 -- Corrected the condition used during syncdb to establish that a management module is or isn't available. This is to satisfy non-CPython implementations which can use different error messages. Thanks to Maciej Fijalkowski (fijal) for his help confirming the problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7891 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-11 15:08:09 +00:00
Russell Keith-Magee bbb384366f Fixed #7597 -- Added code to force the re-opening of the cursor connection, just in case a post-syncdb handler closes it. Thanks to keithb for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7889 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-11 14:06:59 +00:00
Russell Keith-Magee 8e0b6bdcd5 Fixed #6017 -- Modified the Lax parser to allow --settings and the other core management arguments to appear anywhere in the argument list. Thanks to Todd O'Bryan for the suggestion and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7888 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-11 13:18:19 +00:00
Adrian Holovaty a724fff300 Fixed #7307 -- Split InvalidPage exception into two subclasses, PageNotAnInteger and EmptyPage, for granular exception catching. Thanks for the idea, miracle2k
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7867 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-08 02:20:48 +00:00
Adrian Holovaty 4406d283e1 Fixed #7478 -- Rolled QuerySetPaginator into the Paginator class, to simplify things. QuerySetPaginator still exists as an alias, for backwards compatibility. Thanks for the suggestion, batiste@dosimple.ch
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7865 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-08 02:08:33 +00:00
Adrian Holovaty f19284b85a Fixed #7655 -- Added two assertions to mail.py to help people debug a common problem (sending strings instead of lists/tuples for 'to' or 'bcc'). Thanks, guettli
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7864 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-08 01:56:01 +00:00
Jacob Kaplan-Moss f804e7f038 Fixed deprecated UploadedFile.data attribute. Refs #7614.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-07 23:36:45 +00:00
Jacob Kaplan-Moss c83e9abb34 Added a missing deprecated property (UploadedFile.filename) from [7859]. Refs #7614.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7860 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-07 23:36:35 +00:00
Jacob Kaplan-Moss a28b75b0ba Fixed #7614: the quickening has come, and there now is only one UploadedFile. On top of that, UploadedFile's interface has been improved:
* The API now more closely matches a proper file API. This unfortunately means a few backwards-incompatible renamings; see BackwardsIncompatibleChanges. This refs #7593.
  * While we were at it, renamed chunk() to chunks() to clarify that it's an iterator.
  * Temporary uploaded files now property use the tempfile library behind the scenes which should ensure better cleanup of tempfiles (refs #7593 again).

Thanks to Mike Axiak for the bulk of this patch.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7859 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-07 23:16:00 +00:00
Malcolm Tredinnick 8975bba742 Fixed #4148 -- Changed the way attachments are served to IE to avoid some
caching and header-related bugs there. Only comes into play when Internet
Explorer is the user-agent.

Patch from Michael Axiak, with testing from Axis_of_Entropy and Karen Tracey.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7856 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-07 01:45:19 +00:00
Malcolm Tredinnick 25f2cfb7cb Fixed #7643 -- Fixed an oversight from [7844].
Now makemessages works in projects again. Based on a patch from Horst Gutmann.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7848 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-06 12:55:24 +00:00
Malcolm Tredinnick 3cfa3cbd07 Fixed #5522 -- Moved make-messages, compile-messages and daily-cleanup into django-admin.py.
They are now called  "makemessages", "compilemessages" and "cleanup". This is
backwards incompatible for make-messages.py and compile-messages.py, although
the old executables still exist for now and print an error pointing the caller
to the right command to call.

This reduces the number of binaries and man pages Django needs to install.

Patch from Janis Leidel.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7844 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-06 06:39:44 +00:00
Malcolm Tredinnick bff075973a Fixed #7072 -- More logical and robust language settings in the i18n context processor.
Analysis and patch from akaihola.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7843 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-06 05:25:55 +00:00
Malcolm Tredinnick 58a68723b3 Changed a couple of old-style validators to remove some deprecation warnings
when using ImageFields, etc, in the admin interface. Cosmetic only. Refs #7608.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7837 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-05 02:14:34 +00:00
Gary Wilson Jr 1bfe994409 Corrected typo in `uploadedfile` module.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7829 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-03 06:04:17 +00:00
Gary Wilson Jr 54d50ef5c8 Made legacy `ObjectPaginator` truly backwards-compatible by catching both `AttributeError` and `TypeError` in `_get_count` as it did before
[7306].  Tests included.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-02 04:31:28 +00:00
Jacob Kaplan-Moss bcb1c6dc71 Oops, missed a changed file in [7817].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-01 18:49:01 +00:00
Jacob Kaplan-Moss 9fc4c0aaa4 Fixed #7590: made UploadedFile subclasses' __init__ methods sane.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7817 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-01 18:47:46 +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
Russell Keith-Magee 415bd694f9 Fixed #7521 -- Added the ability to customize ROOT_URLCONF for the duration of a TestCase. Thanks to Mark Fargas (telenieko) for his work on this patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7805 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30 12:34:29 +00:00
Russell Keith-Magee 9eaa05912c Fixed #7572 -- Force the closure of the database connection at the end of fixture loading as a workaround for MySQL bug #37735. Thanks to Simon Litchfield for his help in narrowing down this issue.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30 12:18:29 +00:00
Malcolm Tredinnick 5f7bb13f27 Fixed #6647 -- Add some more robustness to the development web server.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7801 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30 11:32:50 +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
Malcolm Tredinnick f9df4d1435 Make sure we only create the minimum number of table indexes for MySQL.
This patch simplifies a bunch of code for all backends and removes some
duplicate index creation for MySQL, in particular (versions 4.x and later).
Patch from Nis Jørgensen.

Fixed #5671, #5680, #7170, #7186.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7790 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30 04:46:59 +00:00
Adrian Holovaty 8089eec6cf Fixed #7527 -- Removed an unused value from __all__ in django.core.servers.basehttp. It had languished there erroneously since the original checkin in Django changeset [174]. Thanks, trevor
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7746 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 04:03:44 +00:00
Russell Keith-Magee 5d09d8769d Fixed #6650 -- Added UTF-8 encoding to SQL output provided by management commands. Thanks to farcaller for the suggestion.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7706 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-19 14:38:56 +00:00
Russell Keith-Magee 090aeee399 Fixed #6719 -- Added a --traceback option to syncdb to provide a stack trace when custom SQL loading fails. Also added documentation for the --traceback option. Thanks to guettli for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7704 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-19 13:24:39 +00:00
Adrian Holovaty e073861332 Fixed #6831 -- Reverse URL resolver now replaces backslashes correctly. Thanks, Bastian Kleineidam
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-16 04:16:21 +00:00
Adrian Holovaty ee882b6abd Fixed #6497 -- Improved fixture error reporting by displaying the entire traceback. Also, SystemExit and KeyboardInterrupt now exit the script properly. Thanks for the patch, Bastian Kleineidam
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7653 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-16 04:00:08 +00:00
Adrian Holovaty a0a06d1a89 Fixed #6654 -- Slightly refactored the way 'startproject' and 'startapp' check for existing Python modules. Thanks, i_i
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7652 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-16 03:56:48 +00:00
Russell Keith-Magee 1c47b21f52 Fixed #7436 -- Corrected a fix from [7615] that broke some test cases. Don't you just love unintended consequences? Thanks to telenieko for the report, and the buildbot for pointing out my mistake.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7629 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-13 00:08:50 +00:00
Adrian Holovaty acf888b4ba Fixed #7421 -- Improved syncdb implementation not to check for exact exception text, in case of alternate Python implementation. Thanks, anto.cuni@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7623 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-12 04:22:02 +00:00