Commit Graph

840 Commits

Author SHA1 Message Date
Ramiro Morales 752a43e245 Reverted [17378] until a public API is available for application labels.
This will allow to solve the i18n of such labels in a more holistic way
without the need to introduce temporary, undocumented mechanisms to
translate them.

Refs #3591, #10436

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17389 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-23 16:17:47 +00:00
Ramiro Morales 203c4fef4d Fixed translatability of application names in admin app.
Also, made usage of the `filter` template tag consistent in some
breadcrumbs elements across the different admin templates.

Fixes #10436.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17378 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-19 11:23:31 +00:00
Julien Phalip 07132fb5d4 Improved the labels and help texts in the admin filter widget.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17327 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-02 15:35:16 +00:00
Julien Phalip a343a84ce6 Added the `wait_until()` and `wait_loaded_tag()` methods to `AdminSeleniumWebDriverTestCase` to prevent some concurrency issues with in-memory SQLite database access in the admin Selenium tests. Thanks to Florian Apolloner, Anssi Kääriäinen and Aymeric Augustin for their help debugging this problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17283 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-28 22:20:30 +00:00
Luke Plant 1c16907199 Added a password reset link to default admin login page if a password reset URL is available.
You no longer have to override the admin login page just to get that link to
appear!

Also provided much better docs for how to plug in the provided password
reset mechanism with minimum effort.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17266 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-24 00:14:45 +00:00
Jannis Leidel 4c376852fe Updated English base translation files in preparation of the alpha release so Transifex can pick them up.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 23:02:28 +00:00
Julien Phalip 2f02a05ffb Fixed #2879 -- Added support for the integration with Selenium and other in-browser testing frameworks. Also added the first Selenium tests for `contrib.admin`. Many thanks to everyone for their contributions and feedback: Mikeal Rogers, Dirk Datzert, mir, Simon G., Almad, Russell Keith-Magee, Denis Golomazov, devin, robertrv, andrewbadr, Idan Gazit, voidspace, Tom Christie, hjwp2, Adam Nelson, Jannis Leidel, Anssi Kääriäinen, Preston Holmes, Bruno Renié and Jacob Kaplan-Moss.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-22 08:33:58 +00:00
Ramiro Morales 554f0601b5 Stopped unconditionally reversing admin model add/change URLs.
Starting with [16857] this could cause HTTP 500 errors when
`ModelAdmin.get_urls()` has been customized to the point it doesn't
provide these standard URLs.

Fixes #17333. Refs #15294.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17237 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-19 14:59:14 +00:00
Adrian Holovaty 20c8aa2a20 Fixed various dodgy behaviours
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 17:37:24 +00:00
Adrian Holovaty 1a8b40c9fa Checking in latest results of running Google Closure Compiler on the admin JS. Looks like they changed the compiler output for 'false'
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17182 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 21:43:24 +00:00
Adrian Holovaty cfb7e477d3 Fixed #17218 -- Fixed bug with SelectFilter where the 'to' box had a height=0 when it was within a collapsed fieldset. Thanks jimallman
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17181 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 21:41:20 +00:00
Adrian Holovaty 5c1c1a1254 Changed admin/js/collapse.js to take advantage of jQuery chaining in three places. Should make for a slight performance boost.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 21:30:53 +00:00
Adrian Holovaty ce247476af Removed way-outdated comment in SelectFilter2.js admin JS file. And we should rename this to SelectFilter.js at some point
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17179 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 21:09:59 +00:00
Ramiro Morales f51205d0ed Updated uses of i18n.blocktrans template tag to use the new more compact syntax introduced in 1.3.
Ref r14922.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17165 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-01 22:57:01 +00:00
Julien Phalip a89b156284 Disentangled some parts of the admin ChangeList and ListFilter's internals. With this refactoring, the query string lookups are now processed once instead of twice and some bugs (in particular the SimpleListFilter parameter name being mistaken for a model field in some cases) are avoided.
Refs #17091.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17145 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-22 12:26:17 +00:00
Julien Phalip 8ddecc39db Fixed #17252 -- Fixed a minor regression introduced by the work in #11868, where the default sorted columns wouldn't correctly be visually represented in the changelist table headers if those columns referred to non model fields. Thanks to sebastian for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17143 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-22 09:14:09 +00:00
Julien Phalip 5c9901323e Fixed #12073 -- Made `AdminDateWidget` and `AdminTimeWidget` consider user-supplied `attrs`. Thanks to elliss for the report and to koenb for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17125 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20 11:12:37 +00:00
Jannis Leidel 6f66b55108 Fixed #17255 -- Removed "as" prefix from new timezone template filter names for the sake of clarity. Cheers to Aymeric Augustin for bearing with me.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17107 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-18 15:00:08 +00:00
Aymeric Augustin 9b1cb755a2 Added support for time zones. Thanks Luke Plant for the review. Fixed #2626.
For more information on this project, see this thread:
http://groups.google.com/group/django-developers/browse_thread/thread/cf0423bbb85b1bbf



