Code

Opened 4 years ago

Last modified 2 years ago

#13146 new New feature

Remove hardcoded stuff in contrib.admin

Reported by: utku Owned by: utku
Component: contrib.admin Version: 1.1
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

There're lots of unnecessary hardcoded elements with the Admin which makes it hard to customize. Some examples:

http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/widgets.py#L126 (hardcoded image)
http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/widgets.py#L95 (template/widget instead)
http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/options.py#L650 (move to template)
http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/widgets.py#L238 (hardcoded image, including width and height, this should go to CSS)

IMO, getting rid of almost all hardcoded elements is the base for a more extensible, customizable and easier to change/adapt interface (PK).

Attachments (0)

Change History (10)

comment:1 Changed 4 years ago by russellm

  • Component changed from django.contrib.admin to User Experience
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 4 years ago by ericholscher

  • milestone set to 1.3

Seems easy enough to fix and make people's lives easier.

comment:3 Changed 3 years ago by julien

  • milestone 1.3 deleted

This is a fine idea, but without a patch this has no chance to make it in 1.3. Also, the line numbers in your description are probably outdated. It'd be useful if you could provide more details about those hardcoded things you're actually referencing.

comment:4 Changed 3 years ago by lukeplant

  • Type set to New feature

comment:5 Changed 3 years ago by lukeplant

  • Severity set to Normal

comment:6 Changed 3 years ago by julien

  • UI/UX set

comment:7 Changed 3 years ago by julien

  • Component changed from User Experience to contrib.admin

comment:8 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:9 Changed 2 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:10 Changed 2 years ago by aaugustin

  • UI/UX set

Revert accidental batch modification.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new
The owner will be changed from utku to anonymous. Next status will be 'assigned'
as The resolution will be set. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.