cuducos / django-public-admin

🔓 A public and read-only version of the Django Admin
MIT License
37 stars 5 forks source link

`Recent actions` not hidden #25

Open lsmith77 opened 6 months ago

lsmith77 commented 6 months ago

I added public_admin above django.contrib.admin as instructed on https://django-public-admin.readthedocs.io/en/latest/usage.html#templates

image

But I am still getting the recent actions shown:

image
cuducos commented 6 months ago

I am not able to reproduce it. Can you share a way to do it?

What I have tried is the example/ from this repo:

$ git clone https://github.com/cuducos/django-public-admin.git
$ cd django-public-admin
$ poetry update  # and I removed pip from pyproject.toml, gonna find a fix later
$ poetry run python manage.py runserver

And then visited the dashboard at http://127.0.0.1:8000/dashboard/

image
lsmith77 commented 6 months ago

Thanks for looking into this.

Something is strange in my setup, since I can override base_site.html but index.html doesn't seem to register any changes.

lsmith77 commented 6 months ago

OK the issue is due to using grappelli

I am looking into how to get grappelli's dashboard's to work with public_admin: https://django-grappelli.readthedocs.io/en/latest/dashboard_setup.html?highlight=dashboard#custom-dashboard

lsmith77 commented 6 months ago

FYI I got it to work

GRAPPELLI_INDEX_DASHBOARD = {
    "django.contrib.admin.site": "rules.dashboard.CustomIndexDashboard",
    "word_lists.public_admin.public_admin": "word_lists.dashboard.CustomIndexDashboard",
}

My public site sits in word_lists/public_admin/py.