git-svn-id: http://code.djangoproject.com/svn/django/trunk@17106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-18 13:01:06 +00:00
Jannis Leidel 773d91ead2 Fixed #17128 -- Fixed a Python 2.5 incompatibility. Thanks, Simon Meers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17102 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-17 21:30:07 +00:00
Luke Plant 6d39cb4119 Fixed #5704 - Admin popup windows won't close when using application/xhtml as default content type
Thanks to Rob van der Linde for the report, and to mb0, dArignac and claudep
for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17065 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-01 21:50:17 +00:00
Julien Phalip 9796f69533 Fixed #16257 -- Added new `ModelAdmin.get_list_display_links()` method to allow for the dynamic display of links on the admin changelist. Thanks to graveyboat for the suggestion and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17037 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 12:19:18 +00:00
Julien Phalip 600c576ac5 Fixed #17090 -- Made the API specification for `ModelAdmin.get_list_display()` more consistent with that of `ModelAdmin.list_display` by separating out the admin action check boxes business. This is backwards-incompatible for those who have been using the still-unreleased `get_list_display()` method. Thanks to Ramiro Morales for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17035 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 09:37:07 +00:00
Julien Phalip 2e2689c7c0 Fixed #15938 -- Prevented the `max_length` number in the admin `prepopulated_fields` javascript to be localized when `USE_THOUSAND_SEPARATOR` is turned on. Thanks to Lev Maximov, Mathieu Agopian and feel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17033 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 05:33:17 +00:00
Julien Phalip dca81ad58a Fixed #17064 -- Improved the UX for the admin's time and date picker widgets by brushing up the 'Cancel' button's visual feedback and by allowing the popups to get closed by pressing the 'Escape' key.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17021 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-22 03:38:10 +00:00
Julien Phalip 93a581431a Fixed #15221 -- Made the admin filters on foreign key and m2m relationships display the related field's verbose name instead of that of the related model.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16991 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-16 06:42:50 +00:00
Aymeric Augustin 06d9b82a27 Fixed #16906 -- Format datetimes with str/unicode instead of strftime where possible: it's faster and it works for all dates.
Also ensured that datetime_safe is used wherever strftime is called on dates/datetimes that may be before 1900.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@16978 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 19:23:45 +00:00
Julien Phalip 1f1b16722e Fixed a padding issue in admin tabular inline headers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16968 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 10:09:17 +00:00
Julien Phalip 4da7c772ad Fixed #16776 -- Fixed a regression introduced in r16415 which caused Django's embedded jQuery to overwrite any pre-existing values of `window.jQuery` in the global namespace. Many thanks to Rob Hudson, Jannis Leidel and "anonymous" for the help resolving this issue.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 09:20:10 +00:00
Ramiro Morales 4725a732e7 Fixed #9460 -- Added template blocks for submit buttons rows in admin app model add/change views.
This allows for easier customization. Thanks kosmik for report and patch.

Refs #13875.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16956 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-10 22:19:59 +00:00
Julien Phalip 17659adf93 Fixed #16371 -- Added a prefix "field-" to all CSS class names automatically generated from field names in admin forms to avoid conflicts with other common class names (e.g. "button"). This is backwards-incompatible for those who previously used plain field names as selector in custom style sheets or javascript transformations.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16953 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-10 12:35:06 +00:00
Julien Phalip 6d7461ffdd Fixed #17019 -- Fixed a minor margin issue in multi-field admin form rows for right-to-left languages. Thanks to rem for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16947 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-09 11:37:48 +00:00
Carl Meyer b1b1da1eac Fixed #8060 - Added permissions-checking for admin inlines. Thanks p.patruno for report and Stephan Jaensch for work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16934 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-07 00:41:25 +00:00
Julien Phalip f2ed107b07 Simplified the admin changelist multi-sort interface specifically by removing the popup window, adding explicit tooltip help texts, improving the hover visual states and allowing all operations (i.e. removing a column from sorting and toggling the sorting with and without changing the sorting priority) to be actionable with just one click. Many thanks to Idan Gazit for the feedback and direction. Refs #16212.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16899 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-24 06:17:53 +00:00
Ramiro Morales bb641631e5 Fixed #16912 -- Fixed breadcrumb styling in a couple of admin pages, broken since r16857. Thanks Florian Apolloner for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-22 17:04:05 +00:00
Paul McMillan 0781ed8ec8 Fixed #16837 -- Improved error message for admin login.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16872 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-22 04:16:21 +00:00
Carl Meyer 09a01435de Fixed #16838 -- Corrected broken add-another inline JS in admin with related_name="+". Thanks jamesp for report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16860 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-21 14:00:58 +00:00
Ramiro Morales aaf77c1676 Converted internal link generation in the admin and admin document generator to use named URLs.
Thanks to Florian Apolloner for both the initial patch and his final push to get
this fixed, to Dario Ocles for his great work on the admin templates and
switching the admin_doc application to also use named URLs, to Mikko Hellsing
for his comments and to Jannis and Julien for their review and design guidance.

