adfav is simple application for adding any model instances to favorite in admin change list. And after then you can get all you favorite items at one click.
Add "adfav" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = ( ... 'adfav', )
Include the polls URLconf in your project urls.py like this:
Run sync command:
python manage.py syncdb
Inherit adfav admin class in you admin.py, like this:
# admin.py from django.contrib import admin from myapp.models import MyModel from adfav.admin import FavoriteAdmin class MyModelAdmin(FavoriteAdmin): ... admin.site.register(MyModel, MyModelAdmin)
Also, you can get built-in filter by favorite-mark and/or built-in actions (add/remove from favorite):
# admin.py from django.contrib import admin from myapp.models import MyModel from adfav.admin import FavoriteAdmin from adfav.utils import FavoriteFilter, add_to_favorite, delete_from_favorite class MyModelAdmin(FavoriteAdmin): list_filter = (FavoriteFilter,) actions = (add_to_favorite, delete_from_favorite) admin.site.register(MyModel, MyModelAdmin)
You can define labes, that displayed in you admin model:
ADFAV_ADD_LABEL = 'Add to favorite' # default: 'Add' ADFAV_DELETE_LABEL = 'Delete from favorite' # default: 'Delete' ADFAV_HEADER_LABEL = 'My favorite list' # default: 'Favorite'