Module Expr Str ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam defaults Str body Expr Str If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr orelse Assign NameStore NameLoad Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore Dict For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot CompareIn AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore NameLoad body Assign NameStore ListLoad For NameStore NameLoad body If CompareEq AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults Str body Expr Str If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr orelse Assign NameStore NameLoad Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot CompareIn AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad NameLoad Assign NameStore ListLoad For NameStore NameLoad body If CompareIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Dict If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr If UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Assign NameStore Dict If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr If UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad orelse Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Dict For NameStore NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call NameLoad NameLoad Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore ListLoad Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr For NameStore NameLoad body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Str Return NameLoad decorator_list
N/A N/A 
Module: Doccode Mapping form grouping changer
Project: Adlibre DMS
Copyright: Adlibre Pty Ltd 2012
License: See LICENSE for license information
Author: Iurii Garmash
 djangoplugins.models Plugin PluginPoint django forms django.utils.importlib import_module models DoccodePluginMapping create_form_fields N/A N/A plugins_param N/A N/A N/A 
    Generator of form fields in desired grouping.
    
    Takes Plugin model queryset or produces own from all plugins.
    
    Makes:
    - getting all plugins queryset if not given
    - getting used plugins types and cleaning them to disable repeating of them
    - grouping fields for PluginSelectorForm 
    
    Returns kwargs dictionary with form fields to populate form.
     N/A N/A plugins_param N/A N/A plugins N/A N/A N/A Plugin objects all N/A N/A plugins plugins_param N/A all_plugins_types N/A N/A plugin_types_clean N/A N/A plugins_done N/A N/A kwargs N/A N/A plugin plugins N/A N/A plugin_temp N/A N/A plugin get_plugin N/A N/A plugin_temp pk N/A plugin pk N/A N/A N/A plugins_done append plugin_temp N/A N/A N/A all_plugins_types append N/A plugin_temp plugin_type N/A N/A N/A N/A plugin_temp plugin_type plugin_types_clean N/A N/A N/A N/A plugin_types_clean append N/A plugin_temp plugin_type N/A plugin_type plugin_types_clean N/A N/A plugins_temp_list N/A N/A plugin plugins_done N/A N/A N/A N/A plugin plugin_type plugin_type N/A N/A N/A N/A plugins_temp_list append N/A plugin pk N/A N/A kwargs N/A plugin_type N/A N/A forms ModelMultipleChoiceField N/A N/A plugins filter pk__in plugins_temp_list N/A kwargs N/A get_all_plugintypes N/A N/A plugins_param N/A N/A N/A 
    Helper function to get list of unique plugin types
    
    Takes Plugin model queryset or peoduces own from 1 request if not provided.
    Returns list of cleared and unique plugins types used.
     N/A N/A plugins_param N/A N/A plugins N/A N/A N/A Plugin objects all N/A N/A plugins plugins_param N/A plugins_types_clean N/A N/A plugin plugins N/A N/A plugin_temp N/A N/A plugin get_plugin N/A N/A N/A N/A plugin_temp plugin_type plugins_types_clean N/A N/A N/A N/A plugins_types_clean append N/A plugin_temp plugin_type N/A plugins_types_clean N/A extract_plugin_pks N/A N/A input_post_data plugins_queryset N/A False N/A N/A 
    Reduces form POST data to list of submitted plugin's PK's.
    
    Returns list of POST form plugin's PK's.
    Takes:
    - serialized form POST data
    - Plugin model queryset, or produces own if not provided.
     N/A N/A plugins_queryset N/A N/A plugins_queryset N/A N/A N/A Plugin objects all N/A clean_plugintypes N/A get_all_plugintypes plugins_queryset N/A requested_plugin_pks N/A N/A form_field_name input_post_data N/A N/A N/A form_field_name clean_plugintypes N/A N/A N/A N/A requested_plugin_pks extend N/A N/A input_post_data getlist form_field_name N/A requested_plugin_pks N/A sort_plugins_by_pluginpoint N/A N/A requested_plugin_pks plugins_queryset N/A False N/A N/A 
    Creates a dictionary of plugin PK's sorted by pluginpont.
    Suitable for model manipulations.
    
    Ruturns a dictionary of key:pluginpoint name, value: list of submited plugin PK's
    Takes:
    - list of submitted plugin's PK's (cleared to only numbers) 
    - plugins model queryset or produces one for own usage.
     N/A plugins_sorted_dict N/A N/A N/A plugins_queryset N/A N/A plugins_queryset N/A N/A N/A Plugin objects all N/A plugin_pk requested_plugin_pks N/A N/A current_plugin N/A N/A plugins_queryset filter pk plugin_pk N/A plugin_instance N/A N/A N/A current_plugin N/A 0 get_plugin N/A N/A N/A N/A plugins_sorted_dict has_key N/A plugin_instance settings_field_name N/A N/A N/A plugins_sorted_dict N/A N/A plugin_instance settings_field_name N/A N/A N/A N/A N/A plugins_sorted_dict N/A N/A plugin_instance settings_field_name append plugin_pk N/A plugins_sorted_dict N/A sort_plugins_by_type N/A N/A pks_array plugins_queryset N/A N/A N/A 
    Ruturns a dictionary of key:plugin_type, value: list of submited plugin PK's
    Takes:
    - list of submitted plugin's PK's (cleared to only numbers) 
    - plugins model queryset or produces one for own usage.
     N/A plugins_sorted_dict N/A N/A N/A plugins_queryset N/A N/A plugins_queryset N/A N/A N/A Plugin objects all N/A plugin_pk pks_array N/A N/A current_plugin N/A N/A plugins_queryset filter pk plugin_pk N/A plugin_instance N/A N/A N/A current_plugin N/A 0 get_plugin N/A N/A N/A N/A plugins_sorted_dict has_key N/A plugin_instance plugin_type N/A N/A N/A plugins_sorted_dict N/A N/A plugin_instance plugin_type N/A N/A N/A N/A N/A plugins_sorted_dict N/A N/A plugin_instance plugin_type append plugin_pk N/A plugins_sorted_dict N/A save_doccode_model N/A N/A plugins_sorted_dict input_post_data pk N/A False N/A N/A 
    Model instance aving sequence.
    Takes 2 arguments: 
    - dictionary of properly sorted plugins pk's 
    - serialized input POST string
    creates a model instance and saves to base.
    Needs ONLY validated data. 
     N/A pk N/A N/A mapping N/A N/A N/A DoccodePluginMapping objects get pk pk N/A N/A mapping before_storage_plugins N/A N/A N/A mapping storage_plugins N/A N/A N/A mapping before_retrieval_plugins N/A N/A N/A mapping before_removal_plugins N/A N/A N/A mapping before_update_plugins N/A N/A N/A mapping database_storage_plugins N/A N/A N/A mapping N/A DoccodePluginMapping N/A N/A mapping active N/A N/A input_post_data has_key active N/A N/A mapping doccode N/A input_post_data N/A doccode N/A N/A N/A mapping save N/A N/A field_name value N/A N/A plugins_sorted_dict iteritems N/A N/A N/A setattr mapping field_name value N/A N/A N/A mapping save N/A mapping N/A get_all_pluginpoints_dict N/A N/A all_pluginpoints_queryset N/A False N/A N/A 
    Returns dictionary pluginpoint.pk : pluginpoint.settings_field_name
    For e.g.:
    '4' : 'before_removal_plugins',
    
    Takes pluginpoints queryset or makes call to base on his own, 
    using all pluginpoits there, if not provided.
     N/A N/A all_pluginpoints_queryset N/A N/A all_pluginpoints_queryset N/A N/A N/A PluginPoint objects all N/A pluginpoints_dict N/A N/A point all_pluginpoints_queryset N/A N/A pluginpoint N/A get_plugin_from_string N/A point name N/A N/A pluginpoints_dict N/A N/A str N/A point pk N/A pluginpoint settings_field_name N/A pluginpoints_dict N/A get_plugin_from_string N/A N/A plugin_name N/A N/A N/A 
    Returns plugin or plugin point class from given ``plugin_name`` string.

    Example of ``plugin_name``::
        'my_app.MyPlugin'
     N/A N/A modulename classname N/A N/A plugin_name rsplit . 1 N/A module N/A import_module modulename N/A N/A getattr module classname N/A save_PluginSelectorForm N/A N/A serialized_POST plugins_queryset pk N/A False False N/A N/A 
    Main form save sequence manager.
    Uses methods above to save model instance based on provided form data.
     N/A N/A plugins_queryset N/A N/A plugins_queryset N/A N/A N/A Plugin objects all N/A plugins_used_list N/A extract_plugin_pks serialized_POST plugins_queryset N/A plugins_sorted_dict N/A sort_plugins_by_pluginpoint plugins_used_list plugins_queryset N/A instance_ N/A save_doccode_model plugins_sorted_dict serialized_POST pk N/A instance_ N/A get_plugins_for_doccode N/A N/A instance plugins_queryset N/A False N/A N/A 
    Helper to extract all plugin's PK's from DccodePluginMapping instance.
    Takes a DoccodePluginMapping instance and extracts all plugin's pk's it uses.
    Returns a list of plugin's mapping uses.
    WARNING it highly depends on model methods and structure.
    Pleas change it accordingly upon adding PluginPoints.
     N/A plg_s N/A N/A plugins_dict N/A N/A N/A N/A plg_s append N/A N/A instance get_before_storage_plugins N/A N/A N/A plg_s append N/A N/A instance get_storage_plugins N/A N/A N/A plg_s append N/A N/A instance get_before_retrieval_plugins N/A N/A N/A plg_s append N/A N/A instance get_before_removal_plugins N/A N/A N/A plg_s append N/A N/A instance get_before_update_plugins N/A N/A N/A plg_s append N/A N/A instance get_database_storage_plugins N/A queryset plg_s N/A N/A plugin queryset N/A N/A N/A N/A plugins_dict append N/A plugin pk N/A plugins_dict N/A serialize_model_for_PluginSelectorForm N/A N/A instance N/A N/A N/A 
    Serializes a model instance to add to a PluginSelector form.
    Makes it a suitable sorting view.
     N/A pks_array N/A get_plugins_for_doccode instance N/A dict N/A sort_plugins_by_type pks_array N/A N/A N/A Plugin objects all N/A N/A dict N/A doccode N/A instance doccode N/A N/A instance active N/A N/A N/A dict N/A active on N/A dict N/A