Commit Graph

1053 Commits

Author SHA1 Message Date
Malcolm Tredinnick 0aff292bcf Changed a slightly suspicious usage of request.POST to request.method == 'POST'.
Refs #9014 (not the root cause of that bug, but discovered whilst people were
diagnosing it).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@9063 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-17 08:59:55 +00:00
Malcolm Tredinnick a10fcbdb8b Fixed #9096 -- Fixed a slightly out-of-date comment.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9062 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-17 08:10:55 +00:00
Adrian Holovaty 660180df30 Fixed #8574 -- Made Sitemap a new-style class
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9052 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-17 04:56:04 +00:00
Adrian Holovaty 8ec8e1a5e8 Fixed #8870 -- Changed django.contrib.comments templates to use lowercase 'post' for <form method> attributes, to be consistent with our other templates. Thanks, zgoda
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9050 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-16 06:15:26 +00:00
Adrian Holovaty 2ccc716e7b Changed the app-level links on the admin index page to include trailing slashes, to be consistent with the rest of the links
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9048 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-16 06:01:47 +00:00
Adrian Holovaty af23d8d3b3 Fixed #9083 -- Improved get_admin_log template tag so that it doesn't run a separate SQL query for every record in the 'history' sidebar on the admin homepage. Thanks for the patch, santip
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9045 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-16 05:50:03 +00:00
Wilson Miner f09f744f81 Fixed #9074: Added overflow: hidden to the submit-row div to clear the floated contents and avoid collapsing when the Save button is all that's there.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9039 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-16 00:40:10 +00:00
Wilson Miner b79cb53d76 Fixed #8917 -- Comments are now displayed in reverse order by submit_date in the admin. Thanks to arien for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9038 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-16 00:25:21 +00:00
Justin Bronn 96becf2458 Moved imports so that other tests may be imported without specifying Django settings.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9037 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-15 18:06:02 +00:00
Justin Bronn b04faa3511 Fixed #9008 -- now use the correct library path for loading the `WinDLL` instance of the GDAL library.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9036 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-15 17:25:17 +00:00
Russell Keith-Magee 24d3129edd Fixed #8570: Corrected some code that was using 8-space tabs for some reason. Thanks to Manuel Saelices for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9019 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-14 07:04:40 +00:00
Adrian Holovaty 32db67e6f9 Fixed #8957 -- Fixed incorrect error message when Admin prepopulated_fields refers to a field that does not exist. Thanks, charmless
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9002 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-10 06:06:04 +00:00
Adrian Holovaty 40cb11a554 Moved the bulk of the shortcut() function in django/views/defaults.py to a new module, django/contrib/contenttypes/views.py. As a result, django/views/defaults.py no longer relies on django.contrib.contenttypes. Of course, the shortcut() function is still available in the former module, for backwards compatibility. See the new FutureBackwardsIncompatibleChanges wiki page.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9001 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-10 05:56:34 +00:00
Adrian Holovaty 5cc93500e8 Fixed #8959 -- Removed redundant calls to the 'escape' template filter in the django.contrib.comments templates. Thanks, zgoda
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9000 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-10 05:14:59 +00:00
Justin Bronn 152b9ba717 Fixed #8881 by specifying the geometry column name; added the `geom_col_name` classmethod to `GeometryColumns` for Oracle and PostGIS.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8994 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-09 19:19:51 +00:00
Adrian Holovaty 1bfed070c3 Fixed #7929 -- Removed some snippets of admin code that weren't doing anything, and tightened up a few more lines. Plus, an indentation fix. Thanks, julien
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-08 05:45:17 +00:00
Adrian Holovaty 6bdb7b9529 Fixed #8172 -- Improved a whole bunch of contrib templates (admin, databrowse, admindocs, etc.) to remove unnecessary 'escape' filters, given autoescaping. Also removed unnecessary {% if %} tags and shortened some {% if %}/{% else %} tags to use {% firstof %}. Thanks for the patch, benspaulding
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8984 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-08 05:19:28 +00:00
Malcolm Tredinnick 96a417f91d Fixed two XHTML errors pointed out by Jarek Zgoda. Refs #8855.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8958 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03 22:46:39 +00:00
Malcolm Tredinnick 559c0da7c1 Fixed a small initialisation edge-case in the raw_id_fields section of admin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03 21:16:05 +00:00
Malcolm Tredinnick a1e9b98c54 Fixed #8832 -- Position the error icons on the right of the screen in the admin
interface when using right-to-left languages.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8935 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03 19:51:20 +00:00
Malcolm Tredinnick e1f1bda3c7 Fixed #8614 -- Typo fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8933 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03 18:44:19 +00:00
Malcolm Tredinnick 42393ff604 Fixed #8812 -- Fixed up the positioning of the "delete" link in the admin
interface for right-to-left languages (Hebrew, Arabic, etc). Patch from Jannis
Leidel.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8903 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03 04:22:39 +00:00
Malcolm Tredinnick 85ebb91846 Fixed #8669 -- Use a consistent version of create() across the board for
model/field instance creation. Based on a patch from Richard Davies.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8884 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03 00:09:33 +00:00
Jacob Kaplan-Moss 0e5faf225c Security fix. Announcement forthcoming.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8877 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 21:10:00 +00:00
Jacob Kaplan-Moss 7a9b55ddc4 Fixed #2612: fixed display of admin `help_text` with multiple fields on the same line. Thanks to Nathan Borror for the original patch, and jezdez for a little cleanup.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8871 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 19:25:27 +00:00
Brian Rosner 577640bd04 Fixed #8805 -- Make sure proper type coercion happens before dumping data into join for limit_choices_to when building the URL parameters for the ForeignKeyRawIdWidget popup.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8867 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 18:57:10 +00:00
Brian Rosner c1de41f4d2 Fixed #7973 -- Added exclude to BaseModelAdmin to make everything consistent with the form/formset factories. Refs #8071 to make it easier to get at exclude. Thanks julien for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 17:26:24 +00:00
Justin Bronn 326b26656a Fixed `GeoRSSSitemap` to no longer use both `args` and `kwargs` with `urlresolvers.reverse` (no longer allowed since r8760).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8860 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 17:13:39 +00:00
Jacob Kaplan-Moss 23f012dbfa Cleaned up a bunch of minor doc stuff:
* Removed flatpages/redirects README; no other contrib apps have those.
  * Cleaned up top-level README to be more readable.
  * Removed outdated references to old docs (Fixes #8701)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8857 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 16:42:13 +00:00
Jacob Kaplan-Moss 79d2ee3b6d Fixed #8309: subclasses now inherit `GenericForeignKey` correctly. There's also now an internal API so that other "virtual fields" like GFK can be inherited as well. Thanks, msaelices.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8855 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 15:26:00 +00:00
Brian Rosner 0cd5caa6a8 Fixed #8787 -- Fixed failing admin_widgets tests. This fixes ManyToManyRawIdWidget which was broken with [8823]. Thanks Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8846 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 06:10:14 +00:00
Malcolm Tredinnick 63c9b7bf06 Avoid a deprecation warning when running on Python 2.6. Patch from Karen Tracey.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8841 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02 03:04:28 +00:00
Brian Rosner eefec151d1 Fixed #2612 -- Fixed admin formatting when help_text is used with multiple fields on the same line.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8824 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01 22:59:43 +00:00
Brian Rosner ce47d4ab83 Fixed #8648 -- Admin no longer ignores to_field. Thanks for the help Karen Tracey and SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01 22:43:38 +00:00
Jacob Kaplan-Moss 3a18002bbd Fixed #8210 and #8664: moved `USStateField` and `PhoneNumberField` to `django.contrib.localflavor.us`. This is a backwards-incompatible change, albeit a minor one; just add an aditional `import` and go on your way.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01 22:15:35 +00:00
Jacob Kaplan-Moss 89633c3077 Fixed a small oversight in [8750]; thanks for the sharp eyes, Warren. Fixes #8616.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8812 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01 20:25:16 +00:00
Malcolm Tredinnick cf7a078774 Added a related name to the ForeignKey in the abstract base class of the
comment models. You'll never need to use this name, but it will lead to invalid
models if not present.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01 17:56:22 +00:00
Jacob Kaplan-Moss a3196dac48 Make sure to use force_unicode when looking up comment objects by `object_pk`. Fixes #8762, and one other bug that nobody's reported yet.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8800 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01 17:23:09 +00:00
Brian Rosner ab13303ea4 Fixed #8433 -- Deal with the add user popup on models that foreign key to User correctly. Thanks sorl for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8776 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31 21:24:33 +00:00
Jacob Kaplan-Moss 4f5b0a321d Fixed #8194 (again): correctly focus on the first declared field in the admin. Thanks to fredbartle for catching my silly mistake the first time 'round.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8774 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31 20:30:55 +00:00
Jacob Kaplan-Moss 8b11341a9a Fixed `ModelAdmin.radio_fields` to work with the new `TypedChoiceField`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31 20:11:28 +00:00
Brian Rosner d05ebdb649 Fixed #8058 -- Moved media for filter_vertical/filter_horizontal widget to the widget for use outside the admin. This also corrects RelatedFieldWidgetWrapper to expose the media of the wrapped widget. Thanks Erwin for the report and cgrady and ramikassab for the complete patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8764 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31 17:20:43 +00:00
Brian Rosner 30c7ce90c5 Fixed #8631 -- Corrected a display issue with the popup submit_row where the Save button would overflow. Thanks btaylordesign for report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8762 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31 17:13:29 +00:00
Brian Rosner 27f9b96fa0 Fixed handling of primary keys in model formsets. Model formsets should now work nicely with custom primary keys that are OneToOneField, ForeignKey and AutoField. Added tests to handle each of them.
Fixes #8241, #8694, #8695 and #8719.

Thanks Karen Tracey, jonloyens, sciyoshi, semenov and magneto for tracking down various parts of this patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8756 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31 09:49:55 +00:00
Jacob Kaplan-Moss ae72e25b35 Fixed #8716: correctly handle name and email in comments from authenticated users.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8751 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-30 21:30:02 +00:00
Jacob Kaplan-Moss eebc7caa63 Fixed #8616 (again): prevent a race condition in the session file backend. Many thanks to Warren Smith for help and the eventual fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8750 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-30 20:50:41 +00:00
Jacob Kaplan-Moss f2d7ee759a Fixed #8710: removed a few stray tabs. Thanks, gkelly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8746 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-30 19:25:40 +00:00
Malcolm Tredinnick cc971910a9 Changed [8727] to use ImportError, which seems to actually work. Not sure what
I was smoking when I tested this 10 minutes ago. Refs #8680. Thanks to gkelly
for cleaning up after me.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 23:03:12 +00:00
Malcolm Tredinnick 4184d6348e Fixed #8680 -- Changed a couple of GEOExceptions to Python's RuntimeError so
that help() works. Without this change, even if you didn't use the gis stuff,
just using Python 2.5's help() system would crash when searching for model
names.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8727 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 22:51:01 +00:00
Brian Rosner 5c31c68560 Properly reference FieldDoesNotExist as it does not exist in global of django/contrib/admin/options.py.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8719 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 19:50:22 +00:00
Jacob Kaplan-Moss 21adbd6738 Fixed #7466: do a better job figuring out links from the admin docs into the rest of the admin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8718 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 19:29:16 +00:00
Jacob Kaplan-Moss 0871ff2c9c Fixed #7810: added named URLs for admin docs, and use them in the admin base template. Thanks, MattBowen.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8717 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 19:28:53 +00:00
Jacob Kaplan-Moss 2ca8cf3628 Fixed #8653: make formtools' security hash more rubust. Silly that I didn't think of this before; thanks to bthomas for providing the obvious fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8715 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 19:15:34 +00:00
Malcolm Tredinnick 71076ae299 Fixed some edge-case error handling from [8699]. Thanks, gkelly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 18:12:31 +00:00
Malcolm Tredinnick 3717e3bba3 Reverted #8688 for now, since it merely introduced different bugs, rather than
fixing the problem. We have a plan B (and plan C, if needed), so this will be
fixed in a different way.

Refs #8616.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8707 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 17:32:21 +00:00
Brian Rosner cd0b65bcf7 Fixed #7982 -- Corrected ModelAdmin url dispatching to ensure it matching exactly what it needs and doesn't stomp on primary key space. 'add' is a lost cause for now. This originated from #6470. Thanks jdetaeye for the original patch and basith for providing test cases.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8704 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 16:46:46 +00:00
Jacob Kaplan-Moss 15416a9016 Fixed #7881: Support `__in` lookups in `limit_choices_to` and `raw_id_admin`. Thanks, jamesturk.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8700 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 16:13:17 +00:00
Jacob Kaplan-Moss 21928f2ba0 Fixed #7738: support initial values via `GET` for `SelectMutliple` in the admin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 16:09:29 +00:00
Brian Rosner 89ccbabbfc When a form in the admin has no fields prevent failure.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8698 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 16:07:19 +00:00
Malcolm Tredinnick 02f86a1c7c Fixed #8616 -- Fixed a race condition in the file-based session backend.
Thanks to warren@wandrsmith.net for the patch.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8688 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29 01:44:11 +00:00
Jacob Kaplan-Moss a41ca9c9e2 Fixed #8556: added a useful formfield to `CommaSeparatedIntegerField`. gkelly, mattmcc, and kratorius all contributed portions of this patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8682 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28 20:58:10 +00:00
Jacob Kaplan-Moss fe8e00ae06 Fixed #8194: `AdminForm.first_field` now correctly returns the first field when using custom field orders.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28 20:48:59 +00:00
Jacob Kaplan-Moss 0c66bac4f3 Marked a handful of missed strings for translation. Fixes #8644, #8617, and #8610.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8679 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28 20:17:31 +00:00
Jacob Kaplan-Moss 7b65302567 Fixed #8608: corrected doc link in comment 400 error page.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8677 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28 19:46:33 +00:00
Malcolm Tredinnick 65c0846c45 Updated a few save() methods on models to accept force_insert and force_update
parameters. Required as a consequence of [8670] (so they can be used with
create()).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8673 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28 19:28:17 +00:00
Jacob Kaplan-Moss b31568aed3 Fixed #8027: correctly validate fields/fieldsets in `ModelAdmin` validation when using custom `ModelForm`s.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8662 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28 15:43:04 +00:00
Malcolm Tredinnick 4cd03ef5d9 Improvements to [8608] to fix an infinite loop (for exclude(generic_relation)).
Also comes with approximately 67% less stupidity in the table joins for
filtering on generic relations.

Fixed #5937, hopefully for good, this time.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8644 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28 05:00:23 +00:00
Jacob Kaplan-Moss 1abfb1df19 Fixed #8276: corrected another couple of names in localflavor.pl.forms. Patch by Piotr Lewandowski.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8643 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 23:05:25 +00:00
Jacob Kaplan-Moss 08024e9503 Fixed #8601: a small typo in comment views.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8642 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 22:55:10 +00:00
Jacob Kaplan-Moss 1106c558b1 Fixed #8544: correctly cast `Comment.object_pk` to string when doing lookups. This really only papers over a bigger problem related to casting the RHS of GFKs, but that larger change can wait for a more systematic fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8641 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 22:51:24 +00:00
Malcolm Tredinnick ee28560997 Fixed #8311 -- Avoid an infinite loop with session key generation when using
the cache backend and memcached goes away (or is not running).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8620 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 08:58:51 +00:00
Malcolm Tredinnick ec8848dad5 Fixed #8589 -- Fixed the URL for the logout link on the app_index page in admin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8617 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 07:27:09 +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 c305471610 Fixed get_absolute_url() for comments. Previously, it relied on "view on site"
for admin being reversible or required people to set up their own version. Now
we ship a default pattern in the comments URLs in a way that is unlikely to
clash with anything else.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8614 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 07:04:58 +00:00
Malcolm Tredinnick 157dbe2fff Fixed #8552 -- Use the LOGIN_REDIRECT_URL setting in the auth tests, rather than hard-coding the value.
This enables things to work properly when installed in other configurations.
Patch from aeby.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8613 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 06:02:13 +00:00
Malcolm Tredinnick d70c8907cd Fixed #5937 -- When filtering on generic relations, restrict the target objects to those with the right content type.
This isn't a complete solution to this class of problem, but it will do for
1.0, which only has generic relations as a multicolumn type. A more general
multicolumn solution will be available after that release.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8608 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 05:22:33 +00:00
Malcolm Tredinnick 6e51f05112 Fixed #8577 -- Fixed a couple of indentation errors when viewing the app-index
page in admin. Patch by evenrik.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8607 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27 05:22:25 +00:00
Malcolm Tredinnick 8226b8c957 Fixed #8569 -- Ensure that apps are correctly set up before introspecting them
in admin validation.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8605 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 23:06:30 +00:00
Malcolm Tredinnick 255bf69e09 Tweaked the admin validation code to make things a bit easier to read. Tracing
through all the underscore-prefixed and wrapped functions was a bit trying and
some of the names were misleading. No functional changes. Primarily, this is
just bringing the style into line with the rest of the codebase.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8604 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 23:06:24 +00:00
Jacob Kaplan-Moss 70966cb9c7 Fixed #6893: `FormWizard` now properly updates its `step` value. Thanks, siddhi and wamberg.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8603 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 21:33:56 +00:00
Jacob Kaplan-Moss 6056ab1bee Fixed #6209: handle `BooleanField`s in `FormPreview` and `FormWizard`. In the process, broke the the security hash calculation out to a helper function. Thanks to mcroydon and rajeshdhawan.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8597 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 20:19:12 +00:00
Jacob Kaplan-Moss 378f5ddb5a Updated comment signals to provide enough information to actually act on. This was uncovered when working on the documentation, which'll be committed shortly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8589 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 18:53:52 +00:00
Brian Rosner 5dd68fa74a Marked a couple of unmarked strings in edit_inline templates and corrected a marked string.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8587 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 18:15:19 +00:00
Brian Rosner 5a72589d7a Fixed #7984 -- 'View on site' links now work in inlines. Thanks philwo for the report and initial patch by julianb.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8586 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 18:07:36 +00:00
Jacob Kaplan-Moss a516ebdff1 Fixed #8126: improved `admin.autodiscover()` to be more forgiving of invalid `INSTALLED_APPS` entries and/or exotic import schemes that don't have `__path__`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8583 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 16:18:20 +00:00
Malcolm Tredinnick 73afcee6ed Fixed #6101 -- Tweaked a couple of places in the delete-related-objects
collection for the admin so that auto-escaping can do the right thing: not too
many times, not too few. Thanks to Karen Tracey for debugging most of this.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8575 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 07:36:39 +00:00
Malcolm Tredinnick ccb37ce74c The comments app was unconditionally accessing various settings that didn't
exist in Django's global settings. Changed those accesses to conditional
lookups with default fallbacks.

The comment_test tests now pass without needing to add any extra settings.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8573 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 06:58:43 +00:00
Gary Wilson Jr b016ea0ace Removed trailing whitespace in a few files.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8571 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 04:55:56 +00:00
Justin Bronn 5485e0d97f Fixes for Geo sitemap errata.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8566 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 00:46:30 +00:00
Justin Bronn 8a88379b2a Fixed the `GeometryField` form to catch more than just GEOS exceptions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8565 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26 00:34:34 +00:00
Jacob Kaplan-Moss cba91997a2 Refactored Django's comment system.
Much of this work was done by Thejaswi Puthraya as part of Google's Summer of Code project; much thanks to him for the work, and to them for the program.

This is a backwards-incompatible change; see the upgrading guide in docs/ref/contrib/comments/upgrade.txt for instructions if you were using the old comments system.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8557 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 22:14:22 +00:00
Brian Rosner 853f4d29b8 Fixed #8547 -- Corrected the breadcrumb display in the object_history.html template. Thanks sorl for catching this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8555 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 19:56:14 +00:00
Brian Rosner 834ce902c2 Fixed #8499 -- Corrected a couple of instances of where the CSS class name error should be errors. Thanks rmyers for catching this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8554 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 19:29:13 +00:00
Jacob Kaplan-Moss 744d882110 Fixed #8425: removed the independant nations of Palau, Marshall Islands, and Micronesia from localflavor's list of US states.
...

Man, commit messages like that are incredibly fun to write.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8550 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 19:11:41 +00:00
Jacob Kaplan-Moss ab7eabfcd1 Fixed #8519: report the correct class in databrowse's `AlreadyRegistered` error. Thanks, mattmcc.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8547 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 18:32:26 +00:00
Jacob Kaplan-Moss 78d13fb1c2 Fixed #8379: the admin user change form now properly validates the username. Thanks, kratorius.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8544 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 17:10:20 +00:00
Jacob Kaplan-Moss 9a1e4cedde Fixed #8344: make User.get_profile() work when settings.AUTH_PROFILE_MODULE is unset.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8543 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 16:56:59 +00:00
Jacob Kaplan-Moss 15ed0d65b0 Fixed #7833: the user creation form now works when password1 isn't set.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8542 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 16:55:57 +00:00
Brian Rosner de977c8514 Fixed #8522 -- Allow app_index to take extra_context to be consistent with the other views in the admin. Thanks Jannis Leidel for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8529 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25 03:55:47 +00:00
Brian Rosner 072083f261 Fixed #8520 -- Corrected a dumb typo in the call to password_change in django/contrib/admin/sites.py. Thanks Karen Tracey for catching this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8523 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-24 22:45:35 +00:00
Russell Keith-Magee 78c2c95ed3 Fixed #8129: Modified the password reset email template to use a URL lookup, so that the email doesn't require customization based on the way that the reset view is deployed. Thanks to davenaff for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8517 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-24 08:51:33 +00:00
Russell Keith-Magee 96d12748a9 Added app_label to the context for the add user admin view.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-24 06:46:53 +00:00
Russell Keith-Magee 27b0077a48 Fixed #8509: Cleaned up handling of test cookies in admin logins. Thanks to rajeshd for the report of a problem case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8509 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-24 06:34:18 +00:00
Malcolm Tredinnick 213f294638 Avoid a crash when unencoding session data for the db backend. This is required
because some configurations of MySQL (with utf8_bin collation) will return
bytestring, rather than unicode data, which was causing problems previously.

Refs #8340.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8507 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 22:59:04 +00:00
Malcolm Tredinnick b3688e8194 Fixed #7903 -- Allow admin's prepopulated_from to work with TextFields. Patch
from mk and Alex Gaynor.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8505 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 22:10:45 +00:00
Malcolm Tredinnick aa78a05e69 Fixed #8359 -- Add an admin log entry when creating a new user.
Patch from evan_schulz.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8503 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 21:45:36 +00:00
Justin Bronn 712bb0dde7 Fixed KML sitemaps, and added support for generating KMZ and GeoRSS sitemaps; sitemaps now support Google's Geo Sitemap format.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8502 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 19:22:23 +00:00
Malcolm Tredinnick c83a96d298 Tweaked the Admin add/change page so that "save" is still the highlighted
too look like the default button and it actually operates as the defaut
(previously "save and add another" was the default action, which confused
people if you hit the save button and it looked like your work was eaten by a
grue).

Fixed #7272. Patch from Jannis Leidel.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8501 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 19:07:49 +00:00
Malcolm Tredinnick abb1c508cc Tests for password change process. Thanks, Mike Richardson. Fixed #8402.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8497 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 18:20:49 +00:00
Malcolm Tredinnick cc95b44547 Updated password change template (in admin templates) to use current form
variables (rather than oldforms stuff). Patch from Mike Richardson. Refs #8402.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8496 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 18:20:19 +00:00
Brian Rosner 0511435a33 Fixed #8498 -- Add the ability to customize the template for app_index similar to the other views on the AdminSite class. Thanks Jannis Leidel for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8487 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 16:27:12 +00:00
Russell Keith-Magee 358ba07166 Fixed #7946: Modified object history template to use a common date format. Thanks to Marc Garcia for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8485 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 14:23:50 +00:00
Russell Keith-Magee a9ee1d4e28 Fixed #7776: Ensured that the test cookie is always deleted once a login has succeeded. Thanks for the report and fix, Mnewman.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8484 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 14:12:58 +00:00
Justin Bronn a0e87b771b Fixed #8465. Mark KML input as safe so elements aren't escaped; added some defaults for name and description.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8480 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 07:06:30 +00:00
Brian Rosner 58c579b005 Fixed #8367 -- Pass the object to get_form from get_fieldsets in ModelAdmin. Thanks jarrow for catching this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8479 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 05:05:21 +00:00
Brian Rosner 77c78201b8 Fixed #1390 -- Added an app index in the admin interface. Thanks juliae and ext for their work on patches.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8474 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 04:00:15 +00:00
Brian Rosner ab26efc952 Fixed #8493 -- Fixed a NoReverseMatch when redirecting to password_change/done/ in the admin. Added the ability to override redirects to other password change views for consistency. Thanks for the report mtrichardson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8473 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 03:26:01 +00:00
Brian Rosner 1b8b9686fa Fixed #7947 -- Handle the display of OneToOneField in model forms correctly. Thanks tyson for the report and original patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8469 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-22 19:27:26 +00:00
Malcolm Tredinnick c8c159cbba When logging in, change the session key whilst preserving any existing
sesssion. This means the user will see their session preserved across a login
boundary, but somebody snooping the anonymous session key won't be able to view
the authenticated session data.

This is the final piece of the session key handling changes.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8459 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-21 13:54:53 +00:00
Malcolm Tredinnick d05d724165 Fixed #8376 -- Use request.path and request.path_info at the right moments when
serving data in the flatpage middleware. Patch from jcassee.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8457 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-21 01:40:22 +00:00
Malcolm Tredinnick eb85af1865 Fixed #8457 -- Fixed a missing import.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8451 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-20 21:12:45 +00:00
Malcolm Tredinnick ba937e55ae Fixed #8415 -- Fixed a typo in the localflavor for the Netherlands. Thanks,
Niels Poppe.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8443 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-19 20:27:41 +00:00
Justin Bronn 463b325cb6 GeoDjango users may now use `django.contrib.gis.tests.run_tests` for their `TEST_RUNNER` so that a testing spatial database is properly created; the GeoDjango test suite runner is renamed to `run_gis_tests`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8434 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-18 15:58:29 +00:00
Brian Rosner 62aafd8e30 Moved admin form helpers to their own module to clean-up django/contrib/admin/options.py a little bit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8433 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-18 15:49:58 +00:00
Justin Bronn aeb7639951 Fixed `GeoQuery.get_columns()` to be compatible with the changes in r8426.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8431 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-18 02:59:25 +00:00
Justin Bronn b25d759bed Fixed #8113. Made `get_width_height` a `GoogleZoom` method that takes the extent instead of an envelope so it may handle Point geometries. Thanks to Santiago Aguiar for the bug report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8428 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-17 21:09:28 +00:00
Brian Rosner 219304019b Fixed #8353 -- Corrected the case when adminform is not in the context when rendering {% prepopulated_fields_js %} in the admin. Thanks evan_schulz for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8421 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-17 05:16:16 +00:00
Justin Bronn a2be52fd2a Fixed #6547, added support for GeoRSS feeds in `django.contrib.gis.feeds`; added the `feed_extra_kwargs` and `item_extra_kwargs` to the `Feed` baseclass so that it's possible for subclasses to add dynamic attributes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8414 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-16 20:40:47 +00:00
Malcolm Tredinnick 54f9a98713 Fixed #8351 -- Fixed the returned value when we attempt to load a cache-backed session object that doesn't alreayd exist.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8410 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-16 15:54:36 +00:00
Russell Keith-Magee cbcc415934 Fixed #8229: Added handling for a special case in the validation of Spanish ID numbers. Thanks to Marc Garcia for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8405 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-16 07:00:30 +00:00
Brian Rosner f67fb604ea Fixed #8341 -- Allow simpler subclassing of ModelAdmin and InlineModelAdmin when overriding get_form and get_formset and needing to pass keyword argument on to the factory functions. Thanks ciantic for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8396 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 21:57:36 +00:00
Brian Rosner 0ca738363a Fixed #8292 -- Honor filter_horizontal and filter_vertical in inlines correctly. It now adds the right Javascript to handle them when they are the only ones on the page. Thanks dakrauth for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8392 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 20:33:45 +00:00
Brian Rosner 9d1ec0b5ec Fixed #5385 -- Made the date returned from the calendar picker consistent with the usual format of dates in the admin. Thanks Petr Marhoun for the ticket and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8390 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 19:51:45 +00:00
Brian Rosner 417a4d66df Removed some checks for Model._meta.one_to_one_field to prevent list_filter and the show_result_count in search_form.html. Fixes #2145.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8388 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 19:15:20 +00:00
Gary Wilson Jr 3bb50169d9 Removed unused and redefined imports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8386 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 17:42:13 +00:00
Brian Rosner d7467a0bfc Fixed #957 -- prepopulated_fields now works correctly on inlines.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8385 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 17:38:39 +00:00
Brian Rosner f586c0b039 Fixed media creation in the add_view. It was not pulling media from the correct place.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8384 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 17:36:33 +00:00
Gary Wilson Jr 415bf3efb3 Fixed #7364 -- Never cache the contrib.auth login view.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8383 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 17:10:14 +00:00
Malcolm Tredinnick 0d48087a53 Made a few small tweaks to reduce persistent storage accesses in the session
backend. Refs #8311, although doesn't fix the problem there.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8381 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 14:59:11 +00:00
Brian Rosner 2102967807 Fixed failing tests from [8352]. Thanks Alex Gaynor for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8354 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-14 21:03:44 +00:00
Brian Rosner dd0e5fd992 Fixed #8324 -- Corrected the simple case where list_display is not given. Thanks tobias for the quick report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8353 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-14 20:51:40 +00:00
Brian Rosner b2ec6473c0 Fixed #7503 -- Allow callables in list_display. This also does a lookup on the ModelAdmin for the method if the value is a string before looking on the model. Refs #8054. Thanks qmanic and Daniel Pope for tickets and patches.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8352 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-14 20:12:19 +00:00
Malcolm Tredinnick 9e423b51e3 Fixed #8314 -- Fixed an infinite loop caused when submitting a session key (via
a cookie) with no corresponding entry in the database.

