This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
======================
django Admin Shortcuts
======================

.. image:: https://raw.github.com/alesdotio/django-admin-shortcuts/gh-pages/images/django-admin-shortcuts.png



What is this?
=============

It's a simple dashboard app that adds shortcuts to your django admin homepage. The keyword here is SIMPLE!


Why does it exist?
==================

Because some people noted that it's sometimes hard to find the app you are looking for on the admin homepage.

"So why don't we customize the admin site a bit?"

"Nah, I don't want to go through all the hassle of editing templates or setting up a complex dashboard app ..."

Well, good thing django-admin-shortcuts is here, because it only takes five minutes of your time to go from the old
dreadfully boring admin to the marvelous engineering excellence that is this app.


How do I use it?
================

1) ``pip install django-admin-shortcuts``

2) add ``'admin_shortcuts'`` to your ``INSTALLED_APPS``, just before ``'django.contrib.admin'`` <-- IMPORTANT

3) add ``ADMIN_SHORTCUTS`` to your settings

For example:
::

ADMIN_SHORTCUTS = [
{
'title': 'Shop',
'shortcuts': [
{
'url_name': 'admin:shop_order_changelist',
'title': 'Products',
'count_new': 'project.utils.count_new_orders',
'has_perms': 'project.utils.has_perms_to_orders',
},
]
},
]

Where ...

* ``url_name`` is a name that will be resolved using django's reverse url method (see https://docs.djangoproject.com/en/1.4/ref/contrib/admin/#reversing-admin-urls)
* optional ``app_name`` is the name of the admin app that will be used for URL reversal. You can safely ignore this if you have only one admin site in your ``urls.py``
* optional ``url`` is a direct link that will override ``url_name``
* optional ``url_extra`` is extra stuff to be attached at the end of the url (like GET data for pre-filtering admin views)
* optional ``title`` is the title of the shortcut
* optional ``count`` and ``count_new`` are paths to a function inside your project that returns something interesting (like a count of all products or a count of all pending orders).
The function can optionally take one argument, ``request``, which is the current Django ``HttpRequest`` object.
* optional ``has_perms`` is a path to a function inside your project that returns information about shortcut visibility on the django admin homepage.
Like above, this function can optionally take one argument ``request`` as well.
* optional ``open_new_window`` sets whether the link should open in a new window (default is False)
* optional ``class`` is the CSS class to be added to the anchor element (if you don't specify one, magical ponies will do it for you)

4) profit!!

5) optionally, also add ``ADMIN_SHORTCUTS_SETTINGS`` to your settings

::

ADMIN_SHORTCUTS_SETTINGS = {
'hide_app_list': False,
'open_new_window': False,
}


Where ...

* optional ``hide_app_list`` collapses the app list
* optional ``open_new_window`` makes all shortcuts open in a new window


What are the settings used in the pretty image above?
=====================================================

::

ADMIN_SHORTCUTS = [
{
'shortcuts': [
{
'url': '/',
'open_new_window': True,
},
{
'url_name': 'admin:cms_page_changelist',
'title': _('Pages'),
},
{
'url_name': 'admin:filer_folder_changelist',
'title': _('Files'),
},
{
'url_name': 'admin:auth_user_changelist',
'title': _('Users'),
},
{
'url_name': 'admin:contactform_contactformsubmission_changelist',
'title': _('Contact forms'),
'count_new': 'project.utils.count_new_contactforms',
},
]
},
{
'title': _('Shop'),
'shortcuts': [
{
'url_name': 'admin:shop_product_changelist',
'title': _('Products'),
'count': 'project.utils.count_products',
},
{
'url_name': 'admin:shop_category_changelist',
'title': _('Categories'),
},
{
'url_name': 'admin:shop_order_changelist',
'title': _('Orders'),
'count_new': 'project.utils.count_new_orders',
},
]
},
]
ADMIN_SHORTCUTS_SETTINGS = {
'hide_app_list': True,
'open_new_window': False,
}



I want to change how stuff looks
================================

* to change the css overwrite the ``templates/admin_shortcuts/base.css`` template
* to change the icons specify desired ``url_name`` to ``class`` mappings in ``ADMIN_SHORTCUTS_CLASS_MAPPINGS``


Notes
-----

* Icons grabbed from Pixeden.com
Release History

Release History

1.2.7

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-admin-shortcuts-1.2.7.tar.gz (79.0 kB) Copy SHA256 Checksum SHA256 Source Mar 1, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting