Metadata-Version: 2.0
Name: admin-extra-urls
Version: 0.7
Summary: Django mixin to easily add urls to any ModelAdmin
Home-page: UNKNOWN
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Platform: linux
Classifier: Environment :: Web Environment
Classifier: Operating System :: OS Independent
Classifier: Framework :: Django
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Intended Audience :: Developers
Requires-Dist: django (>1.5,<1.8)
Requires-Dist: six
Provides-Extra: tests
Requires-Dist: tox (>=1.8); extra == 'tests'
Requires-Dist: django-webtest; extra == 'tests'
Requires-Dist: pytest; extra == 'tests'
Requires-Dist: wheel; extra == 'tests'
Requires-Dist: django-dynamic-fixture; extra == 'tests'
Requires-Dist: pytest-django; extra == 'tests'
Requires-Dist: pytest-echo; extra == 'tests'

admin-extra-urls
================

this plugable django application that offer one single Mixin ``ExtraUrlMixin``
to easily add new url (and related buttons on the screen) to any ModelAdmin.

Install::

    pip install admin-extra-urls

After installation add it to ``INSTALLED_APPS``::

   INSTALLED_APPS = (
       ...
       'admin_extra_urls',
   )

Example::

    class MyModelModelAdmin(ExtraUrlMixin, admin.ModelAdmin):

        @link() # /admin/myapp/mymodel/update_all/
        def update_all(self, request):
            ...
            ...


        @action() # /admin/myapp/mymodel/update/10/
        def update(self, request, pk):
            ...
            ...

    You don't need to return a HttpResponse, by default:

    - with `@link()` browser will be redirected to `changelist view`
    - with `@action()` browser will be redirected to `change view `


More options::


        @link(label='Update', icon="icon-refresh icon-white", permission='model_change", order=-1)
        def update_all(self, request):
            ....


*Note*

    The package contains a ``UploadMixin`` to manage custom file uploads
    (simply set `upload_handler` to a function.
    This can be checked to see how to create wizard with an intermediate form.