This only affected the database backend, but I've applied the same fix to all
three backends for robustness.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8351 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-14 19:43:08 +00:00
Gary Wilson Jr f9301fa8f4 Removed some testing code inadvertently commited in [8348].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8349 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-14 15:41:38 +00:00
Gary Wilson Jr 788de6b5fd Fixed #8206 -- Removed validate methods of Model and Model fields. They are are unsupported for 1.0 and will be replaced with more complete model validation (refs #6845).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-14 15:37:43 +00:00
Malcolm Tredinnick 2da6628519 Fixed #8310 -- Actually use the SystemRandom RNG, if available, which fixes an
oversight from [8340]. The previous code worked, but this is what I really
intended.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8346 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-14 13:54:22 +00:00
Malcolm Tredinnick 4adf048a51 Fixed #8276 -- Changed the names of a few Polish localflavor classes to match
their common names/acronyms, similar to other localflavors.

Backwards incompatible if you're using these classes.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8345 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-14 04:29:02 +00:00
Malcolm Tredinnick 9d83444f16 Fixed #6984 -- Make sure to load session data from the file (if necessary)
prior to truncating it during a save.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8344 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-14 03:58:09 +00:00
Malcolm Tredinnick 97a7dab2b1 Fixed #6941 -- When logging a user out, or when logging in with an existing
session and a different user id to the current session owner, flush the session
data to avoid leakage. Logging in and moving from an anonymous user to a
validated user still keeps existing session data.