Fixes #15294.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16857 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-20 18:30:06 +00:00
Julien Phalip 212b048564 Fixed #16659 -- Made the admin's date drilldown links in the changelist have a variable width to play nicer with languages with long month names.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16854 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-19 07:25:59 +00:00
Julien Phalip def775ae5e Reverted the change in r16683, which, while fixing an alignment issue in IE7 with the admin's "Save and continue editing" and "Save and add another" buttons, caused the swapping of those buttons' order. Thanks to jocmeh for the report. Refs #16852.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16835 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-16 06:30:05 +00:00
Julien Phalip c76112cf1d Fixed #4198 -- Fixed a small styling issue in the admin calendar widget. Thanks to Gary Wilson and fcurella.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16822 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-13 03:10:07 +00:00
Ramiro Morales 26b8122087 Fixed #14675 -- Completed removal of `from django.conf.urls.default import *` usage.
This applies to both our own [test] code and documentation examples. Also:
 * Moved the functions and handlers from `django.conf.urls.defaults` up to
   `django.conf.urls` deprecating the former module.
 * Added documentation for `handler403`.
 * Tweaked the URLs topic document a bit.

Thanks to pupeno and cdestigter for their great work contributing patches.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 22:36:16 +00:00
Jannis Leidel cf70c96ce0 Fixed #15997 -- Added `list_max_show_all` option to `ModelAdmin` in replacement for a global module level variable. Thanks, jsdalton.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16725 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-08 13:25:00 +00:00
Julien Phalip 71f017b2a6 Fixed #16059 -- Improved the usability of the admin's vertical and horizontal "filter" widgets, in particular by providing a better visual representation of the buttons' enabled and disabled states, and by providing more elaborate, yet less cluttered, help texts.
Note that this commit is an exception to the current tacit rule that javascript code changes should be avoided until a proper javascript testing framework for Django core is in place. This exception is commanded by the fact that it is to fix a recognized usability issue and that the patch has been (manually) extensively tested in IE6+, Chrome, Safari, Firefox and Opera.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-31 08:07:07 +00:00
Julien Phalip 93fbb77d9b Fixed #16716 -- Fixed two small regressions in the development version introduced in r16144 where the changelist crashed with a 500 error instead of nicely operating a 302 redirection back to the changelist.
The two specific cases were:

* a lookup through a non-existing field and apparently spanning multiple relationships (e.g. "?nonexistant__whatever=xxxx").
* a proper list_filter's queryset failing with an exception. In Django 1.3 the queryset was only directly manipulated by the changelist, whereas in 1.4 the list_filters may manipulate the queryset themselves. The fix here implies catching potential failures from the list_filters too.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16705 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-28 07:57:56 +00:00
Julien Phalip 3e65f9633b Further improved on the work done in r16622 by making the help text icons look hoverable in the admin tabular inline headers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-26 04:36:31 +00:00
Julien Phalip 7e66ccac4c Fixed a small admin CSS issue where the "Save and continue editing" and "Save and add another" buttons were wrongly aligned with left-to-right languages in IE7.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16683 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-25 08:01:21 +00:00
Malcolm Tredinnick a524114883 Removed unused admin Javascript functions from source.
Fixed #16204. Thanks, melinath.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16642 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-22 02:52:20 +00:00
Jannis Leidel 7d782e51c1 Fixed #8190 -- Added support for a field's help text to the tabular admin inline. Thanks, Julien Phalip and Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16622 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-17 14:12:25 +00:00
Jannis Leidel 3d027b72eb Fixed #14496 -- Fixed conflict between ModelForm exclude and ModelAdmin readonly values. Thanks, Julien Phalip.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16602 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:14:49 +00:00