Commit Graph

371 Commits

Author SHA1 Message Date
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
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
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 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
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
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 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 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 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
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
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
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
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
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
Luke Plant 6f76b9f58d Simplified control flow for change made in r7535
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7536 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-05-16 22:53:39 +00:00
Luke Plant 7e4718f8d5 Fixed bug in staff_member_required decorator for the case where users share an email address.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7535 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-05-15 22:10:53 +00:00
Russell Keith-Magee 41635d2176 Removed mark_safe from the saved request path on the admin login form. This prevents a potential XSS attack. Formal announcement will be forthcoming.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7521 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-05-10 13:19:19 +00:00
Malcolm Tredinnick a1e4b15f15 Fixed #3002 -- Fixed a problem with ordering by related models in the admin
interface. Patch from Ramiro Morales.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7491 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-28 02:40:57 +00:00
Malcolm Tredinnick 9c52d56f6f Merged the queryset-refactor branch into trunk.
This is a big internal change, but mostly backwards compatible with existing
code. Also adds a couple of new features.

Fixed #245, #1050, #1656, #1801, #2076, #2091, #2150, #2253, #2306, #2400, #2430, #2482, #2496, #2676, #2737, #2874, #2902, #2939, #3037, #3141, #3288, #3440, #3592, #3739, #4088, #4260, #4289, #4306, #4358, #4464, #4510, #4858, #5012, #5020, #5261, #5295, #5321, #5324, #5325, #5555, #5707, #5796, #5817, #5987, #6018, #6074, #6088, #6154, #6177, #6180, #6203, #6658


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7477 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-27 02:50:16 +00:00
Malcolm Tredinnick d15e290cb1 Fixed #7012 -- Added a missing file for CSS backgrounds with right-to-left
languages. Thanks, Amit Ramon.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7424 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-15 02:07:49 +00:00
Adrian Holovaty 054c2e4af3 Fixed #6852 -- Converted the admin to use the new paginator, to remove DeprecationWarnings. Thanks for the patch, nickefford
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7363 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-25 05:20:55 +00:00
Malcolm Tredinnick 9b52f35f35 Added "svn:eol-style native" to every text file in the tree (*.txt, *.html,
*.py, *.xml and AUTHORS, etc). Added "svn:ignore *.pyc" to some directories in
tests/regressiontests/ that were previously missing it.

Fixed #6545, #6801.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7294 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-18 14:54:39 +00:00
Gary Wilson Jr 5ca0b9203b Fixed #5701 -- Fixed decorators to take the name, attributes, and docstring of the function they decorate by adding a modified version of the `functools.wraps` function from Python 2.5. `wraps` has been altered to work with Django's `curry` function and with Python 2.3, which doesn't allow assignment of a function's `__name__` attribute. This fixes severaly annoyances, such as the online documentation for template filters served by the admin app. This change is backwards incompatible if, for some reason, you were relying on the name of a Django decorator instead of the function it decorates.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-25 06:02:35 +00:00
Malcolm Tredinnick f1a24be01c Fixed #6481 -- Fixed a bunch of import problems (and some whitespace cleanups).
Found by Bastian Kleineidam with help from pyflakes. Thanks.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-19 00:08:08 +00:00
Malcolm Tredinnick 25c4ab99e3 Fixed #6109 -- Marked fieldset descriptions as safe from auto-escaping. Good
catch, SomeGuy.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7078 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-03 07:39:10 +00:00
Gary Wilson Jr a01ebb4a50 Fixed #6354 -- Fixed url in `django/conf/urls/shortcut.py` to work with non-integer primary keys (refs #2033) and made use of the URL file in the admin urls.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7040 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-28 05:36:44 +00:00
Malcolm Tredinnick d1793f1774 Fixed #6248 -- Fixed typo in urlify.js. Pointed out by arien.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6999 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-06 03:55:23 +00:00
Malcolm Tredinnick 402ca0b77b Fixed #5044 -- Added Latvian character map for Javascript slug generation. Patch from arien.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6933 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-17 09:14:59 +00:00
Jacob Kaplan-Moss 76dd53ac08 Fixed #6116: mark-safe the admin changelist table class. Thanks, zlobnyi antisvin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6888 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-04 19:17:25 +00:00
Malcolm Tredinnick f27365e5bd Fixed #6061 -- Don't escape help_text in the admin interface (so that it
behaves as documented). Thanks, baumer.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6781 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-30 19:59:13 +00:00
Malcolm Tredinnick 0171f00761 Fixed #5706 -- Fixed a couple of XHTML incompatibilities. Based on a patch from
tvrg.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6735 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29 16:32:29 +00:00
Malcolm Tredinnick 2d0d6620e6 Fixed #6015 -- Fixed a CSS escaping issue for admin's edit-inline.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6720 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-28 17:58:10 +00:00
Gary Wilson Jr 183a457f5a Fixed #2086 -- Changed `base.css` to import `null.css` (added in [6197]) instead of `null`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6716 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-25 20:29:26 +00:00
Malcolm Tredinnick ab69710de4 Fixed #5976 -- Handle auto-escaping correctly for empty columns in admin change
view.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6705 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-20 01:37:34 +00:00
Malcolm Tredinnick b1d40295bc Fixed #5973 -- Fixed inadvertent allow_tags=True auto-escaping problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-20 01:37:01 +00:00
Gary Wilson Jr 38d972b9ec Fixed #5880 -- Fixed an XSS hole in the admin interface.
* Escaped text that gets sent after saving the admin foreignkey popup form.
 * Added quotes around the second argument passed to `opener.dismissAddAnotherPopup` to make the function also work when a text field is used as the primary key.
 * Added a `html_unescape` javascript function to unescape the strings passed in to the `dismissAddAnotherPopup` function so that the added choice displays correctly in the dropdown box.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6691 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-18 06:51:20 +00:00
