Login

Tag "admin-interface"

Snippet List

Generic compact list_filter with counts

Based on [#1879](http://djangosnippets.org/snippets/1879/) and [#2356](http://djangosnippets.org/snippets/2356/) Works in Django 1.3 Hopefully it's generic enough to implement a compact (sparse) version of whatever custom filter you need.

  • admin-interface
  • compact
  • list_filter
Read More

django app name & breadcrumbs l10n

This approach allows you to rename you app name & app breadcrumbs within admin interface. Paste the code in admin.py of your application and change AppLabelRenamer.main params.

  • admin
  • applications
  • admin-interface
  • breadcrumbs
Read More

Compact list_filter with counter

This is an extension of the fantastic snippet "Compact list_filter" written by **onlinehero**. Follow his instructions for the installation. My version add the number of filtered objects beside the label of the filters defined by the list_filter property.

  • admin-interface
  • compact
  • list_filter
Read More

Compact list_filter

When doing a list_filter on some object in the Django interface, every single item will be displayed. This is not always smart when very long list of choices can be displayed, even though the majority of these choices might not even exist in the database at all. Using this script will only display a filtering possibility for those items actually present in the database. This script is not generic, and you will need to change the lines noted "Change this", since I cannot know what exactly you need to filter. There is possibly a way to make this completely generic, and I hope this will inspire someone to make it!

  • admin-interface
  • compact
  • list_filter
Read More

auto generate admin.py

When you switch you django project from 0.9.6 to 1.0, you can use this script to generate admin.py automatically. You need copy cvt.py to the parent directory of your project(where your project lies) and type "python cvt.py <project> <app>". The admin.py will generated in the <project>/<app>(where it should be!). Enjoy this small work!

  • django
  • python
  • admin-interface
Read More

7 snippets posted so far.