Backwards incompatible if you were assuming sessions persisted past logout.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8343 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-14 03:58:00 +00:00
Malcolm Tredinnick 5e8efa9a60 Implemented a flush() method on sessions that cleans out the session and
regenerates the key. Used to ensure the caller gets a fresh session at logout,
for example.

Based on a patch from mrts. Refs #7515.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8342 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-14 03:57:46 +00:00
Malcolm Tredinnick 31ec68c5d9 Added a clear() method to sessions. Patch from mrts. Refs #7515.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8341 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-14 03:57:30 +00:00
Malcolm Tredinnick af7b6475ca Added guaranteed atomic creation of new session objects. Slightly backwards
incompatible for custom session backends.

Whilst we were in the neighbourhood, use a larger range of session key values
to save a small amount of time and use the hardware-base random numbers where
available (transparently falls back to pseudo-RNG otherwise).

Fixed #1080


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8340 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-14 03:57:18 +00:00
Jacob Kaplan-Moss bb30805452 Fixed #8131: use reverse() in auth views. Patch from davenaff.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8334 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12 23:31:31 +00:00
Jacob Kaplan-Moss 899ca54fe2 Added a couple of extra syndication tests, and generally sanitized the existing ones. Refs #6547.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8310 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 20:49:19 +00:00
Justin Bronn 1613903906 Fixed the `gis` test suite, finished conversions missed in r8296. Thanks, robotika.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8308 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 17:54:44 +00:00
Brian Rosner 8ad96b4d29 Added back save_model that was removed from [8273] to allow for both pre- and post- operations around save in ModelAdmin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8307 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 17:20:47 +00:00
Gary Wilson Jr f09f14d0ae Fixed #8226 -- Fixed a Python 2.3 incompatibility in a unicode string substitution, thanks nfg.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8302 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 15:13:00 +00:00
Gary Wilson Jr 222e7983bd Fixed #8225 -- Right align radio fields in RTL mode, thanks remohammadi.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8300 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 14:01:34 +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 cec69eb70d Refs #7742 -- Removed oldforms bits from `contrib.gis` app.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8295 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 04:33:27 +00:00
Gary Wilson Jr dd842ad34d Refs #7742 -- Changed the `django.contrib.admin.views.template.template_validator` view to use newforms instead of oldforms.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8294 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 04:31:55 +00:00
Gary Wilson Jr 0b01d50076 Refs #7742 -- Removed unused `validator_list` argument (this is already being checked by the `UserCreationForm`).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8293 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 04:30:30 +00:00
Gary Wilson Jr 00bebaf0d1 Refs #7742 -- newforms-admin does not use oldforms `validator_list` argument, made a custom `FlatPageForm` to check the entered URL.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8292 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 04:28:33 +00:00
Justin Bronn 5b27c36041 gis: Fixed #8207; now shield 2.4 test runners from attempting to import ctypes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8289 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-10 17:36:12 +00:00
Russell Keith-Magee 2845e43505 Fixed #8205 -- Corrected a misspelling in the API introduced in [8265] and [8274]. Thanks for the report, Simon.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8286 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-10 12:41:42 +00:00
Brian Rosner a7d3c92767 Fixed #8202 -- Moved user_change_password to UserAdmin. This enables seamless integration of a custom UserAdmin. Thanks ElliottM for catching this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8283 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-10 09:43:48 +00:00
Brian Rosner baac791c4b Fixed #7932 -- Made it easier to use a custom User model with the admin. Added add_form attribute to UserAdmin and removed hard-coded dependancies to User. Thanks ElliottM for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8280 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-10 04:22:21 +00:00
Brian Rosner 02cc59187b Fixed #4667 -- Added support for inline generic relations in the admin. Thanks to Honza Král and Alex Gaynor for their work on this ticket.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8279 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-10 04:03:01 +00:00
Brian Rosner 38dc472796 Fixed #7250 -- Don't show internal data of a FileField in the admin when the form does not validate. This also alternatively fixes a recent problem since [8244] when the form is not valid. Thanks Marc Garcia for the initial ticket.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8277 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-10 01:07:40 +00:00
Brian Rosner b5b129567e Added a missing import in AdminSite.check_dependancies.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8275 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-09 23:56:34 +00:00
Brian Rosner 89a8990a76 Moved ModelAdmin.check_dependancies to AdminSite. Make debugging problems why the admin is not working more apparent.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8274 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-09 23:40:57 +00:00
Brian Rosner 65be56816f Fixed #5780 -- Adjusted the ModelAdmin API to allow the created/updated objects
to be passed to the formsets prior to validation.

