Jannis Leidel
bf33d3eb1d
Fixed #12444 - Date based widgets now correctly handle input values when using locale-aware formatting. Also fixes #7656 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12029 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-30 22:11:48 +00:00
Luke Plant
3952d3129c
Fixed #11191 - Admin throws 500 instead of 404 for PK of incorrect type
...
Thanks to mmachine for report and test, and Chris Beaven for the patch
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12011 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-28 14:08:11 +00:00
Brian Rosner
bcd9482a20
Fixed #342 -- added readonly_fields to ModelAdmin. Thanks Alex Gaynor for bootstrapping the patch.
...
ModelAdmin has been given a readonly_fields that allow field and calculated
values to be displayed alongside editable fields. This works on model
add/change pages and inlines.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11965 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22 18:29:00 +00:00
Jannis Leidel
9233d04265
Fixed #7980 - Improved i18n framework to support locale aware formatting (dates and numbers) and form processing.
...
Thanks to Marc Garcia for working on this during his Google Summer of Code 2009!
Additionally fixes #1061 , #2203 , #3940 , #5526 , #6449 , #6231 , #6693 , #6783 , #9366 and #10891 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22 17:58:49 +00:00
Russell Keith-Magee
ff60c5f9de
Fixed #1142 -- Added multiple database support.
...
This monster of a patch is the result of Alex Gaynor's 2009 Google Summer of Code project.
Congratulations to Alex for a job well done.
Big thanks also go to:
* Justin Bronn for keeping GIS in line with the changes,
* Karen Tracey and Jani Tiainen for their help testing Oracle support
* Brett Hoerner, Jon Loyens, and Craig Kimmerer for their feedback.
* Malcolm Treddinick for his guidance during the GSoC submission process.
* Simon Willison for driving the original design process
* Cal Henderson for complaining about ponies he wanted.
... and everyone else too numerous to mention that helped to bring this feature into fruition.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22 15:18:51 +00:00
Jannis Leidel
ca2d64788d
Fixed #9749 - Added hook to ModelAdmin for specifying custom ChangeLists. Thanks to David Larlet and Eric Florenzano.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11910 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-18 10:08:05 +00:00
Jacob Kaplan-Moss
574eafe4c0
Fixed #11753 - Q objects with callables no longer explode on Python 2.4. Thanks, Jeremy Dunck.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11901 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17 22:06:41 +00:00
Karen Tracey
5bd63663a9
Fixed #399 : Added big integer field. Thanks to Tomáš Kopeček for persistently maintaining a patch for this.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17 15:10:38 +00:00
Karen Tracey
7aaacb589a
Made the message strings added in r11837 visible to makemessages. Refs #12281 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11864 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-14 16:01:43 +00:00
Karen Tracey
8a59084c3a
Fixed #12218 : Added some helpful messages when Go is pressed in admin actions and there
...
is nothing to do because no action was selected or no items are selected.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11837 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-12 21:51:47 +00:00
Karen Tracey
5543b10608
Fixed #12349 : Added missing unquote in admin history view. Thanks for the report guard.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11808 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-10 19:58:20 +00:00
Luke Plant
25020ddb05
Fixed #4604 - Configurable message passing system, supporting anonymous users
...
This deprecates User.message_set in favour of a configurable messaging
system, with backends provided for cookie storage, session storage and
backward compatibility.
Many thanks to Tobias McNulty for the bulk of the work here, with
contributions from Chris Beaven (SmileyChris) and lots of code review from
Russell Keith-Magee, and input from many others. Also credit to the authors
of various messaging systems for Django whose ideas may have been pinched
:-)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11804 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-09 16:57:23 +00:00
Luke Plant
86fcb25749
Updated all PendingDeprecationWarning from 1.1 to DeprecationWarning ready for 1.2
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11791 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-03 15:11:14 +00:00
Russell Keith-Magee
be9376d9ad
Corrected a regression in validation of admin fieldsets with nested definitions from r11744. Thanks to Davor Lučić for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-19 15:07:42 +00:00
Russell Keith-Magee
bb4062d53b
Fixed #12237 -- Improved the error message for m2m fields with an explicit through model being listed in admin fieldsets. Thanks to Pyth for the report and Ramiro Morales for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11744 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-18 07:44:06 +00:00
Russell Keith-Magee
0aeb1e135d
Refs #12203 -- Improved error handling for the case where a user manually specifies an m2m field with an explicit through field. Thanks to dgouldin for the report, and Ramiro Morales for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11737 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-13 12:35:05 +00:00
Russell Keith-Magee
585b7acaa3
Fixed #10109 -- Removed the use of raw SQL in many-to-many fields by introducing an autogenerated through model.
...
This is the first part of Alex Gaynor's GSoC project to add Multi-db support to Django.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11710 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-03 14:02:49 +00:00
Luke Plant
5a0aab41ee
Allow CsrfResponseMiddleware to be used if templates cannot be updated.
...
For the case where someone is using contrib views with custom templates that
they cannot update to use the template tag, it should be possible to use
CsrfResponseMiddleware. This requires that 'csrf_response_exempt' is not
used for the admin views.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11683 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-30 00:17:29 +00:00
Jacob Kaplan-Moss
4281bf3db0
Fixed #11057 : having no actions in the admin (`actions=None`) no longer messes up the layout. Thanks, rvdrijst.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11670 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-27 20:56:12 +00:00
Luke Plant
7230a995ce
Moved contrib.csrf.* to core code.
...
There is stub code for backwards compatiblity with Django 1.1 imports.
The documentation has been updated, but has been left in
docs/contrib/csrf.txt for now, in order to avoid dead links to
documentation on the website.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11661 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-27 00:36:34 +00:00
Luke Plant
8e70cef9b6
Fixed #9977 - CsrfMiddleware gets template tag added, session dependency removed, and turned on by default.
...
This is a large change to CSRF protection for Django. It includes:
* removing the dependency on the session framework.
* deprecating CsrfResponseMiddleware, and replacing with a core template tag.
* turning on CSRF protection by default by adding CsrfViewMiddleware to
the default value of MIDDLEWARE_CLASSES.
* protecting all contrib apps (whatever is in settings.py)
using a decorator.
For existing users of the CSRF functionality, it should be a seamless update,
but please note that it includes DEPRECATION of features in Django 1.1,
and there are upgrade steps which are detailed in the docs.
Many thanks to 'Glenn' and 'bthomas', who did a lot of the thinking and work
on the patch, and to lots of other people including Simon Willison and
Russell Keith-Magee who refined the ideas.
Details of the rationale for these changes is found here:
http://code.djangoproject.com/wiki/CsrfProtection
As of this commit, the CSRF code is mainly in 'contrib'. The code will be
moved to core in a separate commit, to make the changeset as readable as
possible.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-26 23:23:07 +00:00
Luke Plant
c44fdf6a1e
Fixed #12067 - check_dependencies in contrib.admin.sites not triggered using new style admin include
...
Thanks to robhudson for report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11648 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-24 10:13:24 +00:00
Brian Rosner
0d1177ae99
Moved _get_foreign_key call after testing for fk_name fixing a broken test.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11643 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-23 20:47:29 +00:00
Brian Rosner
cb7a3262b5
Moved the call to _get_foreign_key to run in all cases catching incorrect inline setup sooner.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11631 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-19 19:17:20 +00:00
Brian Rosner
5fc35c9caf
Fixed #11709 — Pass inline fk_name attribute when grabbing foreign key to test for exclusion. Thanks yishaibeeri for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11630 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-19 19:17:07 +00:00
Luke Plant
4decf03f9c
Fixed #11502 - wrong escaping in admin.
...
Thanks Tomasz Elendt.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11497 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-11 09:42:17 +00:00
Luke Plant
84ef9dabfa
Fixed #11061 : Malformed POST request causes TypeError in AdminSite.login().
...
Thanks vvd
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11493 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-10 16:50:57 +00:00
Luke Plant
18a67e1069
Fixed #11591 : invalid HTML in tabular.html.
...
Thanks rlaager(at)wiktel.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11489 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-10 16:12:08 +00:00
Luke Plant
976b18a494
Fixed #11252 : Invalid XHTML when filtering a paginated list.
...
Thanks daemondazz
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-10 15:36:33 +00:00
Karen Tracey
eaf1f7d6e3
Fixed #11534 : Improved wording for admin delete confirmation. Thanks hanksims and others who reported this.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11447 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-13 17:16:29 +00:00
Karen Tracey
ab6d6896c4
Fixed #11471 : Fixed typo in a comment in admin options.py. Thanks adamv.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11446 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-13 17:04:42 +00:00
Russell Keith-Magee
53d16b1175
Fixed #11532 -- Corrected the link used for edit_inline foreign keys in admin when the admin is deployed using the old style admin.root approach. Thanks to JP for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11314 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-23 14:31:33 +00:00
Russell Keith-Magee
8d48eaa064
Fixed #10061 -- Added namespacing for named URLs - most importantly, for the admin site, where the absence of this facility was causing problems. Thanks to the many people who contributed to and helped review this patch.
...
This change is backwards incompatible for anyone that is using the named URLs
introduced in [9739]. Any usage of the old admin_XXX names need to be modified
to use the new namespaced format; in many cases this will be as simple as a
search & replace for "admin_" -> "admin:". See the docs for more details on
the new URL names, and the namespace resolution strategy.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-16 16:16:13 +00:00
Russell Keith-Magee
e992e57d3e
Fixed #11416 -- Restored use of the never_cache decorator on admin views. Thanks to Ramiro Morales and Michael Newmann for their work on the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11229 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-13 13:46:31 +00:00
Russell Keith-Magee
708bc80ba6
Fixed #11271 -- Added a translation marker for the list_editable save button. Thanks to dc for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10931 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-06-06 13:43:44 +00:00
Jacob Kaplan-Moss
3da3716252
Fixed #10348 : ChangeList no longer overwrites a select_related provided by `ModelAdmin.queryset()`.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10782 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-14 15:09:33 +00:00
Malcolm Tredinnick
fe971ec66f
Changed r10668 to not falsely error out when using generic inlines.
...
The bug was picked up by the tests already, but only if run against a
backend that supports referential integrity.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10732 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-10 21:09:38 +00:00
Russell Keith-Magee
2c2871b7c3
Fixed #11042 -- Corrected admin inlines for inherited models. Thanks to jsmullyan for the report, and mir for helpful triage work. Patch includes regression test for #8093 , and a commented out test for #10992 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10725 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-09 11:40:13 +00:00
Jacob Kaplan-Moss
f7d01c49e9
Fixed #10651 : fixed a javascript error on the admin user add form. Thanks, seanl.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 12:57:57 +00:00
Jacob Kaplan-Moss
23fa913676
Fixed #10448 : correcting errors on "save as new" now correctly create a new object instead of modifying the old one. Thanks, bastih.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10713 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 12:53:14 +00:00
Jacob Kaplan-Moss
eaf8ec54d2
Fixed #10997 : fixed a Python 2.4-ism in admin actions.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10705 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08 09:57:47 +00:00
Russell Keith-Magee
ae7d9bfad2
Fixed #10899 -- Ensured that log messages for deletions in the admin contain useful descriptions. Thanks to Jeremy Dunck for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10686 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07 13:10:59 +00:00
Russell Keith-Magee
b5f0aff922
Fixed #10516 -- Corrected admin search when the search_fields definition contains multiple fields on the same base model. Thanks to Zain Memon for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10684 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-07 12:52:43 +00:00
Russell Keith-Magee
e2d66e7d03
Fixed #10959 -- Changed the admin search button text to make it clearer in the UI, and to disambiguate during translation. Thanks to Ramiro Morales for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10678 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-05 22:26:01 +00:00
Russell Keith-Magee
31c833f113
Fixed #10897 -- Modified use of ngettext to ungettext in admin change messages. Thanks to zuber for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10677 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-05 22:25:35 +00:00
Russell Keith-Magee
9d28568cb4
Fixed #10275 -- Corrected the edge case of rendering a LogEntry with a contenttype of None. Thanks to Jarek Zgoda for the report, and Peter Bengtsson for the patch
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10675 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-05 11:52:03 +00:00
Russell Keith-Magee
d7233e7c5a
Fixed #9932 -- Added a validation error when an inline tries to exclude the foreign key that provides the link to the parent model. Thanks to david for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10668 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-03 13:39:33 +00:00
Russell Keith-Magee
80a54dd23b
Fixed #9362 -- Prevented inline forms from overwriting the content_type_id attribute on objets being inlined. Thanks to carljm for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10667 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-03 13:38:36 +00:00
Russell Keith-Magee
2c24bba934
Fixed #8903 -- Corrected rendering of admin inline formsets (tabular and stacked) when the inline model has a custom non-autofield primary key. Thanks to dgouldin for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10666 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-03 13:37:20 +00:00
Jacob Kaplan-Moss
d6829782d0
Now that formsets guarentee ordering (see [10623]) we can remove the arbitrary validation of this fact added as part of [10077].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10628 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-22 22:45:23 +00:00