summaryrefslogtreecommitdiff
path: root/django/contrib/admin
AgeCommit message (Collapse)Author
2008-09-16Fixed #9083 -- Improved get_admin_log template tag so that it doesn't run a ↵Adrian Holovaty
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-16Fixed #9074: Added overflow: hidden to the submit-row div to clear the ↵Wilson Miner
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-10Fixed #8957 -- Fixed incorrect error message when Admin prepopulated_fields ↵Adrian Holovaty
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-10Moved the bulk of the shortcut() function in django/views/defaults.py to a ↵Adrian Holovaty
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-08Fixed #7929 -- Removed some snippets of admin code that weren't doing ↵Adrian Holovaty
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-08Fixed #8172 -- Improved a whole bunch of contrib templates (admin, ↵Adrian Holovaty
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-03Fixed a small initialisation edge-case in the raw_id_fields section of admin.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-03Fixed #8832 -- Position the error icons on the right of the screen in the adminMalcolm Tredinnick
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-03Fixed #8812 -- Fixed up the positioning of the "delete" link in the adminMalcolm Tredinnick
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-02Security fix. Announcement forthcoming.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8877 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-02Fixed #2612: fixed display of admin `help_text` with multiple fields on the ↵Jacob Kaplan-Moss
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-02Fixed #8805 -- Make sure proper type coercion happens before dumping data ↵Brian Rosner
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-02Fixed #7973 -- Added exclude to BaseModelAdmin to make everything consistent ↵Brian Rosner
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-02Fixed #8787 -- Fixed failing admin_widgets tests. This fixes ↵Brian Rosner
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-01Fixed #2612 -- Fixed admin formatting when help_text is used with multiple ↵Brian Rosner
fields on the same line. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8824 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01Fixed #8648 -- Admin no longer ignores to_field. Thanks for the help Karen ↵Brian Rosner
Tracey and SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31Fixed #8194 (again): correctly focus on the first declared field in the ↵Jacob Kaplan-Moss
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-31Fixed `ModelAdmin.radio_fields` to work with the new `TypedChoiceField`.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-31Fixed #8058 -- Moved media for filter_vertical/filter_horizontal widget to ↵Brian Rosner
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-31Fixed #8631 -- Corrected a display issue with the popup submit_row where the ↵Brian Rosner
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-31Fixed handling of primary keys in model formsets. Model formsets should now ↵Brian Rosner
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-29Properly reference FieldDoesNotExist as it does not exist in global of ↵Brian Rosner
django/contrib/admin/options.py. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8719 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29Fixed #7810: added named URLs for admin docs, and use them in the admin base ↵Jacob Kaplan-Moss
template. Thanks, MattBowen. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8717 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29Fixed some edge-case error handling from [8699]. Thanks, gkelly.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29Fixed #7982 -- Corrected ModelAdmin url dispatching to ensure it matching ↵Brian Rosner
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-29Fixed #7881: Support `__in` lookups in `limit_choices_to` and ↵Jacob Kaplan-Moss
`raw_id_admin`. Thanks, jamesturk. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8700 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29Fixed #7738: support initial values via `GET` for `SelectMutliple` in the admin.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29When a form in the admin has no fields prevent failure.Brian Rosner
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8698 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28Fixed #8556: added a useful formfield to `CommaSeparatedIntegerField`. ↵Jacob Kaplan-Moss
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-28Fixed #8194: `AdminForm.first_field` now correctly returns the first field ↵Jacob Kaplan-Moss
when using custom field orders. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28Marked a handful of missed strings for translation. Fixes #8644, #8617, and ↵Jacob Kaplan-Moss
#8610. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8679 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28Fixed #8027: correctly validate fields/fieldsets in `ModelAdmin` validation ↵Jacob Kaplan-Moss
when using custom `ModelForm`s. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8662 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27Fixed #8589 -- Fixed the URL for the logout link on the app_index page in admin.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8617 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-27Removed oldforms, validators, and related code:Gary Wilson Jr
* 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-27Fixed #8577 -- Fixed a couple of indentation errors when viewing the app-indexMalcolm Tredinnick
page in admin. Patch by evenrik. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8607 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26Fixed #8569 -- Ensure that apps are correctly set up before introspecting themMalcolm Tredinnick
in admin validation. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8605 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26Tweaked the admin validation code to make things a bit easier to read. TracingMalcolm Tredinnick
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-26Marked a couple of unmarked strings in edit_inline templates and corrected a ↵Brian Rosner
marked string. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8587 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26Fixed #7984 -- 'View on site' links now work in inlines. Thanks philwo for ↵Brian Rosner
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-26Fixed #8126: improved `admin.autodiscover()` to be more forgiving of invalid ↵Jacob Kaplan-Moss
`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-26Fixed #6101 -- Tweaked a couple of places in the delete-related-objectsMalcolm Tredinnick
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-25Fixed #8547 -- Corrected the breadcrumb display in the object_history.html ↵Brian Rosner
template. Thanks sorl for catching this. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8555 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25Fixed #8499 -- Corrected a couple of instances of where the CSS class name ↵Brian Rosner
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-25Fixed #8522 -- Allow app_index to take extra_context to be consistent with ↵Brian Rosner
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-24Fixed #8520 -- Corrected a dumb typo in the call to password_change in ↵Brian Rosner
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-24Fixed #8129: Modified the password reset email template to use a URL lookup, ↵Russell Keith-Magee
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-24Fixed #8509: Cleaned up handling of test cookies in admin logins. Thanks to ↵Russell Keith-Magee
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-23Fixed #7903 -- Allow admin's prepopulated_from to work with TextFields. PatchMalcolm Tredinnick
from mk and Alex Gaynor. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8505 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23Tweaked the Admin add/change page so that "save" is still the highlightedMalcolm Tredinnick
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-23Updated password change template (in admin templates) to use current formMalcolm Tredinnick
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