This is a backward incompatible change for anyone overridding save_add or
save_change. They have been removed in favor of more granular methods
introduced in [8266] and the new response_add and response_change nethods.
save_model has been renamed to save_form due to its slightly changed behavior.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8273 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-09 20:52:40 +00:00
Jacob Kaplan-Moss 4747347385 Fixed #5801: admin requests with GET args now get properly bounced through login with those args intact. Thanks for the patch, Rozza.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8271 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-09 17:35:19 +00:00
Jacob Kaplan-Moss f53e4d80b4 Added ModelAdmin.save_model() and ModelAdmin.save_formset() methods to allow for easier modification of objects/inlines at admin-save time. Refs #6002.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8266 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-09 17:12:48 +00:00
Jacob Kaplan-Moss 6ba6489662 Broke the admin's use of LogEntry and user messages out into callbacks on ModelAdmin. Refs #6002.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8265 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-09 16:45:15 +00:00
Jacob Kaplan-Moss 88baf06c3d Fixed #7811: moved admindocs templates into admindocs/templates. This is slightly backwards-incompatible in that if you're using the admindocs you'll need to add 'django.contrib.admindocs' to INSTALLED_APPS.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8264 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-09 15:53:50 +00:00
Brian Rosner 84afcf5a02 Removed an extraneous } that regressed from an older patch for [8247].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8248 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 21:33:55 +00:00
Brian Rosner 1c9ca83db2 Fixed #8169 -- Honor attrs from subclasses of the new admin widgets introduced in [8240]. Thanks Alex Gaynor for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8247 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 21:27:03 +00:00
Jacob Kaplan-Moss 19bbc74e46 Fixed #7115: tweaked ordering on Permission to more closely match the pre-QSRF behavior, which was nice. Thanks, Matthew Flanagan.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 21:24:02 +00:00
Malcolm Tredinnick 660b909557 Fixed #8107 -- Fixed a missing forced_unicode() call in admin. Patch from
bjronkri.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8245 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 21:19:59 +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
Brian Rosner c49eac7d4f Fixed #8069 -- Corrected the inconsistent case with BaseInlineFormset. It has been renamed to BaseInlineFormSet. Backward incompatible for anyone who used BaseInlineFormset directly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8243 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 20:27:48 +00:00
Brian Rosner 5d199ba901 Fixed #8163 -- Restore oldforms admin styling on input fields. Also cleaned up some styles for both tabular and stacked inlines. Thanks Nathan Borror for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 19:54:34 +00:00
Malcolm Tredinnick ab8965c428 Added a few force_unicode() calls around objects in the admin. Required for
Python 2.3 compatibility. Patch from nfg.

