Metadata-Version: 1.1
Name: Flask-Admin-Toggle-Control
Version: 0.1.3
Summary: Toggle control for Flask Admin inline form.
Home-page: https://github.com/artemShelest/flask-admin-toggle-control
Author: Artem Shelest
Author-email: artem.e.shelest@gmail.com
License: MIT
Description-Content-Type: UNKNOWN
Description: Flask-Admin-Toggle-Control
        ==========================
        
        Better boolean toggle control for Flask-Admin inline form.
        
        Better UX
        ---------
        
        Replace this:
        
        .. image:: https://raw.githubusercontent.com/artemShelest/flask-admin-toggle-control/master/res/original.gif
        
        with this:
        
        .. image:: https://raw.githubusercontent.com/artemShelest/flask-admin-toggle-control/master/res/new.gif
        
        Installation
        ------------
        ::
        
            pip install flask-admin-toggle-control
        
        Integrate
        ---------
        
        Edit your view class to integrate toggle control:
        
        1. Inherit from ViewMixin::
        
            class SomeView(flask_admin_toggle_control.ViewMixin, ModelView):
                pass
        
        2. Define fields to show with toggle control::
        
            class SomeView(flask_admin_toggle_control.ViewMixin, ModelView):
                column_toggle_control_list = ["boolean_field1", "boolean_field2"]
        
        3. Do not forget to have these fields editable::
        
            class SomeView(flask_admin_toggle_control.ViewMixin, ModelView):
                column_toggle_control_list = ["boolean_field1", "boolean_field2"]
                column_editable_list = ["boolean_field1", "boolean_field2", "other_editable_field"]
        
        
        Serve component JS file from static endpoint, pass your application object as a parameter::
        
            app = Flask(__name__)
            flask_admin_toggle_control.init_static_ep(app)
        
        
        
        Changelog
        =========
        
        0.1.3
        -----
        
        * Added installation and integration instructions
        * Extracted view mixin for easier integration
        * Helper to create static endpoint
        
Keywords: flask-admin,inline,form,control,bool,boolean,toggle
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
