Adding a sidebar to the admin

20 views
Skip to first unread message

Hugo Osvaldo Barrera

unread,
Aug 6, 2015, 3:57:45 PM8/6/15
to django...@googlegroups.com
I'd like to add a sidebar on the left side of all admin pages (including
change_list, change_details, etc), with a list of all my models. In
other words, I'd like to move the index with a list of models into a
sidebar on the left.

After poking around the docs and templates a bit, it seems that I'd need
to override templates/admin/base.html entirely (which I'd rather avoid
for easier maintenence), or work with some CSS hacks (to make content
narrower, and move sidebar up and on the left.

Have I missed something? What would the recomended approach be? Has
anybody done something alike?

Cheers!

--
Hugo Osvaldo Barrera

Бранко Мајић

unread,
Aug 6, 2015, 4:13:03 PM8/6/15
to django...@googlegroups.com
Дана Thu, 06 Aug 2015 16:39:41 -0300
"'Hugo Osvaldo Barrera' via Django users"
<django...@googlegroups.com> написа:
This may not help you completely (and I have not had a look at admin's
base.html, truth be told), but there is small convenient Django
application called django-apptemplates
(https://pypi.python.org/pypi/django-apptemplates/).

The application adds a template tag that allows you to both override
and extend one of the existing templates. So perhaps you would still
need to duplicate _some_ part of base.html, but with perhaps you would
bring it to a minimum.

Best regards

--
Branko Majic
Jabber: bra...@majic.rs
Please use only Free formats when sending attachments to me.

Бранко Мајић
Џабер: bra...@majic.rs
Молим вас да додатке шаљете искључиво у слободним форматима.
Reply all
Reply to author
Forward
0 new messages