Refs #8151, #8153.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8236 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 18:07:33 +00:00
Malcolm Tredinnick 90b6e1438f Fixed #8020 -- Fixed paginator initialisation in sitemaps framework. Thanks,
John D'Agostino.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8231 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 15:40:31 +00:00
Malcolm Tredinnick 44e407b7c6 Fixed #7575 -- Peru now has regions, not departments (changed at some pointi n
the last year or so). Thanks andresj and programmerq.

This is backwards incompatible if you're using the Peruvian localflavor.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8230 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 15:34:02 +00:00
Luke Plant 7b4b1309d9 Added a 'name' attribute to the 'Save' button on admin change form
This makes it much easier/possible for testing tools e.g. twill to find
the 'Save' submit button.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@8226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-07 21:18:43 +00:00
Justin Bronn c396992c7d gis: Fixed #8141; moved Python 2.3 incompatibilities out of the reach of the test suite.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8225 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-07 01:14:10 +00:00
Justin Bronn b00e82fe2c gis: The `verbose_name` positional keyword now works for `GeometryField`, thanks springmeyer; removed DOS line endings from Oracle & MySQL spatial backends, thanks cramm.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8224 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-06 21:40:00 +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 d06b474251 Do [8221] in a slightly more clean way.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8222 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-05 23:53:52 +00:00
Jacob Kaplan-Moss 9f6ab8104c Fixed #8128: correctly handle feeds that incorrectly don't provide pubdates. Be liberal in what you accept!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-05 23:52:03 +00:00
Justin Bronn 79e68c225b Merged the gis branch into trunk.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8219 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-05 18:13:06 +00:00
Jacob Kaplan-Moss d0f57e7c73 Fixed #6213: flatpage view now correctly redirects if settings.APPEND_SLASH. Thanks, crankycoder.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8218 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-05 17:45:31 +00:00
Jacob Kaplan-Moss 34008aaeb0 Fixed #7016: use correct time zones for Atom feeds. Thanks, Chris Cahoon.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8216 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-05 17:38:49 +00:00
Luke Plant 8e24b37610 Cleaned up whitespace
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8214 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-05 16:36:20 +00:00
Russell Keith-Magee bf65fd0a80 Fixed #8901 -- Corrected typo in docstring. Thanks to Hayley Bonham <djangocode@vortex.cx> for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8207 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-04 12:11:04 +00:00
Gary Wilson Jr 2a7f7e1b97 Removed some unused and duplicated imports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-02 06:04:09 +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 8a58f2216c Fixed #8078 -- Fixed a Python 2.3 incompatibility in `contrib/admin/options.py`, thanks Karen Tracey.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8192 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-02 05:29:17 +00:00
Brian Rosner d7dc2d3985 Fixed #8086 -- Removed 2.5 specific keyword argument to __import__. Thanks CHasenpflug for noticing this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8188 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-02 00:33:21 +00:00
Brian Rosner c4ba628231 Added a missing import from [8186].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8187 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 23:31:20 +00:00
Brian Rosner e608433ee7 Pass the correct data as the second parameter to find_module to correct admin.autodiscover(). Fixes #7922. Thanks Alex Gaynor for being smarter than me.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8186 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 23:29:25 +00:00
Brian Rosner 85af264112 Reverted [8174]. It is causing some serious breakage right now. Need to investigate more.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8183 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 22:46:15 +00:00
Luke Plant 8dff194e9b Fixed #3062 - removed arbitrary and unneeded max_length on password fields in auth forms.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 21:18:17 +00:00
Brian Rosner 4c0234215e Fixed #5631 -- When fieldsets contains a field that is on the same line, it is now collapsable when collapse is set in classes. Thanks andybak for some research and Karen Tracey for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8177 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 20:00:30 +00:00
Brian Rosner 525e1e379a Fixed #7922 -- admin.autodiscover() no longer eats ImportErrors for breakfast. Thanks Jan Rademaker and Alex Gaynor for their work on the ticket.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8174 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 19:10:55 +00:00
Brian Rosner be17a801f6 Fixed #7885 -- Prevent duplicates in fields and fieldsets declarations. Thanks julien and wamberg for the patches.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8173 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 18:55:43 +00:00
Luke Plant 64f5ab67a5 Changed some URL conf regexes to rawstrings for consistency
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8172 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 16:18:24 +00:00
Luke Plant 079e5bf1ec Added a login link to the password reset completion screen.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8171 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 16:13:12 +00:00
Luke Plant 27d5972916 Fixed #2175: Added tests for models with multiple GenericForeignKeys
Also fixed small typo in a docstring.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8170 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 15:54:53 +00:00
Luke Plant fcd837cd0f Fixed #7723 - implemented a secure password reset form that uses a token and prompts user for new password.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8162 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-31 20:47:53 +00:00
Russell Keith-Magee f423dde34a Fixed #7978 -- Modified the contrib.sites tests to guarantee the initial conditions of the test match meet the requirements of the test. Thanks to Evan Schulz for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8160 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-31 09:24:16 +00:00
Russell Keith-Magee 99e34c1846 Fixed #8042 -- Modified the password reset form so that the email field length matches the User model. Thanks to Bob Thomas <bthomas@ncircle.com> for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8159 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-31 09:08:55 +00:00
Malcolm Tredinnick 004ff03a8e Removed TEST_COOKIE_NAME and TEST_COOKIE_VALUE constants from
sessions.middleware. They haven't been used here since the great refactor and
are duplicated in sessions.backends.base.SessionBase.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8156 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-30 21:55:47 +00:00
Russell Keith-Magee f7d123a731 Fixed #7880 -- Corrected the handling of fields in the admin that specify choices, so that the presence of choices overrides the decision to use a custom admin widget. This is primarily of interest to Date/Time fields. Thanks to camilonova for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-30 11:41:04 +00:00
Malcolm Tredinnick 726a24c609 Fixed #7992 -- Interpolate UTF-8 verbose_names correctly into unicode strings
in the admin interface. Patch from aabele. Refs #8016.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8144 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-30 00:52:01 +00:00
Russell Keith-Magee bf777442fa Fixed #7695 -- Modified template to trust help_text on a model field. Thanks to Ben Spaulding for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8137 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-29 13:32:47 +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 82a85fdbae Fixed #6427 -- Added some more features to the Austrian localflavor.
Thanks, Horst Gutmann.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 18:54:56 +00:00
Malcolm Tredinnick badde8a7e5 Fixed #7793 -- Handle sitemaps with more than 50,000 URLs in them (by using
pagination). Patch from Julian Bez.

