Opened 7 years ago

Last modified 11 months ago

#8936 new New feature

add databrowse-like functionality to the admin

Reported by: simon Owned by: nobody
Component: contrib.admin Version: 1.0
Severity: Normal Keywords: django pony
Cc: charettes Triage Stage: Someday/Maybe
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Adrian and Jacob on stage at DjangoCon.

Attachments (2)

options.diff (2.5 KB) - added by riccardodivirgilio 3 years ago. (63.4 KB) - added by riccardodivirgilio 3 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 6 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Someday/Maybe

comment:2 Changed 6 years ago by thejaswi_puthraya

  • Component changed from Uncategorized to Contrib apps
  • Keywords django pony added

comment:3 Changed 4 years ago by gabrielhurley

  • Component changed from Contrib apps to contrib.databrowse

comment:4 Changed 4 years ago by lukeplant

  • Severity set to Normal
  • Type set to New feature

comment:5 Changed 4 years ago by aaugustin

  • Easy pickings unset
  • UI/UX unset

A summary is here:
This project didn't happen in 2011.

comment:6 Changed 4 years ago by julien

See also #15956 for a list of specific problems when trying to use the admin merely for browsing data.

comment:7 Changed 4 years ago by ptone

  • Component changed from contrib.databrowse to contrib.admin
  • Summary changed from Integrate databrowse functionality in to the admin to add databrowse-like functionality to the admin

Since Databrowse is now deprecated, this should be considered as a proposed enhancement to the admin

Databrowse is now deprecated, see #16907

Changed 3 years ago by riccardodivirgilio

Changed 3 years ago by riccardodivirgilio

comment:8 Changed 3 years ago by anonymous

hi, i've added a small patch to django.contrib.admin.options

i've tested it and it works, it's pretty basic and there is more work to do.

what i've done is to add a method has_view_permission, and check a view permission in every view

i also created a get_list_editable, and i add in get_list_editable and in get_readonly_fields a check, and it returns original read_only and list_editable only if user has got a change_pemission

i also raise a permission error every time there is a post request and user do not have a change_permission

a also ask for view_permission in history_view.


fix inlines
fix submit_row

add a opts.has_view_permission()

comment:10 Changed 19 months ago by naktinis@…

What is the current status of this one? Is the provided patch of any help or do we need a new patch?

comment:11 Changed 19 months ago by timo

It's probably best to start from scratch on this one. The patch is in a weird format for one, and it's difficult for me to tell what's going on with it. Instead of just diving in and writing code for this, what we really need to move forward with this is a well thought out design document that can be reviewed. See Aymeric's post on the mailing list thread above for more details.

comment:12 Changed 19 months ago by charettes

I think a simple POC could be implemented by doing the following:

  1. Create a view default permission.
  2. Add has_view_permission methods to BaseModelAdmin and InlineModelAdmin.
  3. Use the built-in readonly_fields logic to provide views of models.
  4. Do the same thing with the listing of models.
  5. Add a new icon to link to the read-only version of models.

Then some permission checks will need to be changed in order to fallback to the view mode of models if the user doesn't have the change permission but has the view one.

comment:13 Changed 19 months ago by charettes

  • Cc charettes added

comment:14 Changed 11 months ago by anonymous

It's weird to see a feature that was requested 6 years ago, by multiple people, still not being implemented. Instead, the "admins" refused this a number of times, calling it a pony, and generally ignoring what actual users want. It's very sad.

comment:15 Changed 11 months ago by timo

If you want to see this, make a proposal (comment 12 looks good) and implement it with tests and documentation. That will be more useful than lamenting the fact that no one has done it.

Note: See TracTickets for help on using tickets.
Back to Top