Malcolm Tredinnick b58c55fc80 Fixed #5944 -- Added safe string markings to admin error messages in one place
that was missed.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6675 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-14 22:58:24 +00:00
Malcolm Tredinnick 356662cf74 Implemented auto-escaping of variable output in templates. Fully controllable by template authors and it's possible to write filters and templates that simulataneously work in both auto-escaped and non-auto-escaped environments if you need to. Fixed #2359
See documentation in templates.txt and templates_python.txt for how everything
works.

Backwards incompatible if you're inserting raw HTML output via template variables.

Based on an original design from Simon Willison and with debugging help from Michael Radziej.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6671 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-14 12:58:53 +00:00
Malcolm Tredinnick 4362d154fb Fixed #4902 -- Added some missing Czech uppercase characters to urlify.js.
Thanks, michal@plovarna.cz.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6557 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20 09:27:12 +00:00
Malcolm Tredinnick dc9def7859 Fixed #5678 -- Added Polish transliteration to urlify.js. Thanks,
regexbot@gmail.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6541 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20 04:42:30 +00:00
Jacob Kaplan-Moss 2570954a9a Fixed #3453: introduced a new template variable resolution system by Brian Harring (thanks!). The upshot is that variable resolution is about 25% faster, and you should see a measurable performance increase any time you've got long or deeply nested loops.
Variable resolution has changed behind the scenes -- see the note in templates_python.txt -- but template.resolve_variable() still exists. This should be fully backwards-compatible.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6399 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-21 04:00:32 +00:00
Gary Wilson Jr 04a110836d Fixed #3491 -- Fixed links in `user-tools` section of admin's `base.html` template to use the `url` template tag. This also removes the need for child templates to override the block just to adjust the relative path. Thanks, saintsjd@gmail.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-20 06:59:13 +00:00
Malcolm Tredinnick e9656180ea Fixed #1394 -- Fixed an admin crash when saving models with pk db column != pk attname.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6360 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-16 12:14:48 +00:00
Malcolm Tredinnick 4b610f42d3 Added a get_host() method to HttpRequest. There is still an http.get_host() version in place, so this is fully backwards compatible.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 17:46:03 +00:00
Adrian Holovaty 5c3905cf48 Fixed #1888 -- Fixed small interface inaccuracy when using filter_interface=models.VERTICAL. Thanks, ryankanno, wnielson and SmileyChris
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6262 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15 05:01:58 +00:00
Jacob Kaplan-Moss 66e4541101 Fixed #4448: the calendar widget now refreshes if the date field is changed. THanks, gkelly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6214 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 21:04:45 +00:00
Wilson Miner 1ea702dd23 Fixed 3136: Set .clockbox admin widget to auto width to allow for longer headers in other languages.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6210 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 19:49:51 +00:00
Wilson Miner 55d34c6cb3 Fixes #2086: Added null.css file to avoid spurious 404s due to the "high pass filter" which hides admin CSS from IE5/Win.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6197 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 18:26:05 +00:00
Russell Keith-Magee 3358e2fec7 Fixed #5067 -- Fixed a problem with javascript popup widgets appearing in the wrong place if they were in a overflow=scroll block. Thanks to Erich Schmid for the original fix, and Robert Coup for the updated patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6172 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 06:43:46 +00:00
Russell Keith-Magee 09145d2e5f Fixed #208 -- Modernized the syntax of the cycle tag to allow for spaces and variables in cycle values. Thanks to SmileyChris and Chris McAvoy for their work on this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6153 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14 02:49:21 +00:00
Malcolm Tredinnick a7d0ad67dc Fixed #5326 -- Added Ukrainian map for Javascript slug generation. Thanks, Artyom Gnilov.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6141 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-13 22:42:30 +00:00
Adrian Holovaty 70740d6eca Fixed #348 -- Fixed bug in admin JavaScript filter interface. Thanks for the patch, Gary Wilson
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-25 23:33:58 +00:00
Malcolm Tredinnick a901af5f58 Fixed #5155 -- Translated the model name (when available) in the Recent Actions log.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5935 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19 05:40:47 +00:00
Adrian Holovaty 9ee6326cb6 Fixed #5019 -- Fixed broken links in navigation of 'change password' admin page. Thanks, hpxchan@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5863 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-12 03:26:35 +00:00
Malcolm Tredinnick 35ce8a2a8a Fixed #4902 -- Added Czech support to urlify.js. Thanks, Honza Král.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5853 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-11 12:09:52 +00:00
Gary Wilson Jr 212ee65be7 Fixed #2101 -- Renamed `maxlength` argument to `max_length` for oldforms `FormField`s and db model `Field`s. This is fully backwards compatible at the moment since the legacy `maxlength` argument is still supported. Using `maxlength` will, however, issue a `PendingDeprecationWarning` when used.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-05 05:14:46 +00:00
Gary Wilson Jr 919205ef85 Refs #3397 -- Corrected the Exception that is caught when ordering by non-fields (added in [4596]), thanks glin@seznam.cz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5799 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-04 14:41:49 +00:00
Malcolm Tredinnick f2a45f9b38 Fixed #4862 -- Fixed invalid Javascript creation in popup windows in admin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5694 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-14 13:14:28 +00:00
Malcolm Tredinnick 92ee770773 Fixed #4556 -- Stylistic changes to [5500]. Thanks, glin@seznam.cz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5689 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-13 14:40:39 +00:00
Malcolm Tredinnick 0145e71ceb Fixed #4846 -- Fixed some Python 2.3 encoding problems in the admin interface.
Based on a patch from daybreaker12@gmail.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5683 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-13 11:05:01 +00:00
Russell Keith-Magee 4d9e29ea86 Fixed #4775 -- Added some missing Hungarian accents to the urlify.js LATIN_MAP. Thanks, Pistahh <szekeres@iii.hu>.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5672 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-12 14:00:13 +00:00
Malcolm Tredinnick fbd9381802 Fixed #4766 -- Added Russian support to Javascript slug creation. Thanks,
boobsd@gmail.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5611 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04 12:31:19 +00:00
Malcolm Tredinnick f0250b64f6 Fixed Javascript syntax from [5608] that was causing a problem in Opera. Fixed
#4365.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5610 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04 12:25:43 +00:00
Malcolm Tredinnick 953badbea5 Merged Unicode branch into trunk (r4952:5608). This should be fully
backwards compatible for all practical purposes.

Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04 12:11:04 +00:00
Malcolm Tredinnick ac64e91a0c Merged boulder-oracle-sprint branch (r3965:5512) back into trunk. All
expected tests pass for all databases.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5519 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-23 14:16:00 +00:00
Malcolm Tredinnick 08aa5c585b Fixed #4607 -- Tweaked checks for features missing in Python 2.3 to not assume
things Python does not guarantee. Patch from SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5514 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-23 03:18:22 +00:00
Malcolm Tredinnick 880e3cfaa6 Backed out the changes in [5482] for a bit whilst some more investigation into
side-effects is done. Refs #4565.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5511 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-22 07:15:04 +00:00
Adrian Holovaty 11a8084d4f Fixed #4556 -- Admin showAddAnotherPopup JavaScript function can now handle URLs with GET attributes. Thanks for the patch, glin@seznam.cz
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5500 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-20 06:12:43 +00:00
Malcolm Tredinnick bccb8897e6 Fixed #4565 -- Changed template rendering to use iterators, rather than
creating large strings, as much as possible. This is all backwards compatible.
Thanks, Brian Harring.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5482 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-06-17 07:11:37 +00:00
Jacob Kaplan-Moss 1e70426619 Fixed #3397 (again): admin_order_field is now displayed correctly in the admin views. Thanks, kent37@tds.net
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5318 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-22 16:56:53 +00:00
Malcolm Tredinnick 92c35a0617 Fixed #2365, #3324 -- Renamed FloatField to DecimalField and changed the code
to return Decimal instances in Python for this field. Backwards incompatible
change.

Added a real FloatField (stores floats in the database) and support for
FloatField and DecimalField in newforms (analogous to IntegerField).

Included decimal.py module (as django.utils._decimal) from Python 2.4. This is
license compatible with Django and included for Python 2.3 compatibility only.

Large portions of this work are based on patches from Andy Durdin and Jorge
Gajon.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@5302 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-21 01:29:58 +00:00
Malcolm Tredinnick d1b0d34dc6 Fixed #4200 -- Made get_admin_log template tag behave according to its
docstring (user specifier is optional). Thanks, Bryan Chow.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5170 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-08 03:56:44 +00:00
Malcolm Tredinnick 4bce3c17ec Revert [5092], since this should only have been applied to newforms-admin.
Refs #1576.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5097 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-26 14:58:38 +00:00
Malcolm Tredinnick 6c18ba8c91 Fixed #1576 -- Fixed incorrect SQL generated when using descending ordering
from related models. Patch from SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5092 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-26 13:48:31 +00:00