The docs patch here could probably do with some rewording.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8088 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26 05:07:16 +00:00
Malcolm Tredinnick a26ba33111 Fixed #7686 -- Added an Austrian localflavor. Thanks, bernd.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8087 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26 04:25:42 +00:00
Luke Plant 3992683ea3 Fixed #6109 again.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8073 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-25 14:44:56 +00:00
Jacob Kaplan-Moss 7b3cf13d32 Improved admin model registration options: you can now register using register(Model, **options) and even register(Model, ModelAdmin, **options). This isn't documented yet -- a much expanded version of docs/admin.txt is on the way.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8063 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-23 18:58:06 +00:00
Russell Keith-Magee 508016c0f4 Fixed #7914 -- Added some missing __init__.py files that were missed when the ping_google command was added. Thanks to bernd for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8062 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-23 14:15:03 +00:00
Brian Rosner 62d9e278d7 Fixed #7898 -- Moved formset media definition to a media property in InlineAdminFormSet display helper and added InlineAdminForm media at the same time. This now properly renders all media associated with the formset and its display helper children. Thanks dima.kozlov for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8057 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-23 03:25:41 +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
Adrian Holovaty 8bc442e771 Fixed #7304 -- Gave AnonymousUser a has_perms() method, which it was lacking
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8044 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-22 03:05:40 +00:00
Brian Rosner 4f1cbaa93e Moved RedirectAdmin in django.contrib.redirects to an admin.py module.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8018 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-21 16:01:05 +00:00
Brian Rosner ca7ee4be17 Fixed #7858 -- Quick CSS fix for right-to-left written languages in inlines. Thanks mksoft for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8014 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-21 04:09:29 +00:00
Malcolm Tredinnick ee90b7cf9a Fixed filter_horizontal and filter_vertical handling in admin so that they can
be lists (aren't required to be tuples). It's less error-prone to use one item
lists than one-tuples, but this caused a crash.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8011 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-20 21:12:36 +00:00
Russell Keith-Magee 6c4c60b14a Fixed #7775 -- Removed some duplicated code from the admin login sequence. Thanks to Mnewman for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8006 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-20 11:37:20 +00:00
Malcolm Tredinnick 8ac9cbee2f Fixed #7763 -- Added a Romanian localflavor. Thanks, MihaiD.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7989 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 19:22:44 +00:00
Russell Keith-Magee 69ac815a41 Fixed #7828 -- Removed some unnecessary imports from admin widgets. Thanks to Julien for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7974 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 02:26:58 +00:00
Jacob Kaplan-Moss 46786b4193 Fixed #7741: django.newforms is now django.forms. This is obviously a backwards-incompatible change. There's a warning upon import of django.newforms itself, but deeper imports will raise errors.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-19 01:22:26 +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 409ed9468f Fixed #7670 -- Fixed a couple of missed changes from [7865]. Patch from jshaffer.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7869 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-08 05:29:23 +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
Gary Wilson Jr 56e1cdc8bc Fixed a long and complex line by breaking into a for loop, with the added benefit that the method will now exit as soon as a matching
permission is found instead of checking all of the user's permissions and putting them into a temporary list.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-02 05:05:50 +00:00
Gary Wilson Jr 73dfef8771 Added docstring and other minor style fixes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7822 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-02 05:00:09 +00:00
Malcolm Tredinnick ef76102e89 Fixed #7185 -- Added a "ping_google" management command to
django.contrib.sitemaps. Thanks, Pete Shinners.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7813 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-01 12:25:59 +00:00
Russell Keith-Magee 8cb128e57c Refs #7521 -- Re-reverted [7716] (originally reverted in [7726]), now modified to use the new TestCase urlpattern framework.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7808 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30 13:11:12 +00:00
Malcolm Tredinnick 4b93eed185 Fixed #4081 -- Allow empty content in flatpages.
Patch from ctrochalakis and Matt Croydon.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7807 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30 13:05:47 +00:00
Malcolm Tredinnick 339df5ce44 Fixed #6089 -- Removed default ordering on the User class.
Admin users are still ordered, since we add it in specially for Admin. Slightly
backwards incompatible.

Patch from Erik Karulf.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7806 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-30 12:52:46 +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
Adrian Holovaty fbef599f60 Fixed #6306 -- redirect_to_login() helper function now quotes the URL arguments correctly. Thanks, SmileyChris
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7749 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 04:11:53 +00:00
Adrian Holovaty 54f7da3a27 Fixed #7274 -- Improved the django.contrib.auth password_reset() view not to require the Sites framework. Thanks, joshrl
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7748 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-26 04:09:29 +00:00
Russell Keith-Magee 87a704cf50 Fixed #7531 -- Modified the sites test so that user-provided initial data doesn't cause breakage when executed from within user applications. Thanks for the report, madkinder@gmail.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7738 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-25 12:09:18 +00:00
Russell Keith-Magee c8d39f15cb Fixed #7521 -- Reverted [7716]. Fixed URLs in test case broke any application that deployed contrib.auth.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7726 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-23 12:17:57 +00:00